diff --git a/.gitignore b/.gitignore
index 9a50a7481d..a5199c5671 100644
--- a/.gitignore
+++ b/.gitignore
@@ -89,6 +89,10 @@ packages/gatsby-**/**/*.json
!packages/gatsby-**/package.json
!packages/gatsby-**/tsconfig.json
+# autogen graphql files
+packages/core/@generated/schema.graphql
+packages/core/@generated/persisted-documents.json
+
# lighthouse CI autogen files
.lighthouseci
diff --git a/apps/site/pages/docs/api-extensions/api-extensions-improvements.mdx b/apps/site/pages/docs/api-extensions/api-extensions-improvements.mdx
new file mode 100644
index 0000000000..f75cf9b0c5
--- /dev/null
+++ b/apps/site/pages/docs/api-extensions/api-extensions-improvements.mdx
@@ -0,0 +1,142 @@
+# Improvements to API extensions - v3.0.0
+
+In this guide, learn how to migrate your store version to v3.0.0 to leverage the latest improvements in the API extension.
+
+Version 3.0.0 and above, introduces the following enhancements to API extension users:
+
+- Deprecation of the `@faststore/graphql-utils` package in favor of the [`client-preset`](https://the-guild.dev/graphql/codegen/plugins/presets/preset-client) plugin.
+
+- Refinement `gql` helper usage for a smoother and more efficient GraphQL query handling.
+
+- Enhancement security measures to a more secure method for invoking queries and mutations to safeguard your store's data.
+
+- Optimization call processes for queries or mutations defined within `@faststore/core`.
+
+import { Callout } from 'nextra/components'
+
+
+ For more details about these changes, also refer to the [GitHub
+ releases](/tbd) related to this version.
+
+
+The `@faststore/graphql-utils` has been replaced by open-source solutions maintained by the community that are now re-exported from `@faststore/core`. There are minor breaking changes on how developers should write GraphQL definitions and invoke queries and mutations, which were introduced in version 3.0.0.
+
+## Before you begin
+
+Make sure your store version is updated to v3.0.0 or above. If it’s not updated follow the instructions below:
+
+1. Open your store code and navigate to the `package.json` file.
+
+2. In `dependencies` > `@faststore/core`, change the version to the following:
+
+```json
+"@faststore/core": "^3.0.0",
+```
+
+3. Open the terminal and run `yarn` to update the version.
+
+## Updating the `gql` helper usage
+
+The `gql` helper serves as a function to define GraphQL operations such as queries, mutations, or fragments within the store code. Before, the function was imported directly from the `@faststore/graphql-utils` which was not recommended. See the example below:
+
+```tsx filename="src/fragments/ClientProduct.tsx"
+import { gql } from '@faststore/graphql-utils'
+
+export const fragment = gql`
+ fragment ClientProduct on Query {
+ product(locator: $locator) {
+ id: productID
+ breadcrumbList {
+ itemListElement {
+ item
+ name
+ position
+ }
+ }
+ }
+ }
+`
+```
+
+Now with the v3.0.0, you should import the `gql` helper from `@faststore/core/api`and be called as a function - with the argument between parenthesis. This also applies to query and mutation definitions inside the components. For example:
+
+```tsx filename="src/fragments/ClientProduct.tsx" {1}
+import { gql } from '@faststore/core/api'
+
+export const fragment = gql(`
+ fragment ClientProduct on Query {
+ product(locator: $locator) {
+ id: productID
+ breadcrumbList {
+ itemListElement {
+ item
+ name
+ position
+ }
+ }
+ }
+ }
+`)
+```
+
+## Using `useQuery` hook to call queries and mutations
+
+Previously, it was possible to invoke queries and mutations by using their names - such as `MyCustomQuery` by providing it to the `useQuery` hook. For example:
+
+```tsx
+import { useQuery_unstable as useQuery } from '@faststore/core/experimental'
+
+const query = gql(`
+ query MyCustomQuery {
+ customQuery() {
+ data
+ }
+ }
+`)
+
+// The useQuery call will now throw an error
+function CustomComponent() {
+ // ...
+ const result = useQuery(`MyCustomQuery`, variables)
+ // ...
+}
+```
+
+With v3.0.0, queries and mutations are now only invoked using more secure hashes, which are randomly generated and do to that you must pass the query or mutation object - result of the `gql` call - to `useQuery` directly. For example:
+
+```tsx
+import { gql } from '@faststore/core/api'
+import { useQuery_unstable as useQuery } from '@faststore/core/experimental'
+
+const query = gql(`
+ query MyCustomQuery {
+ customQuery() {
+ data
+ }
+ }
+`)
+
+// useQuery apropriately calls MyCustomQuery
+function CustomComponent() {
+ // ...
+ const result = useQuery(query, variables)
+ // ...
+}
+```
+
+### Calling queries or mutations defined by `@faststore/core`
+
+A custom component can call a query or mutation defined by `@faststore/core`, such as `ClientManyProductsQuery`. In these cases, you replace the `useQuery` hook call with a call to the specific hook for that query.
+
+
+ The availability of such hooks is limited.
+
+```tsx
+import { useClientManyProducts_unstable as useClientManyProducts } from '@faststore/core/experimental'
+
+// ClientManyProductsQuery will be called with the variables passed by CustomComponent
+function CustomComponent() {
+// ...
+const result = useClientManyProducts(variables)
+// ...
+}
diff --git a/apps/site/pages/docs/api-extensions/extending-queries-using-fragments.mdx b/apps/site/pages/docs/api-extensions/extending-queries-using-fragments.mdx
index 3184b87c2e..92a7004cc1 100644
--- a/apps/site/pages/docs/api-extensions/extending-queries-using-fragments.mdx
+++ b/apps/site/pages/docs/api-extensions/extending-queries-using-fragments.mdx
@@ -62,13 +62,13 @@ In the `ServerProduct.ts` file, define the GraphQL fragment corresponding to the
import { gql } from '@faststore/core/api'
-export const fragment = gql`
+export const fragment = gql(`
fragment ServerProduct on Query {
product(locator: $locator) {
customData
}
}
-`
+`)
```
Now, you can consume `customData` by following the [Consuming FastStore API extension with custom components](/docs/api-extensions/consuming-api-extensions) guide.
diff --git a/package.json b/package.json
index 8517b3c793..f81e1057e8 100644
--- a/package.json
+++ b/package.json
@@ -10,7 +10,7 @@
"lint": "turbo run lint",
"test": "turbo run test",
"size": "turbo run size",
- "release": "lerna version patch --yes && lerna publish from-git --yes",
+ "release": "lerna version major --yes && lerna publish from-git --yes",
"clean": "turbo run clean && rm -rf node_modules",
"format": "prettier --ignore-path .gitignore --write \"**/*.{js,jsx,ts,tsx,md}\""
},
diff --git a/packages/api/src/typeDefs/index.ts b/packages/api/src/typeDefs/index.ts
index df688d4b09..e39deecb03 100644
--- a/packages/api/src/typeDefs/index.ts
+++ b/packages/api/src/typeDefs/index.ts
@@ -2,7 +2,6 @@ import { print } from 'graphql'
import { loadFilesSync } from '@graphql-tools/load-files'
-// Empty string ('') is interpreted as the current dir. Referencing it as './' won't work.
-export const typeDefs = loadFilesSync('', { extensions: ['.graphql'] })
+export const typeDefs = loadFilesSync(__dirname, { extensions: ['.graphql'] })
.map(print)
.join('\n')
diff --git a/packages/cli/src/commands/generate-graphql.ts b/packages/cli/src/commands/generate-graphql.ts
index dd38a99854..4bc0dc1f66 100644
--- a/packages/cli/src/commands/generate-graphql.ts
+++ b/packages/cli/src/commands/generate-graphql.ts
@@ -2,7 +2,7 @@ import { Command, Flags } from '@oclif/core'
import { existsSync } from 'fs-extra'
import chalk from 'chalk'
-import { tmpDir } from '../utils/directory'
+import { coreDir, tmpDir } from '../utils/directory'
import { runCommandSync } from '../utils/runCommandSync'
export default class GenerateGraphql extends Command {
@@ -54,6 +54,16 @@ export default class GenerateGraphql extends Command {
cwd: isCore ? undefined : tmpDir,
})
+ // yarn generate:copy-back expects the DESTINATION var to be present so it can copy the files to the correct directory
+ runCommandSync({
+ cmd: `DESTINATION=${coreDir} yarn generate:copy-back`,
+ errorMessage:
+ "Failed to copy back typings files. 'yarn generate:copy-back' thrown errors",
+ throws: 'warning',
+ debug,
+ cwd: isCore ? undefined : tmpDir,
+ })
+
console.log(
`${chalk.green(
'success'
diff --git a/packages/core/.babelrc b/packages/core/.babelrc
deleted file mode 100644
index e41f28154f..0000000000
--- a/packages/core/.babelrc
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "presets": ["next/babel"],
- "plugins": ["@faststore/graphql-utils/babel"]
-}
diff --git a/packages/core/.babelrc.js b/packages/core/.babelrc.js
new file mode 100644
index 0000000000..e371e2bac4
--- /dev/null
+++ b/packages/core/.babelrc.js
@@ -0,0 +1,12 @@
+const { babelOptimizerPlugin } = require('@graphql-codegen/client-preset')
+
+module.exports = {
+ presets: ['next/babel'],
+ /** Replaces gql function calls for imports to the document data */
+ plugins: [
+ [
+ babelOptimizerPlugin,
+ { artifactDirectory: './@generated', gqlTagName: 'gql' },
+ ],
+ ],
+}
diff --git a/packages/core/@generated/gql.ts b/packages/core/@generated/gql.ts
new file mode 100644
index 0000000000..21a1bdc583
--- /dev/null
+++ b/packages/core/@generated/gql.ts
@@ -0,0 +1,196 @@
+/* eslint-disable */
+import * as types from './graphql'
+
+/**
+ * Map of all GraphQL operations in the project.
+ *
+ * This map has several performance disadvantages:
+ * 1. It is not tree-shakeable, so it will include all operations in the project.
+ * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.
+ * 3. It does not support dead code elimination, so it will add unused operations.
+ *
+ * Therefore it is highly recommended to use the babel or swc plugin for production.
+ */
+const documents = {
+ '\n fragment ProductSummary_product on StoreProduct {\n id: productID\n slug\n sku\n brand {\n brandName: name\n }\n name\n gtin\n\n isVariantOf {\n productGroupID\n name\n }\n\n image {\n url\n alternateName\n }\n\n brand {\n name\n }\n\n offers {\n lowPrice\n offers {\n availability\n price\n listPrice\n quantity\n seller {\n identifier\n }\n }\n }\n }\n':
+ types.ProductSummary_ProductFragmentDoc,
+ '\n fragment Filter_facets on StoreFacet {\n ... on StoreFacetRange {\n key\n label\n\n min {\n selected\n absolute\n }\n\n max {\n selected\n absolute\n }\n\n __typename\n }\n ... on StoreFacetBoolean {\n key\n label\n values {\n label\n value\n selected\n quantity\n }\n\n __typename\n }\n }\n':
+ types.Filter_FacetsFragmentDoc,
+ '\n fragment ProductDetailsFragment_product on StoreProduct {\n id: productID\n sku\n name\n gtin\n description\n\n isVariantOf {\n name\n productGroupID\n skuVariants {\n activeVariations\n slugsMap\n availableVariations\n }\n }\n\n image {\n url\n alternateName\n }\n\n brand {\n name\n }\n\n offers {\n lowPrice\n offers {\n availability\n price\n listPrice\n seller {\n identifier\n }\n }\n }\n\n # Contains necessary info to add this item to cart\n ...CartProductItem\n }\n':
+ types.ProductDetailsFragment_ProductFragmentDoc,
+ '\n fragment ClientManyProducts on Query {\n search(\n first: $first\n after: $after\n sort: $sort\n term: $term\n selectedFacets: $selectedFacets\n ) {\n products {\n pageInfo {\n totalCount\n }\n }\n }\n }\n':
+ types.ClientManyProductsFragmentDoc,
+ '\n fragment ClientProduct on Query {\n product(locator: $locator) {\n id: productID\n }\n }\n':
+ types.ClientProductFragmentDoc,
+ '\n fragment ClientProductGallery on Query {\n search(\n first: $first\n after: $after\n sort: $sort\n term: $term\n selectedFacets: $selectedFacets\n ) {\n products {\n pageInfo {\n totalCount\n }\n }\n }\n }\n':
+ types.ClientProductGalleryFragmentDoc,
+ '\n fragment ClientSearchSuggestions on Query {\n search(first: 5, term: $term, selectedFacets: $selectedFacets) {\n suggestions {\n terms {\n value\n }\n }\n }\n }\n':
+ types.ClientSearchSuggestionsFragmentDoc,
+ '\n fragment ClientShippingSimulation on Query {\n shipping(items: $items, postalCode: $postalCode, country: $country) {\n address {\n city\n }\n }\n }\n':
+ types.ClientShippingSimulationFragmentDoc,
+ '\n fragment ClientTopSearchSuggestions on Query {\n search(first: 5, term: $term, selectedFacets: $selectedFacets) {\n suggestions {\n terms {\n value\n }\n }\n }\n }\n':
+ types.ClientTopSearchSuggestionsFragmentDoc,
+ '\n fragment ServerCollectionPage on Query {\n collection(slug: $slug) {\n id\n }\n }\n':
+ types.ServerCollectionPageFragmentDoc,
+ '\n fragment ServerProduct on Query {\n product(locator: $locator) {\n id: productID\n }\n }\n':
+ types.ServerProductFragmentDoc,
+ '\n query ServerCollectionPageQuery($slug: String!) {\n ...ServerCollectionPage\n collection(slug: $slug) {\n seo {\n title\n description\n }\n breadcrumbList {\n itemListElement {\n item\n name\n position\n }\n }\n meta {\n selectedFacets {\n key\n value\n }\n }\n }\n }\n':
+ types.ServerCollectionPageQueryDocument,
+ '\n query ServerProductQuery($locator: [IStoreSelectedFacet!]!) {\n ...ServerProduct\n product(locator: $locator) {\n id: productID\n\n seo {\n title\n description\n canonical\n }\n\n brand {\n name\n }\n\n sku\n gtin\n name\n description\n releaseDate\n\n breadcrumbList {\n itemListElement {\n item\n name\n position\n }\n }\n\n image {\n url\n alternateName\n }\n\n offers {\n lowPrice\n highPrice\n priceCurrency\n offers {\n availability\n price\n priceValidUntil\n priceCurrency\n itemCondition\n seller {\n identifier\n }\n }\n }\n\n isVariantOf {\n productGroupID\n }\n\n ...ProductDetailsFragment_product\n }\n }\n':
+ types.ServerProductQueryDocument,
+ '\n mutation ValidateCartMutation($cart: IStoreCart!, $session: IStoreSession!) {\n validateCart(cart: $cart, session: $session) {\n order {\n orderNumber\n acceptedOffer {\n ...CartItem\n }\n }\n messages {\n ...CartMessage\n }\n }\n }\n\n fragment CartMessage on StoreCartMessage {\n text\n status\n }\n\n fragment CartItem on StoreOffer {\n seller {\n identifier\n }\n quantity\n price\n listPrice\n itemOffered {\n ...CartProductItem\n }\n }\n\n fragment CartProductItem on StoreProduct {\n sku\n name\n image {\n url\n alternateName\n }\n brand {\n name\n }\n isVariantOf {\n productGroupID\n name\n skuVariants {\n activeVariations\n slugsMap\n availableVariations\n }\n }\n gtin\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n }\n':
+ types.ValidateCartMutationDocument,
+ '\n mutation SubscribeToNewsletter($data: IPersonNewsletter!) {\n subscribeToNewsletter(data: $data) {\n id\n }\n }\n':
+ types.SubscribeToNewsletterDocument,
+ '\n query ClientManyProductsQuery(\n $first: Int!\n $after: String\n $sort: StoreSort!\n $term: String!\n $selectedFacets: [IStoreSelectedFacet!]!\n ) {\n ...ClientManyProducts\n search(\n first: $first\n after: $after\n sort: $sort\n term: $term\n selectedFacets: $selectedFacets\n ) {\n products {\n pageInfo {\n totalCount\n }\n edges {\n node {\n ...ProductSummary_product\n }\n }\n }\n }\n }\n':
+ types.ClientManyProductsQueryDocument,
+ '\n query ClientProductGalleryQuery(\n $first: Int!\n $after: String!\n $sort: StoreSort!\n $term: String!\n $selectedFacets: [IStoreSelectedFacet!]!\n ) {\n ...ClientProductGallery\n search(\n first: $first\n after: $after\n sort: $sort\n term: $term\n selectedFacets: $selectedFacets\n ) {\n products {\n pageInfo {\n totalCount\n }\n }\n facets {\n ...Filter_facets\n }\n metadata {\n ...SearchEvent_metadata\n }\n }\n }\n\n fragment SearchEvent_metadata on SearchMetadata {\n isTermMisspelled\n logicalOperator\n }\n':
+ types.ClientProductGalleryQueryDocument,
+ '\n query ClientProductQuery($locator: [IStoreSelectedFacet!]!) {\n ...ClientProduct\n product(locator: $locator) {\n ...ProductDetailsFragment_product\n }\n }\n':
+ types.ClientProductQueryDocument,
+ '\n query ClientSearchSuggestionsQuery(\n $term: String!\n $selectedFacets: [IStoreSelectedFacet!]\n ) {\n ...ClientSearchSuggestions\n search(first: 5, term: $term, selectedFacets: $selectedFacets) {\n suggestions {\n terms {\n value\n }\n products {\n ...ProductSummary_product\n }\n }\n products {\n pageInfo {\n totalCount\n }\n }\n metadata {\n ...SearchEvent_metadata\n }\n }\n }\n':
+ types.ClientSearchSuggestionsQueryDocument,
+ '\n query ClientTopSearchSuggestionsQuery(\n $term: String!\n $selectedFacets: [IStoreSelectedFacet!]\n ) {\n ...ClientTopSearchSuggestions\n search(first: 5, term: $term, selectedFacets: $selectedFacets) {\n suggestions {\n terms {\n value\n }\n }\n }\n }\n':
+ types.ClientTopSearchSuggestionsQueryDocument,
+ '\n mutation ValidateSession($session: IStoreSession!, $search: String!) {\n validateSession(session: $session, search: $search) {\n locale\n channel\n country\n addressType\n postalCode\n deliveryMode {\n deliveryChannel\n deliveryMethod\n deliveryWindow {\n startDate\n endDate\n }\n }\n geoCoordinates {\n latitude\n longitude\n }\n currency {\n code\n symbol\n }\n person {\n id\n email\n givenName\n familyName\n }\n }\n }\n':
+ types.ValidateSessionDocument,
+ '\n query ClientShippingSimulationQuery(\n $postalCode: String!\n $country: String!\n $items: [IShippingItem!]!\n ) {\n ...ClientShippingSimulation\n shipping(items: $items, postalCode: $postalCode, country: $country) {\n logisticsInfo {\n slas {\n carrier\n price\n availableDeliveryWindows {\n startDateUtc\n endDateUtc\n price\n listPrice\n }\n shippingEstimate\n localizedEstimates\n }\n }\n address {\n city\n neighborhood\n state\n }\n }\n }\n':
+ types.ClientShippingSimulationQueryDocument,
+}
+
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n fragment ProductSummary_product on StoreProduct {\n id: productID\n slug\n sku\n brand {\n brandName: name\n }\n name\n gtin\n\n isVariantOf {\n productGroupID\n name\n }\n\n image {\n url\n alternateName\n }\n\n brand {\n name\n }\n\n offers {\n lowPrice\n offers {\n availability\n price\n listPrice\n quantity\n seller {\n identifier\n }\n }\n }\n }\n'
+): typeof import('./graphql').ProductSummary_ProductFragmentDoc
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n fragment Filter_facets on StoreFacet {\n ... on StoreFacetRange {\n key\n label\n\n min {\n selected\n absolute\n }\n\n max {\n selected\n absolute\n }\n\n __typename\n }\n ... on StoreFacetBoolean {\n key\n label\n values {\n label\n value\n selected\n quantity\n }\n\n __typename\n }\n }\n'
+): typeof import('./graphql').Filter_FacetsFragmentDoc
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n fragment ProductDetailsFragment_product on StoreProduct {\n id: productID\n sku\n name\n gtin\n description\n\n isVariantOf {\n name\n productGroupID\n skuVariants {\n activeVariations\n slugsMap\n availableVariations\n }\n }\n\n image {\n url\n alternateName\n }\n\n brand {\n name\n }\n\n offers {\n lowPrice\n offers {\n availability\n price\n listPrice\n seller {\n identifier\n }\n }\n }\n\n # Contains necessary info to add this item to cart\n ...CartProductItem\n }\n'
+): typeof import('./graphql').ProductDetailsFragment_ProductFragmentDoc
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n fragment ClientManyProducts on Query {\n search(\n first: $first\n after: $after\n sort: $sort\n term: $term\n selectedFacets: $selectedFacets\n ) {\n products {\n pageInfo {\n totalCount\n }\n }\n }\n }\n'
+): typeof import('./graphql').ClientManyProductsFragmentDoc
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n fragment ClientProduct on Query {\n product(locator: $locator) {\n id: productID\n }\n }\n'
+): typeof import('./graphql').ClientProductFragmentDoc
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n fragment ClientProductGallery on Query {\n search(\n first: $first\n after: $after\n sort: $sort\n term: $term\n selectedFacets: $selectedFacets\n ) {\n products {\n pageInfo {\n totalCount\n }\n }\n }\n }\n'
+): typeof import('./graphql').ClientProductGalleryFragmentDoc
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n fragment ClientSearchSuggestions on Query {\n search(first: 5, term: $term, selectedFacets: $selectedFacets) {\n suggestions {\n terms {\n value\n }\n }\n }\n }\n'
+): typeof import('./graphql').ClientSearchSuggestionsFragmentDoc
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n fragment ClientShippingSimulation on Query {\n shipping(items: $items, postalCode: $postalCode, country: $country) {\n address {\n city\n }\n }\n }\n'
+): typeof import('./graphql').ClientShippingSimulationFragmentDoc
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n fragment ClientTopSearchSuggestions on Query {\n search(first: 5, term: $term, selectedFacets: $selectedFacets) {\n suggestions {\n terms {\n value\n }\n }\n }\n }\n'
+): typeof import('./graphql').ClientTopSearchSuggestionsFragmentDoc
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n fragment ServerCollectionPage on Query {\n collection(slug: $slug) {\n id\n }\n }\n'
+): typeof import('./graphql').ServerCollectionPageFragmentDoc
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n fragment ServerProduct on Query {\n product(locator: $locator) {\n id: productID\n }\n }\n'
+): typeof import('./graphql').ServerProductFragmentDoc
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n query ServerCollectionPageQuery($slug: String!) {\n ...ServerCollectionPage\n collection(slug: $slug) {\n seo {\n title\n description\n }\n breadcrumbList {\n itemListElement {\n item\n name\n position\n }\n }\n meta {\n selectedFacets {\n key\n value\n }\n }\n }\n }\n'
+): typeof import('./graphql').ServerCollectionPageQueryDocument
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n query ServerProductQuery($locator: [IStoreSelectedFacet!]!) {\n ...ServerProduct\n product(locator: $locator) {\n id: productID\n\n seo {\n title\n description\n canonical\n }\n\n brand {\n name\n }\n\n sku\n gtin\n name\n description\n releaseDate\n\n breadcrumbList {\n itemListElement {\n item\n name\n position\n }\n }\n\n image {\n url\n alternateName\n }\n\n offers {\n lowPrice\n highPrice\n priceCurrency\n offers {\n availability\n price\n priceValidUntil\n priceCurrency\n itemCondition\n seller {\n identifier\n }\n }\n }\n\n isVariantOf {\n productGroupID\n }\n\n ...ProductDetailsFragment_product\n }\n }\n'
+): typeof import('./graphql').ServerProductQueryDocument
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n mutation ValidateCartMutation($cart: IStoreCart!, $session: IStoreSession!) {\n validateCart(cart: $cart, session: $session) {\n order {\n orderNumber\n acceptedOffer {\n ...CartItem\n }\n }\n messages {\n ...CartMessage\n }\n }\n }\n\n fragment CartMessage on StoreCartMessage {\n text\n status\n }\n\n fragment CartItem on StoreOffer {\n seller {\n identifier\n }\n quantity\n price\n listPrice\n itemOffered {\n ...CartProductItem\n }\n }\n\n fragment CartProductItem on StoreProduct {\n sku\n name\n image {\n url\n alternateName\n }\n brand {\n name\n }\n isVariantOf {\n productGroupID\n name\n skuVariants {\n activeVariations\n slugsMap\n availableVariations\n }\n }\n gtin\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n }\n'
+): typeof import('./graphql').ValidateCartMutationDocument
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n mutation SubscribeToNewsletter($data: IPersonNewsletter!) {\n subscribeToNewsletter(data: $data) {\n id\n }\n }\n'
+): typeof import('./graphql').SubscribeToNewsletterDocument
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n query ClientManyProductsQuery(\n $first: Int!\n $after: String\n $sort: StoreSort!\n $term: String!\n $selectedFacets: [IStoreSelectedFacet!]!\n ) {\n ...ClientManyProducts\n search(\n first: $first\n after: $after\n sort: $sort\n term: $term\n selectedFacets: $selectedFacets\n ) {\n products {\n pageInfo {\n totalCount\n }\n edges {\n node {\n ...ProductSummary_product\n }\n }\n }\n }\n }\n'
+): typeof import('./graphql').ClientManyProductsQueryDocument
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n query ClientProductGalleryQuery(\n $first: Int!\n $after: String!\n $sort: StoreSort!\n $term: String!\n $selectedFacets: [IStoreSelectedFacet!]!\n ) {\n ...ClientProductGallery\n search(\n first: $first\n after: $after\n sort: $sort\n term: $term\n selectedFacets: $selectedFacets\n ) {\n products {\n pageInfo {\n totalCount\n }\n }\n facets {\n ...Filter_facets\n }\n metadata {\n ...SearchEvent_metadata\n }\n }\n }\n\n fragment SearchEvent_metadata on SearchMetadata {\n isTermMisspelled\n logicalOperator\n }\n'
+): typeof import('./graphql').ClientProductGalleryQueryDocument
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n query ClientProductQuery($locator: [IStoreSelectedFacet!]!) {\n ...ClientProduct\n product(locator: $locator) {\n ...ProductDetailsFragment_product\n }\n }\n'
+): typeof import('./graphql').ClientProductQueryDocument
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n query ClientSearchSuggestionsQuery(\n $term: String!\n $selectedFacets: [IStoreSelectedFacet!]\n ) {\n ...ClientSearchSuggestions\n search(first: 5, term: $term, selectedFacets: $selectedFacets) {\n suggestions {\n terms {\n value\n }\n products {\n ...ProductSummary_product\n }\n }\n products {\n pageInfo {\n totalCount\n }\n }\n metadata {\n ...SearchEvent_metadata\n }\n }\n }\n'
+): typeof import('./graphql').ClientSearchSuggestionsQueryDocument
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n query ClientTopSearchSuggestionsQuery(\n $term: String!\n $selectedFacets: [IStoreSelectedFacet!]\n ) {\n ...ClientTopSearchSuggestions\n search(first: 5, term: $term, selectedFacets: $selectedFacets) {\n suggestions {\n terms {\n value\n }\n }\n }\n }\n'
+): typeof import('./graphql').ClientTopSearchSuggestionsQueryDocument
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n mutation ValidateSession($session: IStoreSession!, $search: String!) {\n validateSession(session: $session, search: $search) {\n locale\n channel\n country\n addressType\n postalCode\n deliveryMode {\n deliveryChannel\n deliveryMethod\n deliveryWindow {\n startDate\n endDate\n }\n }\n geoCoordinates {\n latitude\n longitude\n }\n currency {\n code\n symbol\n }\n person {\n id\n email\n givenName\n familyName\n }\n }\n }\n'
+): typeof import('./graphql').ValidateSessionDocument
+/**
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
+ */
+export function gql(
+ source: '\n query ClientShippingSimulationQuery(\n $postalCode: String!\n $country: String!\n $items: [IShippingItem!]!\n ) {\n ...ClientShippingSimulation\n shipping(items: $items, postalCode: $postalCode, country: $country) {\n logisticsInfo {\n slas {\n carrier\n price\n availableDeliveryWindows {\n startDateUtc\n endDateUtc\n price\n listPrice\n }\n shippingEstimate\n localizedEstimates\n }\n }\n address {\n city\n neighborhood\n state\n }\n }\n }\n'
+): typeof import('./graphql').ClientShippingSimulationQueryDocument
+
+export function gql(source: string) {
+ return (documents as any)[source] ?? {}
+}
diff --git a/packages/core/@generated/graphql/index.ts b/packages/core/@generated/graphql.ts
similarity index 64%
rename from packages/core/@generated/graphql/index.ts
rename to packages/core/@generated/graphql.ts
index 61a5e939d8..25e981a44a 100644
--- a/packages/core/@generated/graphql/index.ts
+++ b/packages/core/@generated/graphql.ts
@@ -1,3 +1,5 @@
+/* eslint-disable */
+import { DocumentTypeDecoration } from '@graphql-typed-document-node/core'
export type Maybe = T | null
export type InputMaybe = Maybe
export type Exact = {
@@ -9,13 +11,22 @@ export type MakeOptional = Omit & {
export type MakeMaybe = Omit & {
[SubKey in K]: Maybe
}
+export type MakeEmpty<
+ T extends { [key: string]: unknown },
+ K extends keyof T
+> = { [_ in K]?: never }
+export type Incremental =
+ | T
+ | {
+ [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never
+ }
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
- ID: string
- String: string
- Boolean: boolean
- Int: number
- Float: number
+ ID: { input: string; output: string }
+ String: { input: string; output: string }
+ Boolean: { input: boolean; output: boolean }
+ Int: { input: number; output: number }
+ Float: { input: number; output: number }
/**
* Example:
*
@@ -25,7 +36,7 @@ export type Scalars = {
* }
* ```
*/
- ActiveVariations: any
+ ActiveVariations: { input: any; output: any }
/**
* Example:
*
@@ -56,8 +67,8 @@ export type Scalars = {
* }
* ```
*/
- FormattedVariants: any
- ObjectOrString: any
+ FormattedVariants: { input: any; output: any }
+ ObjectOrString: { input: any; output: any }
/**
* Example:
*
@@ -67,7 +78,7 @@ export type Scalars = {
* }
* ```
*/
- SlugsMap: any
+ SlugsMap: { input: any; output: any }
/**
* Example:
*
@@ -78,82 +89,82 @@ export type Scalars = {
* }
* ```
*/
- VariantsByName: any
+ VariantsByName: { input: any; output: any }
}
/** Address information. */
export type Address = {
/** Address city */
- city: Maybe
+ city: Maybe
/** Address complement */
- complement: Maybe
+ complement: Maybe
/** Address country */
- country: Maybe
+ country: Maybe
/** Address geoCoordinates */
- geoCoordinates: Maybe>>
+ geoCoordinates: Maybe>>
/** Address neighborhood */
- neighborhood: Maybe
+ neighborhood: Maybe
/** Address number */
- number: Maybe
+ number: Maybe
/** Address postal code */
- postalCode: Maybe
+ postalCode: Maybe
/** Address reference */
- reference: Maybe
+ reference: Maybe
/** Address state */
- state: Maybe
+ state: Maybe
/** Address street */
- street: Maybe
+ street: Maybe
}
export type AvailableDeliveryWindows = {
/** Available delivery window end date in UTC */
- endDateUtc: Maybe
+ endDateUtc: Maybe
/** Available delivery window list price */
- listPrice: Maybe
+ listPrice: Maybe
/** Available delivery window price */
- price: Maybe
+ price: Maybe
/** Available delivery window start date in UTC */
- startDateUtc: Maybe
+ startDateUtc: Maybe
/** Available delivery window tax */
- tax: Maybe
+ tax: Maybe
}
export type DeliveryIds = {
/** DeliveryIds courier id */
- courierId: Maybe
+ courierId: Maybe
/** DeliveryIds courier name */
- courierName: Maybe
+ courierName: Maybe
/** DeliveryIds dock id */
- dockId: Maybe
+ dockId: Maybe
/** DeliveryIds quantity */
- quantity: Maybe
+ quantity: Maybe
/** DeliveryIds warehouse id */
- warehouseId: Maybe
+ warehouseId: Maybe
}
export type IGeoCoordinates = {
/** The latitude of the geographic coordinates. */
- latitude: Scalars['Float']
+ latitude: Scalars['Float']['input']
/** The longitude of the geographic coordinates. */
- longitude: Scalars['Float']
+ longitude: Scalars['Float']['input']
}
/** Person data input to the newsletter. */
export type IPersonNewsletter = {
/** Person's email. */
- email: Scalars['String']
+ email: Scalars['String']['input']
/** Person's name. */
- name: Scalars['String']
+ name: Scalars['String']['input']
}
/** Shipping Simulation item input. */
export type IShippingItem = {
/** ShippingItem ID / Sku. */
- id: Scalars['String']
+ id: Scalars['String']['input']
/** Number of items. */
- quantity: Scalars['Int']
+ quantity: Scalars['Int']['input']
/** Seller responsible for the ShippingItem. */
- seller: Scalars['String']
+ seller: Scalars['String']['input']
}
/** Shopping cart input. */
@@ -164,16 +175,16 @@ export type IStoreCart = {
export type IStoreCurrency = {
/** Currency code (e.g: USD). */
- code: Scalars['String']
+ code: Scalars['String']['input']
/** Currency symbol (e.g: $). */
- symbol: Scalars['String']
+ symbol: Scalars['String']['input']
}
export type IStoreDeliveryMode = {
/** The delivery channel information of the session. */
- deliveryChannel: Scalars['String']
+ deliveryChannel: Scalars['String']['input']
/** The delivery method information of the session. */
- deliveryMethod: Scalars['String']
+ deliveryMethod: Scalars['String']['input']
/** The delivery window information of the session. */
deliveryWindow: InputMaybe
}
@@ -181,24 +192,24 @@ export type IStoreDeliveryMode = {
/** Delivery window information. */
export type IStoreDeliveryWindow = {
/** The delivery window end date information. */
- endDate: Scalars['String']
+ endDate: Scalars['String']['input']
/** The delivery window start date information. */
- startDate: Scalars['String']
+ startDate: Scalars['String']['input']
}
export type IStoreGeoCoordinates = {
/** The latitude of the geographic coordinates. */
- latitude: Scalars['Float']
+ latitude: Scalars['Float']['input']
/** The longitude of the geographic coordinates. */
- longitude: Scalars['Float']
+ longitude: Scalars['Float']['input']
}
/** Image input. */
export type IStoreImage = {
/** Alias for the input image. */
- alternateName: Scalars['String']
+ alternateName: Scalars['String']['input']
/** Image input URL. */
- url: Scalars['String']
+ url: Scalars['String']['input']
}
/** Offer input. */
@@ -206,11 +217,11 @@ export type IStoreOffer = {
/** Information on the item being offered. */
itemOffered: IStoreProduct
/** This is displayed as the "from" price in the context of promotions' price comparison. This may change before it reaches the shelf. */
- listPrice: Scalars['Float']
+ listPrice: Scalars['Float']['input']
/** Also known as spot price. */
- price: Scalars['Float']
+ price: Scalars['Float']['input']
/** Number of items offered. */
- quantity: Scalars['Int']
+ quantity: Scalars['Int']['input']
/** Seller responsible for the offer. */
seller: IStoreOrganization
}
@@ -220,27 +231,27 @@ export type IStoreOrder = {
/** Array with information on each accepted offer. */
acceptedOffer: Array
/** ID of the order in [VTEX order management](https://help.vtex.com/en/tutorial/license-manager-resources-oms--60QcBsvWeum02cFi3GjBzg#). */
- orderNumber: Scalars['String']
+ orderNumber: Scalars['String']['input']
/** Indicates whether or not items with attachments should be split. */
- shouldSplitItem: InputMaybe
+ shouldSplitItem: InputMaybe
}
/** Organization input. */
export type IStoreOrganization = {
/** Organization ID. */
- identifier: Scalars['String']
+ identifier: Scalars['String']['input']
}
/** Client profile data. */
export type IStorePerson = {
/** Client email. */
- email: Scalars['String']
+ email: Scalars['String']['input']
/** Client last name. */
- familyName: Scalars['String']
+ familyName: Scalars['String']['input']
/** Client first name. */
- givenName: Scalars['String']
+ givenName: Scalars['String']['input']
/** Client ID. */
- id: Scalars['String']
+ id: Scalars['String']['input']
}
/** Product input. Products are variants within product groups, equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on. */
@@ -250,38 +261,38 @@ export type IStoreProduct = {
/** Array of product images. */
image: Array
/** Product name. */
- name: Scalars['String']
+ name: Scalars['String']['input']
/** Stock Keeping Unit. Merchant-specific ID for the product. */
- sku: Scalars['String']
+ sku: Scalars['String']['input']
}
export type IStorePropertyValue = {
/** Property name. */
- name: Scalars['String']
+ name: Scalars['String']['input']
/** Property id. This propert changes according to the content of the object. */
- propertyID: InputMaybe
+ propertyID: InputMaybe
/** Property value. May hold a string or the string representation of an object. */
- value: Scalars['ObjectOrString']
+ value: Scalars['ObjectOrString']['input']
/** Specifies the nature of the value */
- valueReference: Scalars['String']
+ valueReference: Scalars['String']['input']
}
/** Selected search facet input. */
export type IStoreSelectedFacet = {
/** Selected search facet key. */
- key: Scalars['String']
+ key: Scalars['String']['input']
/** Selected search facet value. */
- value: Scalars['String']
+ value: Scalars['String']['input']
}
/** Session input. */
export type IStoreSession = {
/** Session input address type. */
- addressType: InputMaybe
+ addressType: InputMaybe
/** Session input channel. */
- channel: InputMaybe
+ channel: InputMaybe
/** Session input country. */
- country: Scalars['String']
+ country: Scalars['String']['input']
/** Session input currency. */
currency: IStoreCurrency
/** Session input delivery mode. */
@@ -289,18 +300,18 @@ export type IStoreSession = {
/** Session input geoCoordinates. */
geoCoordinates: InputMaybe
/** Session input locale. */
- locale: Scalars['String']
+ locale: Scalars['String']['input']
/** Session input person. */
person: InputMaybe
/** Session input postal code. */
- postalCode: InputMaybe
+ postalCode: InputMaybe
}
export type LogisticsInfo = {
/** LogisticsInfo itemIndex. */
- itemIndex: Maybe
+ itemIndex: Maybe
/** LogisticsInfo selectedSla. */
- selectedSla: Maybe
+ selectedSla: Maybe
/** List of LogisticsInfo ShippingSLA. */
slas: Maybe>>
}
@@ -308,52 +319,52 @@ export type LogisticsInfo = {
/** Shipping Simulation Logistic Item. */
export type LogisticsItem = {
/** LogisticsItem availability. */
- availability: Maybe
+ availability: Maybe
/** LogisticsItem ID / Sku. */
- id: Maybe
+ id: Maybe
/** LogisticsItem listPrice. */
- listPrice: Maybe
+ listPrice: Maybe
/** LogisticsItem measurementUnit. */
- measurementUnit: Maybe
+ measurementUnit: Maybe
/** LogisticsItem price. */
- price: Maybe
+ price: Maybe
/** Next date in which price is scheduled to change. If there is no scheduled change, this will be set a year in the future from current time. */
- priceValidUntil: Maybe
+ priceValidUntil: Maybe
/** Number of items. */
- quantity: Maybe
- requestIndex: Maybe
+ quantity: Maybe
+ requestIndex: Maybe
/** LogisticsItem rewardValue. */
- rewardValue: Maybe
+ rewardValue: Maybe
/** Seller responsible for the ShippingItem. */
- seller: Maybe
+ seller: Maybe
/** List of Sellers. */
- sellerChain: Maybe>>
+ sellerChain: Maybe>>
/** LogisticsItem sellingPrice. */
- sellingPrice: Maybe
+ sellingPrice: Maybe
/** LogisticsItem tax. */
- tax: Maybe
+ tax: Maybe
/** LogisticsItem unitMultiplier. */
- unitMultiplier: Maybe
+ unitMultiplier: Maybe
}
export type MessageFields = {
/** MessageFields ean. */
- ean: Maybe
+ ean: Maybe
/** MessageFields item index. */
- itemIndex: Maybe
+ itemIndex: Maybe
/** MessageFields sku name. */
- skuName: Maybe
+ skuName: Maybe
}
export type MessageInfo = {
/** MessageInfo code. */
- code: Maybe
+ code: Maybe
/** MessageInfo fields. */
fields: Maybe
/** MessageInfo status. */
- status: Maybe
+ status: Maybe
/** MessageInfo text. */
- text: Maybe
+ text: Maybe
}
export type Mutation = {
@@ -375,56 +386,56 @@ export type MutationValidateCartArgs = {
}
export type MutationValidateSessionArgs = {
- search: Scalars['String']
+ search: Scalars['String']['input']
session: IStoreSession
}
/** Newsletter information. */
export type PersonNewsletter = {
/** Person's ID in the newsletter list. */
- id: Scalars['String']
+ id: Scalars['String']['output']
}
export type PickupAddress = {
/** PickupAddress address id. */
- addressId: Maybe
+ addressId: Maybe
/** PickupAddress address type. */
- addressType: Maybe
+ addressType: Maybe
/** PickupAddress city. */
- city: Maybe
+ city: Maybe
/** PickupAddress complement. */
- complement: Maybe
+ complement: Maybe
/** PickupAddress country. */
- country: Maybe
+ country: Maybe
/** PickupAddress geo coordinates. */
- geoCoordinates: Maybe>>
+ geoCoordinates: Maybe>>
/** PickupAddress neighborhood. */
- neighborhood: Maybe
+ neighborhood: Maybe
/** PickupAddress number. */
- number: Maybe
+ number: Maybe
/** PickupAddress postal code. */
- postalCode: Maybe
+ postalCode: Maybe
/** PickupAddress receiver name. */
- receiverName: Maybe
+ receiverName: Maybe
/** PickupAddress reference. */
- reference: Maybe
+ reference: Maybe
/** PickupAddress state. */
- state: Maybe
+ state: Maybe
/** PickupAddress street. */
- street: Maybe
+ street: Maybe
}
export type PickupStoreInfo = {
/** PickupStoreInfo additional information. */
- additionalInfo: Maybe
+ additionalInfo: Maybe
/** PickupStoreInfo address. */
address: Maybe
/** PickupStoreInfo dock id. */
- dockId: Maybe
+ dockId: Maybe
/** PickupStoreInfo friendly name. */
- friendlyName: Maybe
+ friendlyName: Maybe
/** Information if the store has pickup enable. */
- isPickupStore: Maybe
+ isPickupStore: Maybe
}
export type Query = {
@@ -447,17 +458,17 @@ export type Query = {
}
export type QueryAllCollectionsArgs = {
- after: InputMaybe
- first: Scalars['Int']
+ after: InputMaybe
+ first: Scalars['Int']['input']
}
export type QueryAllProductsArgs = {
- after: InputMaybe
- first: Scalars['Int']
+ after: InputMaybe
+ first: Scalars['Int']['input']
}
export type QueryCollectionArgs = {
- slug: Scalars['String']
+ slug: Scalars['String']['input']
}
export type QueryProductArgs = {
@@ -466,52 +477,52 @@ export type QueryProductArgs = {
export type QueryRedirectArgs = {
selectedFacets: InputMaybe>
- term: InputMaybe
+ term: InputMaybe
}
export type QuerySearchArgs = {
- after: InputMaybe
- first: Scalars['Int']
+ after: InputMaybe
+ first: Scalars['Int']['input']
selectedFacets: InputMaybe>
sort?: InputMaybe
- term?: InputMaybe
+ term?: InputMaybe
}
export type QuerySellersArgs = {
- country: Scalars['String']
+ country: Scalars['String']['input']
geoCoordinates: InputMaybe
- postalCode: InputMaybe
- salesChannel: InputMaybe
+ postalCode: InputMaybe
+ salesChannel: InputMaybe
}
export type QueryShippingArgs = {
- country: Scalars['String']
+ country: Scalars['String']['input']
items: Array
- postalCode: Scalars['String']
+ postalCode: Scalars['String']['input']
}
/** Search result. */
export type SearchMetadata = {
/** Indicates if the search term was misspelled. */
- isTermMisspelled: Scalars['Boolean']
+ isTermMisspelled: Scalars['Boolean']['output']
/** Logical operator used to run the search. */
- logicalOperator: Scalars['String']
+ logicalOperator: Scalars['String']['output']
}
/** Information of sellers. */
export type SellerInfo = {
/** Identification of the seller */
- id: Maybe
+ id: Maybe
/** Logo of the seller */
- logo: Maybe
+ logo: Maybe
/** Name of the seller */
- name: Maybe
+ name: Maybe
}
/** Regionalization with sellers information. */
export type SellersData = {
/** Identification of region. */
- id: Maybe
+ id: Maybe
/** List of sellers. */
sellers: Maybe>>
}
@@ -532,41 +543,41 @@ export type ShippingSla = {
/** ShippingSLA available delivery windows. */
availableDeliveryWindows: Maybe>>
/** ShippingSLA carrier. */
- carrier: Maybe
+ carrier: Maybe
/** ShippingSLA delivery channel. */
- deliveryChannel: Maybe
+ deliveryChannel: Maybe
/** List of ShippingSLA delivery ids. */
deliveryIds: Maybe>>
/** ShippingSLA friendly name. */
- friendlyName: Maybe
+ friendlyName: Maybe
/** ShippingSLA id. */
- id: Maybe
+ id: Maybe
/**
* ShippingSLA localized shipping estimate.
* Note: this will always return a localized string for locale `en-US`.
*/
- localizedEstimates: Maybe
+ localizedEstimates: Maybe
/** ShippingSLA name. */
- name: Maybe
+ name: Maybe
/** ShippingSLA pickup distance. */
- pickupDistance: Maybe
+ pickupDistance: Maybe
/** ShippingSLA pickup point id. */
- pickupPointId: Maybe
+ pickupPointId: Maybe
/** ShippingSLA pickup store info. */
pickupStoreInfo: Maybe
/** ShippingSLA price. */
- price: Maybe
+ price: Maybe
/** ShippingSLA shipping estimate. */
- shippingEstimate: Maybe
+ shippingEstimate: Maybe
/** ShippingSLA shipping estimate date. */
- shippingEstimateDate: Maybe
+ shippingEstimateDate: Maybe
}
export type SkuVariants = {
/** SKU property values for the current SKU. */
- activeVariations: Maybe
+ activeVariations: Maybe
/** All available options for each SKU variant property, indexed by their name. */
- allVariantsByName: Maybe
+ allVariantsByName: Maybe
/**
* Available options for each varying SKU property, taking into account the
* `dominantVariantName` property. Returns all available options for the
@@ -575,7 +586,7 @@ export type SkuVariants = {
* If `dominantVariantName` is not present, the first variant will be
* considered the dominant one.
*/
- availableVariations: Maybe
+ availableVariations: Maybe
/**
* Maps property value combinations to their respective SKU's slug. Enables
* us to retrieve the slug for the SKU that matches the currently selected
@@ -583,49 +594,49 @@ export type SkuVariants = {
* If `dominantVariantName` is not present, the first variant will be
* considered the dominant one.
*/
- slugsMap: Maybe
+ slugsMap: Maybe
}
export type SkuVariantsAvailableVariationsArgs = {
- dominantVariantName: InputMaybe
+ dominantVariantName: InputMaybe
}
export type SkuVariantsSlugsMapArgs = {
- dominantVariantName: InputMaybe
+ dominantVariantName: InputMaybe
}
/** Aggregate offer information, for a given SKU that is available to be fulfilled by multiple sellers. */
export type StoreAggregateOffer = {
/** Highest price among all sellers. */
- highPrice: Scalars['Float']
+ highPrice: Scalars['Float']['output']
/** Lowest price among all sellers. */
- lowPrice: Scalars['Float']
+ lowPrice: Scalars['Float']['output']
/** Number of sellers selling this SKU. */
- offerCount: Scalars['Int']
+ offerCount: Scalars['Int']['output']
/** Array with information on each available offer. */
offers: Array
/** ISO code of the currency used for the offer prices. */
- priceCurrency: Scalars['String']
+ priceCurrency: Scalars['String']['output']
}
/** Average rating, based on multiple ratings or reviews. */
export type StoreAggregateRating = {
/** Value of the aggregate rating. */
- ratingValue: Scalars['Float']
+ ratingValue: Scalars['Float']['output']
/** Total number of ratings. */
- reviewCount: Scalars['Int']
+ reviewCount: Scalars['Int']['output']
}
/** information about the author of a product review or rating. */
export type StoreAuthor = {
/** Author name. */
- name: Scalars['String']
+ name: Scalars['String']['output']
}
/** Brand of a given product. */
export type StoreBrand = {
/** Brand name. */
- name: Scalars['String']
+ name: Scalars['String']['output']
}
/** List of items consisting of chain linked web pages, ending with the current page. */
@@ -633,7 +644,7 @@ export type StoreBreadcrumbList = {
/** Array with breadcrumb elements. */
itemListElement: Array
/** Number of breadcrumbs in the list. */
- numberOfItems: Scalars['Int']
+ numberOfItems: Scalars['Int']['output']
}
/** Shopping cart information. */
@@ -649,7 +660,7 @@ export type StoreCartMessage = {
/** Shopping cart message status, which can be `INFO`, `WARNING` or `ERROR`. */
status: StoreStatus
/** Shopping cart message text. */
- text: Scalars['String']
+ text: Scalars['String']['output']
}
/** Product collection information. */
@@ -657,13 +668,13 @@ export type StoreCollection = {
/** List of items consisting of chain linked web pages, ending with the current page. */
breadcrumbList: StoreBreadcrumbList
/** Collection ID. */
- id: Scalars['ID']
+ id: Scalars['ID']['output']
/** Collection meta information. Used for search. */
meta: StoreCollectionMeta
/** Meta tag data. */
seo: StoreSeo
/** Corresponding collection URL slug, with which to retrieve this entity. */
- slug: Scalars['String']
+ slug: Scalars['String']['output']
/** Collection type. */
type: StoreCollectionType
}
@@ -679,7 +690,7 @@ export type StoreCollectionConnection = {
/** Each collection edge contains a `node`, with product collection information, and a `cursor`, that can be used as a reference for pagination. */
export type StoreCollectionEdge = {
/** Collection cursor. Used as pagination reference. */
- cursor: Scalars['String']
+ cursor: Scalars['String']['output']
/** Each collection node contains the information of a product collection returned by the query. */
node: StoreCollection
}
@@ -687,9 +698,9 @@ export type StoreCollectionEdge = {
/** Product collection facet, used for search. */
export type StoreCollectionFacet = {
/** Facet key. */
- key: Scalars['String']
+ key: Scalars['String']['output']
/** Facet value. */
- value: Scalars['String']
+ value: Scalars['String']['output']
}
/** Collection meta information. Used for search. */
@@ -716,17 +727,17 @@ export type StoreCollectionType =
/** Currency information. */
export type StoreCurrency = {
/** Currency code (e.g: USD). */
- code: Scalars['String']
+ code: Scalars['String']['output']
/** Currency symbol (e.g: $). */
- symbol: Scalars['String']
+ symbol: Scalars['String']['output']
}
/** Delivery mode information. */
export type StoreDeliveryMode = {
/** The delivery channel information of the session. */
- deliveryChannel: Scalars['String']
+ deliveryChannel: Scalars['String']['output']
/** The delivery method information of the session. */
- deliveryMethod: Scalars['String']
+ deliveryMethod: Scalars['String']['output']
/** The delivery window information of the session. */
deliveryWindow: Maybe
}
@@ -734,9 +745,9 @@ export type StoreDeliveryMode = {
/** Delivery window information. */
export type StoreDeliveryWindow = {
/** The delivery window end date information. */
- endDate: Scalars['String']
+ endDate: Scalars['String']['output']
/** The delivery window start date information. */
- startDate: Scalars['String']
+ startDate: Scalars['String']['output']
}
export type StoreFacet = StoreFacetBoolean | StoreFacetRange
@@ -744,9 +755,9 @@ export type StoreFacet = StoreFacetBoolean | StoreFacetRange
/** Search facet boolean information. */
export type StoreFacetBoolean = {
/** Facet key. */
- key: Scalars['String']
+ key: Scalars['String']['output']
/** Facet label. */
- label: Scalars['String']
+ label: Scalars['String']['output']
/** Array with information on each facet value. */
values: Array
}
@@ -754,9 +765,9 @@ export type StoreFacetBoolean = {
/** Search facet range information. */
export type StoreFacetRange = {
/** Facet key. */
- key: Scalars['String']
+ key: Scalars['String']['output']
/** Facet label. */
- label: Scalars['String']
+ label: Scalars['String']['output']
/** Maximum facet range value. */
max: StoreFacetValueRange
/** Minimum facet range value. */
@@ -773,71 +784,71 @@ export type StoreFacetType =
/** Information of a specific facet value. */
export type StoreFacetValueBoolean = {
/** Facet value label. */
- label: Scalars['String']
+ label: Scalars['String']['output']
/** Number of items with this facet. */
- quantity: Scalars['Int']
+ quantity: Scalars['Int']['output']
/** Indicates whether facet is selected. */
- selected: Scalars['Boolean']
+ selected: Scalars['Boolean']['output']
/** Facet value. */
- value: Scalars['String']
+ value: Scalars['String']['output']
}
/** Search facet range value information. Used for minimum and maximum range values. */
export type StoreFacetValueRange = {
/** Search facet range absolute value. */
- absolute: Scalars['Float']
+ absolute: Scalars['Float']['output']
/** Search facet range selected value. */
- selected: Scalars['Float']
+ selected: Scalars['Float']['output']
}
/** Geographic coordinates information. */
export type StoreGeoCoordinates = {
/** The latitude of the geographic coordinates. */
- latitude: Scalars['Float']
+ latitude: Scalars['Float']['output']
/** The longitude of the geographic coordinates. */
- longitude: Scalars['Float']
+ longitude: Scalars['Float']['output']
}
/** Image. */
export type StoreImage = {
/** Alias for the image. */
- alternateName: Scalars['String']
+ alternateName: Scalars['String']['output']
/** Image URL. */
- url: Scalars['String']
+ url: Scalars['String']['output']
}
/** Item of a list. */
export type StoreListItem = {
/** List item value. */
- item: Scalars['String']
+ item: Scalars['String']['output']
/** Name of the list item. */
- name: Scalars['String']
+ name: Scalars['String']['output']
/** Position of the item in the list. */
- position: Scalars['Int']
+ position: Scalars['Int']['output']
}
/** Offer information. */
export type StoreOffer = {
/** Offer item availability. */
- availability: Scalars['String']
+ availability: Scalars['String']['output']
/** Offer item condition. */
- itemCondition: Scalars['String']
+ itemCondition: Scalars['String']['output']
/** Information on the item being offered. */
itemOffered: StoreProduct
/** This is displayed as the "from" price in the context of promotions' price comparison. This may change before it reaches the shelf. */
- listPrice: Scalars['Float']
+ listPrice: Scalars['Float']['output']
/** Also known as spot price. */
- price: Scalars['Float']
+ price: Scalars['Float']['output']
/** ISO code of the currency used for the offer prices. */
- priceCurrency: Scalars['String']
+ priceCurrency: Scalars['String']['output']
/** Next date in which price is scheduled to change. If there is no scheduled change, this will be set a year in the future from current time. */
- priceValidUntil: Scalars['String']
+ priceValidUntil: Scalars['String']['output']
/** Number of items offered. */
- quantity: Scalars['Int']
+ quantity: Scalars['Int']['output']
/** Seller responsible for the offer. */
seller: StoreOrganization
/** Computed price before applying coupons, taxes or benefits. This may change before it reaches the shelf. */
- sellingPrice: Scalars['Float']
+ sellingPrice: Scalars['Float']['output']
}
/** Information of a specific order. */
@@ -845,39 +856,39 @@ export type StoreOrder = {
/** Array with information on each accepted offer. */
acceptedOffer: Array
/** ID of the order in [VTEX order management](https://help.vtex.com/en/tutorial/license-manager-resources-oms--60QcBsvWeum02cFi3GjBzg#). */
- orderNumber: Scalars['String']
+ orderNumber: Scalars['String']['output']
}
/** Organization. */
export type StoreOrganization = {
/** Organization ID. */
- identifier: Scalars['String']
+ identifier: Scalars['String']['output']
}
/** Whenever you make a query that allows for pagination, such as `allProducts` or `allCollections`, you can check `StorePageInfo` to learn more about the complete set of items and use it to paginate your queries. */
export type StorePageInfo = {
/** Cursor corresponding to the last possible item. */
- endCursor: Scalars['String']
+ endCursor: Scalars['String']['output']
/** Indicates whether there is at least one more page with items after the ones returned in the current query. */
- hasNextPage: Scalars['Boolean']
+ hasNextPage: Scalars['Boolean']['output']
/** Indicates whether there is at least one more page with items before the ones returned in the current query. */
- hasPreviousPage: Scalars['Boolean']
+ hasPreviousPage: Scalars['Boolean']['output']
/** Cursor corresponding to the first possible item. */
- startCursor: Scalars['String']
+ startCursor: Scalars['String']['output']
/** Total number of items (products or collections), not pages. */
- totalCount: Scalars['Int']
+ totalCount: Scalars['Int']['output']
}
/** Client profile data. */
export type StorePerson = {
/** Client email. */
- email: Scalars['String']
+ email: Scalars['String']['output']
/** Client last name. */
- familyName: Scalars['String']
+ familyName: Scalars['String']['output']
/** Client first name. */
- givenName: Scalars['String']
+ givenName: Scalars['String']['output']
/** Client ID. */
- id: Scalars['String']
+ id: Scalars['String']['output']
}
/** Product information. Products are variants within product groups, equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on. */
@@ -891,29 +902,29 @@ export type StoreProduct = {
/** List of items consisting of chain linked web pages, ending with the current page. */
breadcrumbList: StoreBreadcrumbList
/** Product description. */
- description: Scalars['String']
+ description: Scalars['String']['output']
/** Global Trade Item Number. */
- gtin: Scalars['String']
+ gtin: Scalars['String']['output']
/** Array of images. */
image: Array
/** Indicates product group related to this product. */
isVariantOf: StoreProductGroup
/** Product name. */
- name: Scalars['String']
+ name: Scalars['String']['output']
/** Aggregate offer information. */
offers: StoreAggregateOffer
/** Product ID, such as [ISBN](https://www.isbn-international.org/content/what-isbn) or similar global IDs. */
- productID: Scalars['String']
+ productID: Scalars['String']['output']
/** The product's release date. Formatted using https://en.wikipedia.org/wiki/ISO_8601 */
- releaseDate: Scalars['String']
+ releaseDate: Scalars['String']['output']
/** Array with review information. */
review: Array
/** Meta tag data. */
seo: StoreSeo
/** Stock Keeping Unit. Merchant-specific ID for the product. */
- sku: Scalars['String']
+ sku: Scalars['String']['output']
/** Corresponding collection URL slug, with which to retrieve this entity. */
- slug: Scalars['String']
+ slug: Scalars['String']['output']
}
/** Product connections, including pagination information and products returned by the query. */
@@ -927,7 +938,7 @@ export type StoreProductConnection = {
/** Each product edge contains a `node`, with product information, and a `cursor`, that can be used as a reference for pagination. */
export type StoreProductEdge = {
/** Product cursor. Used as pagination reference. */
- cursor: Scalars['String']
+ cursor: Scalars['String']['output']
/** Each product node contains the information of a product returned by the query. */
node: StoreProduct
}
@@ -939,9 +950,9 @@ export type StoreProductGroup = {
/** Array of variants related to product group. Variants are equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). */
hasVariant: Array
/** Product group name. */
- name: Scalars['String']
+ name: Scalars['String']['output']
/** Product group ID. */
- productGroupID: Scalars['String']
+ productGroupID: Scalars['String']['output']
/**
* Object containing data structures to facilitate handling different SKU
* variant properties. Specially useful for implementing SKU selection
@@ -953,13 +964,13 @@ export type StoreProductGroup = {
/** Properties that can be associated with products and products groups. */
export type StorePropertyValue = {
/** Property name. */
- name: Scalars['String']
+ name: Scalars['String']['output']
/** Property id. This propert changes according to the content of the object. */
- propertyID: Scalars['String']
+ propertyID: Scalars['String']['output']
/** Property value. May hold a string or the string representation of an object. */
- value: Scalars['ObjectOrString']
+ value: Scalars['ObjectOrString']['output']
/** Specifies the nature of the value */
- valueReference: Scalars['String']
+ valueReference: Scalars['String']['output']
}
/**
@@ -968,7 +979,7 @@ export type StorePropertyValue = {
*/
export type StoreRedirect = {
/** URL to redirect */
- url: Maybe
+ url: Maybe
}
/** Information of a given review. */
@@ -982,9 +993,9 @@ export type StoreReview = {
/** Information of a given review rating. */
export type StoreReviewRating = {
/** Best rating value. */
- bestRating: Scalars['Float']
+ bestRating: Scalars['Float']['output']
/** Rating value. */
- ratingValue: Scalars['Float']
+ ratingValue: Scalars['Float']['output']
}
/** Search result. */
@@ -1002,23 +1013,23 @@ export type StoreSearchResult = {
/** Search Engine Optimization (SEO) tags data. */
export type StoreSeo = {
/** Canonical tag. */
- canonical: Scalars['String']
+ canonical: Scalars['String']['output']
/** Description tag. */
- description: Scalars['String']
+ description: Scalars['String']['output']
/** Title tag. */
- title: Scalars['String']
+ title: Scalars['String']['output']
/** Title template tag. */
- titleTemplate: Scalars['String']
+ titleTemplate: Scalars['String']['output']
}
/** Session information. */
export type StoreSession = {
/** Session address type. */
- addressType: Maybe
+ addressType: Maybe
/** Session channel. */
- channel: Maybe
+ channel: Maybe
/** Session country. */
- country: Scalars['String']
+ country: Scalars['String']['output']
/** Session currency. */
currency: StoreCurrency
/** Session delivery mode. */
@@ -1026,11 +1037,11 @@ export type StoreSession = {
/** Session input geoCoordinates. */
geoCoordinates: Maybe
/** Session locale. */
- locale: Scalars['String']
+ locale: Scalars['String']['output']
/** Session input person. */
person: Maybe
/** Session postal code. */
- postalCode: Maybe
+ postalCode: Maybe
}
/** Product search results sorting options. */
@@ -1058,9 +1069,9 @@ export type StoreStatus = 'ERROR' | 'INFO' | 'WARNING'
/** Suggestion term. */
export type StoreSuggestionTerm = {
/** Its occurrences count. */
- count: Scalars['Int']
+ count: Scalars['Int']['output']
/** The term. */
- value: Scalars['String']
+ value: Scalars['String']['output']
}
/** Suggestions information. */
@@ -1092,7 +1103,7 @@ export type ProductSummary_ProductFragment = {
}
}
-export type Filter_Facets_StoreFacetBoolean_Fragment = {
+type Filter_Facets_StoreFacetBoolean_Fragment = {
__typename: 'StoreFacetBoolean'
key: string
label: string
@@ -1104,7 +1115,7 @@ export type Filter_Facets_StoreFacetBoolean_Fragment = {
}>
}
-export type Filter_Facets_StoreFacetRange_Fragment = {
+type Filter_Facets_StoreFacetRange_Fragment = {
__typename: 'StoreFacetRange'
key: string
label: string
@@ -1177,7 +1188,7 @@ export type ServerCollectionPageFragment = { collection: { id: string } }
export type ServerProductFragment = { product: { id: string } }
export type ServerCollectionPageQueryQueryVariables = Exact<{
- slug: Scalars['String']
+ slug: Scalars['String']['input']
}>
export type ServerCollectionPageQueryQuery = {
@@ -1346,10 +1357,10 @@ export type SubscribeToNewsletterMutation = {
}
export type ClientManyProductsQueryQueryVariables = Exact<{
- first: Scalars['Int']
- after: InputMaybe
+ first: Scalars['Int']['input']
+ after: InputMaybe
sort: StoreSort
- term: Scalars['String']
+ term: Scalars['String']['input']
selectedFacets: Array | IStoreSelectedFacet
}>
@@ -1383,16 +1394,11 @@ export type ClientManyProductsQueryQuery = {
}
}
-export type SearchEvent_MetadataFragment = {
- isTermMisspelled: boolean
- logicalOperator: string
-}
-
export type ClientProductGalleryQueryQueryVariables = Exact<{
- first: Scalars['Int']
- after: Scalars['String']
+ first: Scalars['Int']['input']
+ after: Scalars['String']['input']
sort: StoreSort
- term: Scalars['String']
+ term: Scalars['String']['input']
selectedFacets: Array | IStoreSelectedFacet
}>
@@ -1423,6 +1429,11 @@ export type ClientProductGalleryQueryQuery = {
}
}
+export type SearchEvent_MetadataFragment = {
+ isTermMisspelled: boolean
+ logicalOperator: string
+}
+
export type ClientProductQueryQueryVariables = Exact<{
locator: Array | IStoreSelectedFacet
}>
@@ -1464,7 +1475,7 @@ export type ClientProductQueryQuery = {
}
export type ClientSearchSuggestionsQueryQueryVariables = Exact<{
- term: Scalars['String']
+ term: Scalars['String']['input']
selectedFacets: InputMaybe | IStoreSelectedFacet>
}>
@@ -1499,7 +1510,7 @@ export type ClientSearchSuggestionsQueryQuery = {
}
export type ClientTopSearchSuggestionsQueryQueryVariables = Exact<{
- term: Scalars['String']
+ term: Scalars['String']['input']
selectedFacets: InputMaybe | IStoreSelectedFacet>
}>
@@ -1509,7 +1520,7 @@ export type ClientTopSearchSuggestionsQueryQuery = {
export type ValidateSessionMutationVariables = Exact<{
session: IStoreSession
- search: Scalars['String']
+ search: Scalars['String']['input']
}>
export type ValidateSessionMutation = {
@@ -1536,8 +1547,8 @@ export type ValidateSessionMutation = {
}
export type ClientShippingSimulationQueryQueryVariables = Exact<{
- postalCode: Scalars['String']
- country: Scalars['String']
+ postalCode: Scalars['String']['input']
+ country: Scalars['String']['input']
items: Array | IShippingItem
}>
@@ -1564,3 +1575,458 @@ export type ClientShippingSimulationQueryQuery = {
} | null
} | null
}
+
+export class TypedDocumentString
+ extends String
+ implements DocumentTypeDecoration
+{
+ __apiType?: DocumentTypeDecoration['__apiType']
+
+ constructor(private value: string, public __meta__?: Record) {
+ super(value)
+ }
+
+ toString(): string & DocumentTypeDecoration {
+ return this.value
+ }
+}
+export const ProductSummary_ProductFragmentDoc = new TypedDocumentString(
+ `
+ fragment ProductSummary_product on StoreProduct {
+ id: productID
+ slug
+ sku
+ brand {
+ brandName: name
+ }
+ name
+ gtin
+ isVariantOf {
+ productGroupID
+ name
+ }
+ image {
+ url
+ alternateName
+ }
+ brand {
+ name
+ }
+ offers {
+ lowPrice
+ offers {
+ availability
+ price
+ listPrice
+ quantity
+ seller {
+ identifier
+ }
+ }
+ }
+}
+ `,
+ { fragmentName: 'ProductSummary_product' }
+) as unknown as TypedDocumentString
+export const Filter_FacetsFragmentDoc = new TypedDocumentString(
+ `
+ fragment Filter_facets on StoreFacet {
+ ... on StoreFacetRange {
+ key
+ label
+ min {
+ selected
+ absolute
+ }
+ max {
+ selected
+ absolute
+ }
+ __typename
+ }
+ ... on StoreFacetBoolean {
+ key
+ label
+ values {
+ label
+ value
+ selected
+ quantity
+ }
+ __typename
+ }
+}
+ `,
+ { fragmentName: 'Filter_facets' }
+) as unknown as TypedDocumentString
+export const CartProductItemFragmentDoc = new TypedDocumentString(
+ `
+ fragment CartProductItem on StoreProduct {
+ sku
+ name
+ image {
+ url
+ alternateName
+ }
+ brand {
+ name
+ }
+ isVariantOf {
+ productGroupID
+ name
+ skuVariants {
+ activeVariations
+ slugsMap
+ availableVariations
+ }
+ }
+ gtin
+ additionalProperty {
+ propertyID
+ name
+ value
+ valueReference
+ }
+}
+ `,
+ { fragmentName: 'CartProductItem' }
+) as unknown as TypedDocumentString
+export const ProductDetailsFragment_ProductFragmentDoc =
+ new TypedDocumentString(
+ `
+ fragment ProductDetailsFragment_product on StoreProduct {
+ id: productID
+ sku
+ name
+ gtin
+ description
+ isVariantOf {
+ name
+ productGroupID
+ skuVariants {
+ activeVariations
+ slugsMap
+ availableVariations
+ }
+ }
+ image {
+ url
+ alternateName
+ }
+ brand {
+ name
+ }
+ offers {
+ lowPrice
+ offers {
+ availability
+ price
+ listPrice
+ seller {
+ identifier
+ }
+ }
+ }
+ ...CartProductItem
+}
+ fragment CartProductItem on StoreProduct {
+ sku
+ name
+ image {
+ url
+ alternateName
+ }
+ brand {
+ name
+ }
+ isVariantOf {
+ productGroupID
+ name
+ skuVariants {
+ activeVariations
+ slugsMap
+ availableVariations
+ }
+ }
+ gtin
+ additionalProperty {
+ propertyID
+ name
+ value
+ valueReference
+ }
+}`,
+ { fragmentName: 'ProductDetailsFragment_product' }
+ ) as unknown as TypedDocumentString<
+ ProductDetailsFragment_ProductFragment,
+ unknown
+ >
+export const ClientManyProductsFragmentDoc = new TypedDocumentString(
+ `
+ fragment ClientManyProducts on Query {
+ search(
+ first: $first
+ after: $after
+ sort: $sort
+ term: $term
+ selectedFacets: $selectedFacets
+ ) {
+ products {
+ pageInfo {
+ totalCount
+ }
+ }
+ }
+}
+ `,
+ { fragmentName: 'ClientManyProducts' }
+) as unknown as TypedDocumentString
+export const ClientProductFragmentDoc = new TypedDocumentString(
+ `
+ fragment ClientProduct on Query {
+ product(locator: $locator) {
+ id: productID
+ }
+}
+ `,
+ { fragmentName: 'ClientProduct' }
+) as unknown as TypedDocumentString
+export const ClientProductGalleryFragmentDoc = new TypedDocumentString(
+ `
+ fragment ClientProductGallery on Query {
+ search(
+ first: $first
+ after: $after
+ sort: $sort
+ term: $term
+ selectedFacets: $selectedFacets
+ ) {
+ products {
+ pageInfo {
+ totalCount
+ }
+ }
+ }
+}
+ `,
+ { fragmentName: 'ClientProductGallery' }
+) as unknown as TypedDocumentString
+export const ClientSearchSuggestionsFragmentDoc = new TypedDocumentString(
+ `
+ fragment ClientSearchSuggestions on Query {
+ search(first: 5, term: $term, selectedFacets: $selectedFacets) {
+ suggestions {
+ terms {
+ value
+ }
+ }
+ }
+}
+ `,
+ { fragmentName: 'ClientSearchSuggestions' }
+) as unknown as TypedDocumentString
+export const ClientShippingSimulationFragmentDoc = new TypedDocumentString(
+ `
+ fragment ClientShippingSimulation on Query {
+ shipping(items: $items, postalCode: $postalCode, country: $country) {
+ address {
+ city
+ }
+ }
+}
+ `,
+ { fragmentName: 'ClientShippingSimulation' }
+) as unknown as TypedDocumentString
+export const ClientTopSearchSuggestionsFragmentDoc = new TypedDocumentString(
+ `
+ fragment ClientTopSearchSuggestions on Query {
+ search(first: 5, term: $term, selectedFacets: $selectedFacets) {
+ suggestions {
+ terms {
+ value
+ }
+ }
+ }
+}
+ `,
+ { fragmentName: 'ClientTopSearchSuggestions' }
+) as unknown as TypedDocumentString
+export const ServerCollectionPageFragmentDoc = new TypedDocumentString(
+ `
+ fragment ServerCollectionPage on Query {
+ collection(slug: $slug) {
+ id
+ }
+}
+ `,
+ { fragmentName: 'ServerCollectionPage' }
+) as unknown as TypedDocumentString
+export const ServerProductFragmentDoc = new TypedDocumentString(
+ `
+ fragment ServerProduct on Query {
+ product(locator: $locator) {
+ id: productID
+ }
+}
+ `,
+ { fragmentName: 'ServerProduct' }
+) as unknown as TypedDocumentString
+export const CartMessageFragmentDoc = new TypedDocumentString(
+ `
+ fragment CartMessage on StoreCartMessage {
+ text
+ status
+}
+ `,
+ { fragmentName: 'CartMessage' }
+) as unknown as TypedDocumentString
+export const CartItemFragmentDoc = new TypedDocumentString(
+ `
+ fragment CartItem on StoreOffer {
+ seller {
+ identifier
+ }
+ quantity
+ price
+ listPrice
+ itemOffered {
+ ...CartProductItem
+ }
+}
+ fragment CartProductItem on StoreProduct {
+ sku
+ name
+ image {
+ url
+ alternateName
+ }
+ brand {
+ name
+ }
+ isVariantOf {
+ productGroupID
+ name
+ skuVariants {
+ activeVariations
+ slugsMap
+ availableVariations
+ }
+ }
+ gtin
+ additionalProperty {
+ propertyID
+ name
+ value
+ valueReference
+ }
+}`,
+ { fragmentName: 'CartItem' }
+) as unknown as TypedDocumentString