From 29d16512890fa27fed8e17f3eb2fbfe02b83202d Mon Sep 17 00:00:00 2001 From: Michelle Chen Date: Thu, 4 Jul 2024 11:02:58 -0400 Subject: [PATCH] update dosc to 2024-07 --- examples/b2b/README.md | 22 +- examples/infinite-scroll/README.md | 2 +- .../docs/generated/generated_docs_data.json | 30 +- .../generated/generated_static_pages.json | 2 +- .../docs/staticPages/hydrogenReact.doc.ts | 2 +- .../hydrogen-react/src/CartLineProvider.tsx | 2 +- .../src/CartProvider.stories.tsx | 2 +- packages/hydrogen-react/src/CartProvider.tsx | 4 +- packages/hydrogen-react/src/Image.tsx | 2 +- packages/hydrogen-react/src/ModelViewer.tsx | 2 +- packages/hydrogen-react/src/Money.tsx | 2 +- .../src/ShopifyProvider.test.tsx | 6 +- packages/hydrogen-react/src/Video.tsx | 2 +- .../hydrogen-react/src/codegen.helpers.ts | 4 +- .../src/useCartAPIStateMachine.tsx | 4 +- .../hydrogen-react/src/useCartActions.tsx | 4 +- packages/hydrogen/CHANGELOG.md | 2 +- .../docs/generated/generated_docs_data.json | 278 +++++++++--------- packages/hydrogen/docs/typeOverride.json | 22 +- .../AnalyticsProvider.doc.ts | 2 +- .../analytics-manager/AnalyticsProvider.tsx | 6 +- .../analytics-manager/getShopAnalytics.doc.ts | 2 +- .../src/analytics-manager/useAnalytics.doc.ts | 2 +- .../src/cart/createCartHandler.doc.ts | 2 +- .../hydrogen/src/cart/createCartHandler.ts | 8 +- .../cart/optimistic/useOptimisticCart.doc.ts | 2 +- .../cartAttributesUpdateDefault.doc.ts | 2 +- .../cartBuyerIdentityUpdateDefault.doc.ts | 2 +- .../src/cart/queries/cartCreateDefault.doc.ts | 2 +- .../cart/queries/cartLinesAddDefault.doc.ts | 2 +- .../queries/cartLinesUpdateDefault.doc.ts | 2 +- .../queries/cartMetafieldDeleteDefault.ts | 2 +- .../queries/cartMetafieldsSetDefault.doc.ts | 2 +- ...electedDeliveryOptionsUpdateDefault.doc.ts | 2 +- .../src/createStorefrontClient.doc.ts | 12 +- packages/hydrogen/src/csp/Script.doc.ts | 4 +- .../csp/createContentSecurityPolicy.doc.ts | 4 +- packages/hydrogen/src/csp/useNonce.doc.ts | 4 +- .../hydrogen/src/customer/customer.doc.ts | 2 +- .../hydrogen/src/pagination/Pagination.doc.ts | 2 +- .../pagination/getPaginationVariables.doc.ts | 2 +- .../src/product/VariantSelector.doc.ts | 2 +- .../hydrogen/src/product/VariantSelector.ts | 4 +- .../product/getSelectedProductOptions.doc.ts | 4 +- .../src/product/useOptimisticProduct.doc.ts | 4 +- packages/hydrogen/src/routing/redirect.ts | 2 +- packages/hydrogen/src/storefront.ts | 20 +- 47 files changed, 250 insertions(+), 250 deletions(-) diff --git a/examples/b2b/README.md b/examples/b2b/README.md index daed7a866c..5c054ee08e 100644 --- a/examples/b2b/README.md +++ b/examples/b2b/README.md @@ -5,7 +5,7 @@ This is an example implementation of a B2B storefront using Hydrogen. It includes the following high level changes. -1. Retrieving company location data from a logged in customer using the [Customer Account API](https://shopify.dev/docs/api/customer/2024-04/queries/customer) +1. Retrieving company location data from a logged in customer using the [Customer Account API](https://shopify.dev/docs/api/customer/2024-07/queries/customer) 2. Displaying a list of company locations and setting a `companyLocationId` in session 3. Using a storefront `customerAccessToken` and `companyLocationId` to update cart and get B2B specific rules and pricing such as [volume pricing and quantity rules](https://help.shopify.com/en/manual/b2b/catalogs/quantity-pricing) 4. Using a storefront `customerAccessToken` and `companyLocationId` to [contextualize queries](https://shopify.dev/docs/api/storefront#directives) using the `buyer` argument on the product display page @@ -31,15 +31,15 @@ npm create @shopify/hydrogen@latest -- --template b2b This folder contains the minimal set of files needed to showcase the implementation. Not all queries where contextualized for B2B. `app/routes/products.$handle.tsx` provides -reference on how to contextualize storefront queries. Files that aren’t included by default +reference on how to contextualize storefront queries. Files that aren’t included by default with Hydrogen and that you’ll need to create are labeled with 🆕. -| File | Description | -| ---------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| [`app/routes/b2blocations.tsx`](app/routes/b2blocations.tsx) | Includes a customer query to get B2B data. Set `companyLocationId` in session if there is only one location available to buy for the customer | -| [`app/components/B2BLocationProvider.tsx`](app/components/B2BLocationProvider.tsx) | Provides context on if the current logged in customer is a B2B customer and keeping track of the location modal open status. | -| 🆕 [`app/graphql/CustomerLocationsQuery.ts`](app/graphql/CustomerLocationsQuery.ts) | Customer query to fetch company locations | -| 🆕 [`app/components/B2BLocationSelector.tsx`](app/components/B2BLocationSelector.tsx) | Component to choose a Company location to buy for. Rendered if there is no `companyLocationId` set in session | -| [`app/routes/products.$handle.tsx`](app/routes/products.$handle.tsx) | Added buyer context to the product and product varient queries. Includes logic and components to display quantity rules and quantity price breaks | -| 🆕 [`app/components/PriceBreaks.tsx`](app/components/PriceBreaks.tsx) | Component rendered on the product page to highlight quantity price breaks | -| 🆕 [`app/components/QuantityRules.tsx`](app/components/QuantityRules.tsx) | Component rendered on the product page to highlight quantity rules | +| File | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| [`app/routes/b2blocations.tsx`](app/routes/b2blocations.tsx) | Includes a customer query to get B2B data. Set `companyLocationId` in session if there is only one location available to buy for the customer | +| [`app/components/B2BLocationProvider.tsx`](app/components/B2BLocationProvider.tsx) | Provides context on if the current logged in customer is a B2B customer and keeping track of the location modal open status. | +| 🆕 [`app/graphql/CustomerLocationsQuery.ts`](app/graphql/CustomerLocationsQuery.ts) | Customer query to fetch company locations | +| 🆕 [`app/components/B2BLocationSelector.tsx`](app/components/B2BLocationSelector.tsx) | Component to choose a Company location to buy for. Rendered if there is no `companyLocationId` set in session | +| [`app/routes/products.$handle.tsx`](app/routes/products.$handle.tsx) | Added buyer context to the product and product varient queries. Includes logic and components to display quantity rules and quantity price breaks | +| 🆕 [`app/components/PriceBreaks.tsx`](app/components/PriceBreaks.tsx) | Component rendered on the product page to highlight quantity price breaks | +| 🆕 [`app/components/QuantityRules.tsx`](app/components/QuantityRules.tsx) | Component rendered on the product page to highlight quantity rules | diff --git a/examples/infinite-scroll/README.md b/examples/infinite-scroll/README.md index 0c003f17e9..912e219358 100644 --- a/examples/infinite-scroll/README.md +++ b/examples/infinite-scroll/README.md @@ -1,6 +1,6 @@ # Hydrogen example: infinite scroll collection page -This folder contains an example implementation of [infinite scroll](https://shopify.dev/docs/custom-storefronts/hydrogen/data-fetching/pagination#automatically-load-pages-on-scroll) within a product collection page using the [Pagination component](https://shopify.dev/docs/api/hydrogen/2024-04/components/pagination). +This folder contains an example implementation of [infinite scroll](https://shopify.dev/docs/custom-storefronts/hydrogen/data-fetching/pagination#automatically-load-pages-on-scroll) within a product collection page using the [Pagination component](https://shopify.dev/docs/api/hydrogen/2024-07/components/pagination). The example uses [`react-intersection-observer`](https://www.npmjs.com/package/react-intersection-observer) to detect when the `Load more` button is in view. A `useEffect` then triggers a navigation to the next page url, which seamlessly loads more products as the user scrolls. diff --git a/packages/hydrogen-react/docs/generated/generated_docs_data.json b/packages/hydrogen-react/docs/generated/generated_docs_data.json index a2e12a20e2..e3cf24fb52 100644 --- a/packages/hydrogen-react/docs/generated/generated_docs_data.json +++ b/packages/hydrogen-react/docs/generated/generated_docs_data.json @@ -384,7 +384,7 @@ "syntaxKind": "PropertySignature", "name": "measurement", "value": "PartialDeep", - "description": "A [UnitPriceMeasurement object](https://shopify.dev/api/storefront/2024-04/objects/unitpricemeasurement).", + "description": "A [UnitPriceMeasurement object](https://shopify.dev/api/storefront/2024-07/objects/unitpricemeasurement).", "isOptional": true }, { @@ -647,7 +647,7 @@ "filePath": "/CartProvider.tsx", "syntaxKind": "TypeAliasDeclaration", "name": "CartProviderProps", - "value": "{\n /** Any `ReactNode` elements. */\n children: React.ReactNode;\n /** Maximum number of cart lines to fetch. Defaults to 250 cart lines. */\n numCartLines?: number;\n /** A callback that is invoked when the process to create a cart begins, but before the cart is created in the Storefront API. */\n onCreate?: () => void;\n /** A callback that is invoked when the process to add a line item to the cart begins, but before the line item is added to the Storefront API. */\n onLineAdd?: () => void;\n /** A callback that is invoked when the process to remove a line item to the cart begins, but before the line item is removed from the Storefront API. */\n onLineRemove?: () => void;\n /** A callback that is invoked when the process to update a line item in the cart begins, but before the line item is updated in the Storefront API. */\n onLineUpdate?: () => void;\n /** A callback that is invoked when the process to add or update a note in the cart begins, but before the note is added or updated in the Storefront API. */\n onNoteUpdate?: () => void;\n /** A callback that is invoked when the process to update the buyer identity begins, but before the buyer identity is updated in the Storefront API. */\n onBuyerIdentityUpdate?: () => void;\n /** A callback that is invoked when the process to update the cart attributes begins, but before the attributes are updated in the Storefront API. */\n onAttributesUpdate?: () => void;\n /** A callback that is invoked when the process to update the cart discount codes begins, but before the discount codes are updated in the Storefront API. */\n onDiscountCodesUpdate?: () => void;\n /** A callback that is invoked when the process to create a cart completes */\n onCreateComplete?: () => void;\n /** A callback that is invoked when the process to add a line item to the cart completes */\n onLineAddComplete?: () => void;\n /** A callback that is invoked when the process to remove a line item to the cart completes */\n onLineRemoveComplete?: () => void;\n /** A callback that is invoked when the process to update a line item in the cart completes */\n onLineUpdateComplete?: () => void;\n /** A callback that is invoked when the process to add or update a note in the cart completes */\n onNoteUpdateComplete?: () => void;\n /** A callback that is invoked when the process to update the buyer identity completes */\n onBuyerIdentityUpdateComplete?: () => void;\n /** A callback that is invoked when the process to update the cart attributes completes */\n onAttributesUpdateComplete?: () => void;\n /** A callback that is invoked when the process to update the cart discount codes completes */\n onDiscountCodesUpdateComplete?: () => void;\n /** An object with fields that correspond to the Storefront API's [Cart object](https://shopify.dev/api/storefront/2024-04/objects/cart). */\n data?: PartialDeep;\n /** A fragment used to query the Storefront API's [Cart object](https://shopify.dev/api/storefront/2024-04/objects/cart) for all queries and mutations. A default value is used if no argument is provided. */\n cartFragment?: string;\n /** A customer access token that's accessible on the server if there's a customer login. */\n customerAccessToken?: CartBuyerIdentityInput['customerAccessToken'];\n /** The ISO country code for i18n. */\n countryCode?: CountryCode;\n /** The ISO luanguage code for i18n. */\n languageCode?: LanguageCode;\n}", + "value": "{\n /** Any `ReactNode` elements. */\n children: React.ReactNode;\n /** Maximum number of cart lines to fetch. Defaults to 250 cart lines. */\n numCartLines?: number;\n /** A callback that is invoked when the process to create a cart begins, but before the cart is created in the Storefront API. */\n onCreate?: () => void;\n /** A callback that is invoked when the process to add a line item to the cart begins, but before the line item is added to the Storefront API. */\n onLineAdd?: () => void;\n /** A callback that is invoked when the process to remove a line item to the cart begins, but before the line item is removed from the Storefront API. */\n onLineRemove?: () => void;\n /** A callback that is invoked when the process to update a line item in the cart begins, but before the line item is updated in the Storefront API. */\n onLineUpdate?: () => void;\n /** A callback that is invoked when the process to add or update a note in the cart begins, but before the note is added or updated in the Storefront API. */\n onNoteUpdate?: () => void;\n /** A callback that is invoked when the process to update the buyer identity begins, but before the buyer identity is updated in the Storefront API. */\n onBuyerIdentityUpdate?: () => void;\n /** A callback that is invoked when the process to update the cart attributes begins, but before the attributes are updated in the Storefront API. */\n onAttributesUpdate?: () => void;\n /** A callback that is invoked when the process to update the cart discount codes begins, but before the discount codes are updated in the Storefront API. */\n onDiscountCodesUpdate?: () => void;\n /** A callback that is invoked when the process to create a cart completes */\n onCreateComplete?: () => void;\n /** A callback that is invoked when the process to add a line item to the cart completes */\n onLineAddComplete?: () => void;\n /** A callback that is invoked when the process to remove a line item to the cart completes */\n onLineRemoveComplete?: () => void;\n /** A callback that is invoked when the process to update a line item in the cart completes */\n onLineUpdateComplete?: () => void;\n /** A callback that is invoked when the process to add or update a note in the cart completes */\n onNoteUpdateComplete?: () => void;\n /** A callback that is invoked when the process to update the buyer identity completes */\n onBuyerIdentityUpdateComplete?: () => void;\n /** A callback that is invoked when the process to update the cart attributes completes */\n onAttributesUpdateComplete?: () => void;\n /** A callback that is invoked when the process to update the cart discount codes completes */\n onDiscountCodesUpdateComplete?: () => void;\n /** An object with fields that correspond to the Storefront API's [Cart object](https://shopify.dev/api/storefront/2024-07/objects/cart). */\n data?: PartialDeep;\n /** A fragment used to query the Storefront API's [Cart object](https://shopify.dev/api/storefront/2024-07/objects/cart) for all queries and mutations. A default value is used if no argument is provided. */\n cartFragment?: string;\n /** A customer access token that's accessible on the server if there's a customer login. */\n customerAccessToken?: CartBuyerIdentityInput['customerAccessToken'];\n /** The ISO country code for i18n. */\n countryCode?: CountryCode;\n /** The ISO luanguage code for i18n. */\n languageCode?: LanguageCode;\n}", "description": "", "members": [ { @@ -798,7 +798,7 @@ "syntaxKind": "PropertySignature", "name": "data", "value": "PartialDeep", - "description": "An object with fields that correspond to the Storefront API's [Cart object](https://shopify.dev/api/storefront/2024-04/objects/cart).", + "description": "An object with fields that correspond to the Storefront API's [Cart object](https://shopify.dev/api/storefront/2024-07/objects/cart).", "isOptional": true }, { @@ -806,7 +806,7 @@ "syntaxKind": "PropertySignature", "name": "cartFragment", "value": "string", - "description": "A fragment used to query the Storefront API's [Cart object](https://shopify.dev/api/storefront/2024-04/objects/cart) for all queries and mutations. A default value is used if no argument is provided.", + "description": "A fragment used to query the Storefront API's [Cart object](https://shopify.dev/api/storefront/2024-07/objects/cart) for all queries and mutations. A default value is used if no argument is provided.", "isOptional": true }, { @@ -1281,7 +1281,7 @@ "filePath": "/Image.tsx", "syntaxKind": "TypeAliasDeclaration", "name": "HydrogenImageBaseProps", - "value": "{\n /** The aspect ratio of the image, in the format of `width/height`.\n *\n * @example\n * ```\n * \n * ```\n */\n aspectRatio?: string;\n /** The crop position of the image.\n *\n * @remarks\n * In the event that AspectRatio is set, without specifying a crop,\n * the Shopify CDN won't return the expected image.\n *\n * @defaultValue `center`\n */\n crop?: Crop;\n /** Data mapping to the [Storefront API `Image`](https://shopify.dev/docs/api/storefront/2024-04/objects/Image) object. Must be an Image object.\n *\n * @example\n * ```\n * import {IMAGE_FRAGMENT, Image} from '@shopify/hydrogen';\n *\n * export const IMAGE_QUERY = `#graphql\n * ${IMAGE_FRAGMENT}\n * query {\n * product {\n * featuredImage {\n * ...Image\n * }\n * }\n * }`\n *\n * \n * ```\n *\n * Image: {@link https://shopify.dev/api/storefront/reference/common-objects/image}\n */\n data?: PartialDeep;\n /** A function that returns a URL string for an image.\n *\n * @remarks\n * By default, this uses Shopify’s CDN {@link https://cdn.shopify.com/} but you can provide\n * your own function to use a another provider, as long as they support URL based image transformations.\n */\n loader?: Loader;\n /** An optional prop you can use to change the default srcSet generation behaviour */\n srcSetOptions?: SrcSetOptions;\n}", + "value": "{\n /** The aspect ratio of the image, in the format of `width/height`.\n *\n * @example\n * ```\n * \n * ```\n */\n aspectRatio?: string;\n /** The crop position of the image.\n *\n * @remarks\n * In the event that AspectRatio is set, without specifying a crop,\n * the Shopify CDN won't return the expected image.\n *\n * @defaultValue `center`\n */\n crop?: Crop;\n /** Data mapping to the [Storefront API `Image`](https://shopify.dev/docs/api/storefront/2024-07/objects/Image) object. Must be an Image object.\n *\n * @example\n * ```\n * import {IMAGE_FRAGMENT, Image} from '@shopify/hydrogen';\n *\n * export const IMAGE_QUERY = `#graphql\n * ${IMAGE_FRAGMENT}\n * query {\n * product {\n * featuredImage {\n * ...Image\n * }\n * }\n * }`\n *\n * \n * ```\n *\n * Image: {@link https://shopify.dev/api/storefront/reference/common-objects/image}\n */\n data?: PartialDeep;\n /** A function that returns a URL string for an image.\n *\n * @remarks\n * By default, this uses Shopify’s CDN {@link https://cdn.shopify.com/} but you can provide\n * your own function to use a another provider, as long as they support URL based image transformations.\n */\n loader?: Loader;\n /** An optional prop you can use to change the default srcSet generation behaviour */\n srcSetOptions?: SrcSetOptions;\n}", "description": "", "members": [ { @@ -1318,7 +1318,7 @@ "syntaxKind": "PropertySignature", "name": "data", "value": "PartialDeep", - "description": "Data mapping to the [Storefront API `Image`](https://shopify.dev/docs/api/storefront/2024-04/objects/Image) object. Must be an Image object.", + "description": "Data mapping to the [Storefront API `Image`](https://shopify.dev/docs/api/storefront/2024-07/objects/Image) object. Must be an Image object.", "isOptional": true, "examples": [ { @@ -3724,7 +3724,7 @@ "filePath": "/Image.tsx", "syntaxKind": "TypeAliasDeclaration", "name": "HydrogenImageBaseProps", - "value": "{\n /** The aspect ratio of the image, in the format of `width/height`.\n *\n * @example\n * ```\n * \n * ```\n */\n aspectRatio?: string;\n /** The crop position of the image.\n *\n * @remarks\n * In the event that AspectRatio is set, without specifying a crop,\n * the Shopify CDN won't return the expected image.\n *\n * @defaultValue `center`\n */\n crop?: Crop;\n /** Data mapping to the [Storefront API `Image`](https://shopify.dev/docs/api/storefront/2024-04/objects/Image) object. Must be an Image object.\n *\n * @example\n * ```\n * import {IMAGE_FRAGMENT, Image} from '@shopify/hydrogen';\n *\n * export const IMAGE_QUERY = `#graphql\n * ${IMAGE_FRAGMENT}\n * query {\n * product {\n * featuredImage {\n * ...Image\n * }\n * }\n * }`\n *\n * \n * ```\n *\n * Image: {@link https://shopify.dev/api/storefront/reference/common-objects/image}\n */\n data?: PartialDeep;\n /** A function that returns a URL string for an image.\n *\n * @remarks\n * By default, this uses Shopify’s CDN {@link https://cdn.shopify.com/} but you can provide\n * your own function to use a another provider, as long as they support URL based image transformations.\n */\n loader?: Loader;\n /** An optional prop you can use to change the default srcSet generation behaviour */\n srcSetOptions?: SrcSetOptions;\n}", + "value": "{\n /** The aspect ratio of the image, in the format of `width/height`.\n *\n * @example\n * ```\n * \n * ```\n */\n aspectRatio?: string;\n /** The crop position of the image.\n *\n * @remarks\n * In the event that AspectRatio is set, without specifying a crop,\n * the Shopify CDN won't return the expected image.\n *\n * @defaultValue `center`\n */\n crop?: Crop;\n /** Data mapping to the [Storefront API `Image`](https://shopify.dev/docs/api/storefront/2024-07/objects/Image) object. Must be an Image object.\n *\n * @example\n * ```\n * import {IMAGE_FRAGMENT, Image} from '@shopify/hydrogen';\n *\n * export const IMAGE_QUERY = `#graphql\n * ${IMAGE_FRAGMENT}\n * query {\n * product {\n * featuredImage {\n * ...Image\n * }\n * }\n * }`\n *\n * \n * ```\n *\n * Image: {@link https://shopify.dev/api/storefront/reference/common-objects/image}\n */\n data?: PartialDeep;\n /** A function that returns a URL string for an image.\n *\n * @remarks\n * By default, this uses Shopify’s CDN {@link https://cdn.shopify.com/} but you can provide\n * your own function to use a another provider, as long as they support URL based image transformations.\n */\n loader?: Loader;\n /** An optional prop you can use to change the default srcSet generation behaviour */\n srcSetOptions?: SrcSetOptions;\n}", "description": "", "members": [ { @@ -3761,7 +3761,7 @@ "syntaxKind": "PropertySignature", "name": "data", "value": "PartialDeep", - "description": "Data mapping to the [Storefront API `Image`](https://shopify.dev/docs/api/storefront/2024-04/objects/Image) object. Must be an Image object.", + "description": "Data mapping to the [Storefront API `Image`](https://shopify.dev/docs/api/storefront/2024-07/objects/Image) object. Must be an Image object.", "isOptional": true, "examples": [ { @@ -3949,7 +3949,7 @@ "filePath": "/ModelViewer.tsx", "syntaxKind": "TypeAliasDeclaration", "name": "ModelViewerBaseProps", - "value": "{\n /** An object with fields that correspond to the Storefront API's [Model3D object](https://shopify.dev/api/storefront/2024-04/objects/model3d). */\n data: PartialDeep;\n /** The callback to invoke when the 'error' event is triggered. Refer to [error in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-error). */\n onError?: (event: Event) => void;\n /** The callback to invoke when the `load` event is triggered. Refer to [load in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-load). */\n onLoad?: (event: Event) => void;\n /** The callback to invoke when the 'preload' event is triggered. Refer to [preload in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-preload). */\n onPreload?: (event: Event) => void;\n /** The callback to invoke when the 'model-visibility' event is triggered. Refer to [model-visibility in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-modelVisibility). */\n onModelVisibility?: (event: Event) => void;\n /** The callback to invoke when the 'progress' event is triggered. Refer to [progress in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-progress). */\n onProgress?: (event: Event) => void;\n /** The callback to invoke when the 'ar-status' event is triggered. Refer to [ar-status in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-augmentedreality-events-arStatus). */\n onArStatus?: (event: Event) => void;\n /** The callback to invoke when the 'ar-tracking' event is triggered. Refer to [ar-tracking in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-augmentedreality-events-arTracking). */\n onArTracking?: (event: Event) => void;\n /** The callback to invoke when the 'quick-look-button-tapped' event is triggered. Refer to [quick-look-button-tapped in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-augmentedreality-events-quickLookButtonTapped). */\n onQuickLookButtonTapped?: (event: Event) => void;\n /** The callback to invoke when the 'camera-change' event is triggered. Refer to [camera-change in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-stagingandcameras-events-cameraChange). */\n onCameraChange?: (event: Event) => void;\n /** The callback to invoke when the 'environment-change' event is triggered. Refer to [environment-change in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-lightingandenv-events-environmentChange). */\n onEnvironmentChange?: (event: Event) => void;\n /** The callback to invoke when the 'play' event is triggered. Refer to [play in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-animation-events-play). */\n onPlay?: (event: Event) => void;\n /** The callback to invoke when the 'pause' event is triggered. Refer to [pause in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-animation-events-pause). */\n onPause?: (event: Event) => void;\n /** The callback to invoke when the 'scene-graph-ready' event is triggered. Refer to [scene-graph-ready in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-scenegraph-events-sceneGraphReady). */\n onSceneGraphReady?: (event: Event) => void;\n}", + "value": "{\n /** An object with fields that correspond to the Storefront API's [Model3D object](https://shopify.dev/api/storefront/2024-07/objects/model3d). */\n data: PartialDeep;\n /** The callback to invoke when the 'error' event is triggered. Refer to [error in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-error). */\n onError?: (event: Event) => void;\n /** The callback to invoke when the `load` event is triggered. Refer to [load in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-load). */\n onLoad?: (event: Event) => void;\n /** The callback to invoke when the 'preload' event is triggered. Refer to [preload in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-preload). */\n onPreload?: (event: Event) => void;\n /** The callback to invoke when the 'model-visibility' event is triggered. Refer to [model-visibility in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-modelVisibility). */\n onModelVisibility?: (event: Event) => void;\n /** The callback to invoke when the 'progress' event is triggered. Refer to [progress in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-progress). */\n onProgress?: (event: Event) => void;\n /** The callback to invoke when the 'ar-status' event is triggered. Refer to [ar-status in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-augmentedreality-events-arStatus). */\n onArStatus?: (event: Event) => void;\n /** The callback to invoke when the 'ar-tracking' event is triggered. Refer to [ar-tracking in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-augmentedreality-events-arTracking). */\n onArTracking?: (event: Event) => void;\n /** The callback to invoke when the 'quick-look-button-tapped' event is triggered. Refer to [quick-look-button-tapped in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-augmentedreality-events-quickLookButtonTapped). */\n onQuickLookButtonTapped?: (event: Event) => void;\n /** The callback to invoke when the 'camera-change' event is triggered. Refer to [camera-change in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-stagingandcameras-events-cameraChange). */\n onCameraChange?: (event: Event) => void;\n /** The callback to invoke when the 'environment-change' event is triggered. Refer to [environment-change in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-lightingandenv-events-environmentChange). */\n onEnvironmentChange?: (event: Event) => void;\n /** The callback to invoke when the 'play' event is triggered. Refer to [play in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-animation-events-play). */\n onPlay?: (event: Event) => void;\n /** The callback to invoke when the 'pause' event is triggered. Refer to [pause in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-animation-events-pause). */\n onPause?: (event: Event) => void;\n /** The callback to invoke when the 'scene-graph-ready' event is triggered. Refer to [scene-graph-ready in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-scenegraph-events-sceneGraphReady). */\n onSceneGraphReady?: (event: Event) => void;\n}", "description": "", "members": [ { @@ -3957,7 +3957,7 @@ "syntaxKind": "PropertySignature", "name": "data", "value": "PartialDeep", - "description": "An object with fields that correspond to the Storefront API's [Model3D object](https://shopify.dev/api/storefront/2024-04/objects/model3d)." + "description": "An object with fields that correspond to the Storefront API's [Model3D object](https://shopify.dev/api/storefront/2024-07/objects/model3d)." }, { "filePath": "/ModelViewer.tsx", @@ -4147,7 +4147,7 @@ "syntaxKind": "PropertySignature", "name": "measurement", "value": "PartialDeep", - "description": "A [UnitPriceMeasurement object](https://shopify.dev/api/storefront/2024-04/objects/unitpricemeasurement).", + "description": "A [UnitPriceMeasurement object](https://shopify.dev/api/storefront/2024-07/objects/unitpricemeasurement).", "isOptional": true }, { @@ -4159,7 +4159,7 @@ "isOptional": true } ], - "value": "export interface MoneyPropsBase {\n /** An HTML tag or React Component to be rendered as the base element wrapper. The default is `div`. */\n as?: ComponentGeneric;\n /** An object with fields that correspond to the Storefront API's [MoneyV2 object](https://shopify.dev/api/storefront/reference/common-objects/moneyv2). */\n data: PartialDeep;\n /** Whether to remove the currency symbol from the output. */\n withoutCurrency?: boolean;\n /** Whether to remove trailing zeros (fractional money) from the output. */\n withoutTrailingZeros?: boolean;\n /** A [UnitPriceMeasurement object](https://shopify.dev/api/storefront/2024-04/objects/unitpricemeasurement). */\n measurement?: PartialDeep;\n /** Customizes the separator between the money output and the measurement output. Used with the `measurement` prop. Defaults to `'/'`. */\n measurementSeparator?: ReactNode;\n}" + "value": "export interface MoneyPropsBase {\n /** An HTML tag or React Component to be rendered as the base element wrapper. The default is `div`. */\n as?: ComponentGeneric;\n /** An object with fields that correspond to the Storefront API's [MoneyV2 object](https://shopify.dev/api/storefront/reference/common-objects/moneyv2). */\n data: PartialDeep;\n /** Whether to remove the currency symbol from the output. */\n withoutCurrency?: boolean;\n /** Whether to remove trailing zeros (fractional money) from the output. */\n withoutTrailingZeros?: boolean;\n /** A [UnitPriceMeasurement object](https://shopify.dev/api/storefront/2024-07/objects/unitpricemeasurement). */\n measurement?: PartialDeep;\n /** Customizes the separator between the money output and the measurement output. Used with the `measurement` prop. Defaults to `'/'`. */\n measurementSeparator?: ReactNode;\n}" } } } @@ -4830,7 +4830,7 @@ "syntaxKind": "PropertySignature", "name": "data", "value": "PartialDeep", - "description": "An object with fields that correspond to the Storefront API's [Video object](https://shopify.dev/api/storefront/2024-04/objects/video)." + "description": "An object with fields that correspond to the Storefront API's [Video object](https://shopify.dev/api/storefront/2024-07/objects/video)." }, { "filePath": "/Video.tsx", @@ -4849,7 +4849,7 @@ "isOptional": true } ], - "value": "export interface VideoProps {\n /** An object with fields that correspond to the Storefront API's [Video object](https://shopify.dev/api/storefront/2024-04/objects/video). */\n data: PartialDeep;\n /** An object of image size options for the video's `previewImage`. Uses `shopifyImageLoader` to generate the `poster` URL. */\n previewImageOptions?: Parameters[0];\n /** Props that will be passed to the `video` element's `source` children elements. */\n sourceProps?: HTMLAttributes & {\n 'data-testid'?: string;\n };\n}" + "value": "export interface VideoProps {\n /** An object with fields that correspond to the Storefront API's [Video object](https://shopify.dev/api/storefront/2024-07/objects/video). */\n data: PartialDeep;\n /** An object of image size options for the video's `previewImage`. Uses `shopifyImageLoader` to generate the `poster` URL. */\n previewImageOptions?: Parameters[0];\n /** Props that will be passed to the `video` element's `source` children elements. */\n sourceProps?: HTMLAttributes & {\n 'data-testid'?: string;\n };\n}" }, "LoaderParams": { "filePath": "/Image.tsx", @@ -7056,7 +7056,7 @@ "UseCartLineGeneratedType": { "filePath": "/CartLineProvider.tsx", "name": "UseCartLineGeneratedType", - "description": "The `useCartLine` hook provides access to the [CartLine object](https://shopify.dev/api/storefront/2024-04/objects/cartline) from the Storefront API. It must be a descendent of a `CartProvider` component.", + "description": "The `useCartLine` hook provides access to the [CartLine object](https://shopify.dev/api/storefront/2024-07/objects/cartline) from the Storefront API. It must be a descendent of a `CartProvider` component.", "params": [], "returns": { "filePath": "/CartLineProvider.tsx", diff --git a/packages/hydrogen-react/docs/generated/generated_static_pages.json b/packages/hydrogen-react/docs/generated/generated_static_pages.json index 89192719ec..11813fc247 100644 --- a/packages/hydrogen-react/docs/generated/generated_static_pages.json +++ b/packages/hydrogen-react/docs/generated/generated_static_pages.json @@ -35,7 +35,7 @@ "type": "Generic", "anchorLink": "authentication", "title": "Authentication", - "sectionContent": "To use Hydrogen React, you need to authenticate with and make requests to the [Storefront API](/docs/api/storefront). Hydrogen React includes an [API client](/docs/api/hydrogen-react/2024-04/utilities/createstorefrontclient) to securely handle API queries and mutations.\n\nYou can create and manage Storefront API access tokens by installing the [Headless sales channel](https://apps.shopify.com/headless) on your store.\n\nApps have access to [two kinds of tokens](/docs/api/usage/authentication#access-tokens-for-the-storefront-api): a public API token, which can be used in client-side code, and a private API token, which should only be used in server-side contexts and never exposed publicly.", + "sectionContent": "To use Hydrogen React, you need to authenticate with and make requests to the [Storefront API](/docs/api/storefront). Hydrogen React includes an [API client](/docs/api/hydrogen-react/2024-07/utilities/createstorefrontclient) to securely handle API queries and mutations.\n\nYou can create and manage Storefront API access tokens by installing the [Headless sales channel](https://apps.shopify.com/headless) on your store.\n\nApps have access to [two kinds of tokens](/docs/api/usage/authentication#access-tokens-for-the-storefront-api): a public API token, which can be used in client-side code, and a private API token, which should only be used in server-side contexts and never exposed publicly.", "sectionCard": [ { "subtitle": "Install", diff --git a/packages/hydrogen-react/docs/staticPages/hydrogenReact.doc.ts b/packages/hydrogen-react/docs/staticPages/hydrogenReact.doc.ts index bcace03b04..24012a53a5 100644 --- a/packages/hydrogen-react/docs/staticPages/hydrogenReact.doc.ts +++ b/packages/hydrogen-react/docs/staticPages/hydrogenReact.doc.ts @@ -41,7 +41,7 @@ const data: LandingTemplateSchema = { anchorLink: 'authentication', title: 'Authentication', sectionContent: - 'To use Hydrogen React, you need to authenticate with and make requests to the [Storefront API](/docs/api/storefront). Hydrogen React includes an [API client](/docs/api/hydrogen-react/2024-04/utilities/createstorefrontclient) to securely handle API queries and mutations.\n\nYou can create and manage Storefront API access tokens by installing the [Headless sales channel](https://apps.shopify.com/headless) on your store.\n\nApps have access to [two kinds of tokens](/docs/api/usage/authentication#access-tokens-for-the-storefront-api): a public API token, which can be used in client-side code, and a private API token, which should only be used in server-side contexts and never exposed publicly.', + 'To use Hydrogen React, you need to authenticate with and make requests to the [Storefront API](/docs/api/storefront). Hydrogen React includes an [API client](/docs/api/hydrogen-react/2024-07/utilities/createstorefrontclient) to securely handle API queries and mutations.\n\nYou can create and manage Storefront API access tokens by installing the [Headless sales channel](https://apps.shopify.com/headless) on your store.\n\nApps have access to [two kinds of tokens](/docs/api/usage/authentication#access-tokens-for-the-storefront-api): a public API token, which can be used in client-side code, and a private API token, which should only be used in server-side contexts and never exposed publicly.', sectionCard: [ { subtitle: 'Install', diff --git a/packages/hydrogen-react/src/CartLineProvider.tsx b/packages/hydrogen-react/src/CartLineProvider.tsx index 73aa306e9e..2e778e1c32 100644 --- a/packages/hydrogen-react/src/CartLineProvider.tsx +++ b/packages/hydrogen-react/src/CartLineProvider.tsx @@ -13,7 +13,7 @@ type CartLinePartialDeep = PartialDeep< export const CartLineContext = createContext(null); /** - * The `useCartLine` hook provides access to the [CartLine object](https://shopify.dev/api/storefront/2024-04/objects/cartline) from the Storefront API. It must be a descendent of a `CartProvider` component. + * The `useCartLine` hook provides access to the [CartLine object](https://shopify.dev/api/storefront/2024-07/objects/cartline) from the Storefront API. It must be a descendent of a `CartProvider` component. */ export function useCartLine(): CartLinePartialDeep { const context = useContext(CartLineContext); diff --git a/packages/hydrogen-react/src/CartProvider.stories.tsx b/packages/hydrogen-react/src/CartProvider.stories.tsx index 7c6c8e5211..e54c89c329 100644 --- a/packages/hydrogen-react/src/CartProvider.stories.tsx +++ b/packages/hydrogen-react/src/CartProvider.stories.tsx @@ -249,7 +249,7 @@ Default.args = { numCartLines: 30, /** A callback that is invoked when the process to create a cart begins, but before the cart is created in the Storefront API. */ data: undefined, - /** A fragment used to query the Storefront API's [Cart object](https://shopify.dev/api/storefront/2024-04/objects/cart) for all queries and mutations. A default value is used if no argument is provided. */ + /** A fragment used to query the Storefront API's [Cart object](https://shopify.dev/api/storefront/2024-07/objects/cart) for all queries and mutations. A default value is used if no argument is provided. */ cartFragment: undefined, /** A customer access token that's accessible on the server if there's a customer login. */ customerAccessToken: undefined, diff --git a/packages/hydrogen-react/src/CartProvider.tsx b/packages/hydrogen-react/src/CartProvider.tsx index 932d85463f..94906d01b1 100644 --- a/packages/hydrogen-react/src/CartProvider.tsx +++ b/packages/hydrogen-react/src/CartProvider.tsx @@ -88,9 +88,9 @@ type CartProviderProps = { onAttributesUpdateComplete?: () => void; /** A callback that is invoked when the process to update the cart discount codes completes */ onDiscountCodesUpdateComplete?: () => void; - /** An object with fields that correspond to the Storefront API's [Cart object](https://shopify.dev/api/storefront/2024-04/objects/cart). */ + /** An object with fields that correspond to the Storefront API's [Cart object](https://shopify.dev/api/storefront/2024-07/objects/cart). */ data?: PartialDeep; - /** A fragment used to query the Storefront API's [Cart object](https://shopify.dev/api/storefront/2024-04/objects/cart) for all queries and mutations. A default value is used if no argument is provided. */ + /** A fragment used to query the Storefront API's [Cart object](https://shopify.dev/api/storefront/2024-07/objects/cart) for all queries and mutations. A default value is used if no argument is provided. */ cartFragment?: string; /** A customer access token that's accessible on the server if there's a customer login. */ customerAccessToken?: CartBuyerIdentityInput['customerAccessToken']; diff --git a/packages/hydrogen-react/src/Image.tsx b/packages/hydrogen-react/src/Image.tsx index 25a3588dd0..fafc1a3b0e 100644 --- a/packages/hydrogen-react/src/Image.tsx +++ b/packages/hydrogen-react/src/Image.tsx @@ -67,7 +67,7 @@ type HydrogenImageBaseProps = { * @defaultValue `center` */ crop?: Crop; - /** Data mapping to the [Storefront API `Image`](https://shopify.dev/docs/api/storefront/2024-04/objects/Image) object. Must be an Image object. + /** Data mapping to the [Storefront API `Image`](https://shopify.dev/docs/api/storefront/2024-07/objects/Image) object. Must be an Image object. * * @example * ``` diff --git a/packages/hydrogen-react/src/ModelViewer.tsx b/packages/hydrogen-react/src/ModelViewer.tsx index e3809e1077..ce6551e8f1 100644 --- a/packages/hydrogen-react/src/ModelViewer.tsx +++ b/packages/hydrogen-react/src/ModelViewer.tsx @@ -23,7 +23,7 @@ type ModelViewerProps = Omit< ModelViewerBaseProps; type ModelViewerBaseProps = { - /** An object with fields that correspond to the Storefront API's [Model3D object](https://shopify.dev/api/storefront/2024-04/objects/model3d). */ + /** An object with fields that correspond to the Storefront API's [Model3D object](https://shopify.dev/api/storefront/2024-07/objects/model3d). */ data: PartialDeep; /** The callback to invoke when the 'error' event is triggered. Refer to [error in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-error). */ onError?: (event: Event) => void; diff --git a/packages/hydrogen-react/src/Money.tsx b/packages/hydrogen-react/src/Money.tsx index 052c439d5d..44a60280fb 100644 --- a/packages/hydrogen-react/src/Money.tsx +++ b/packages/hydrogen-react/src/Money.tsx @@ -12,7 +12,7 @@ export interface MoneyPropsBase { withoutCurrency?: boolean; /** Whether to remove trailing zeros (fractional money) from the output. */ withoutTrailingZeros?: boolean; - /** A [UnitPriceMeasurement object](https://shopify.dev/api/storefront/2024-04/objects/unitpricemeasurement). */ + /** A [UnitPriceMeasurement object](https://shopify.dev/api/storefront/2024-07/objects/unitpricemeasurement). */ measurement?: PartialDeep; /** Customizes the separator between the money output and the measurement output. Used with the `measurement` prop. Defaults to `'/'`. */ measurementSeparator?: ReactNode; diff --git a/packages/hydrogen-react/src/ShopifyProvider.test.tsx b/packages/hydrogen-react/src/ShopifyProvider.test.tsx index 6fbc27f5da..c74eb0c9f0 100644 --- a/packages/hydrogen-react/src/ShopifyProvider.test.tsx +++ b/packages/hydrogen-react/src/ShopifyProvider.test.tsx @@ -41,7 +41,7 @@ describe('', () => { }); expect(result.current.getStorefrontApiUrl()).toBe( - 'https://notashop.myshopify.com/api/2024-04/graphql.json', + 'https://notashop.myshopify.com/api/2024-07/graphql.json', ); }); @@ -183,7 +183,7 @@ describe('', () => { }); expect(result.current.getStorefrontApiUrl()).toBe( - 'https://notashop.myshopify.com/api/2024-04/graphql.json', + 'https://notashop.myshopify.com/api/2024-07/graphql.json', ); }); @@ -219,7 +219,7 @@ describe('', () => { }); expect(result.current.getStorefrontApiUrl()).toBe( - 'https://notashop.myshopify.com/api/2024-04/graphql.json', + 'https://notashop.myshopify.com/api/2024-07/graphql.json', ); }); }); diff --git a/packages/hydrogen-react/src/Video.tsx b/packages/hydrogen-react/src/Video.tsx index 9fb43265da..ab6f4d8d6d 100644 --- a/packages/hydrogen-react/src/Video.tsx +++ b/packages/hydrogen-react/src/Video.tsx @@ -4,7 +4,7 @@ import type {Video as VideoType} from './storefront-api-types.js'; import type {PartialDeep} from 'type-fest'; export interface VideoProps { - /** An object with fields that correspond to the Storefront API's [Video object](https://shopify.dev/api/storefront/2024-04/objects/video). */ + /** An object with fields that correspond to the Storefront API's [Video object](https://shopify.dev/api/storefront/2024-07/objects/video). */ data: PartialDeep; /** An object of image size options for the video's `previewImage`. Uses `shopifyImageLoader` to generate the `poster` URL. */ previewImageOptions?: Parameters[0]; diff --git a/packages/hydrogen-react/src/codegen.helpers.ts b/packages/hydrogen-react/src/codegen.helpers.ts index 616320dc06..ce96725ac6 100644 --- a/packages/hydrogen-react/src/codegen.helpers.ts +++ b/packages/hydrogen-react/src/codegen.helpers.ts @@ -1,6 +1,6 @@ /** * Meant to be used with GraphQL CodeGen to type the Storefront API's custom scalars correctly. - * Reference for the GraphQL types: https://shopify.dev/docs/api/storefront/2024-04/scalars/HTML + * Reference for the GraphQL types: https://shopify.dev/docs/api/storefront/2024-07/scalars/HTML * Note: JSON is generated as 'unknown' by default. */ export const storefrontApiCustomScalars = { @@ -15,7 +15,7 @@ export const storefrontApiCustomScalars = { /** * Meant to be used with GraphQL CodeGen to type the Storefront API's custom scalars correctly. - * Reference for the GraphQL types: https://shopify.dev/docs/api/customer/2024-04/scalars/HTML + * Reference for the GraphQL types: https://shopify.dev/docs/api/customer/2024-07/scalars/HTML * Note: JSON is generated as 'unknown' by default. */ export const customerAccountApiCustomScalars = { diff --git a/packages/hydrogen-react/src/useCartAPIStateMachine.tsx b/packages/hydrogen-react/src/useCartAPIStateMachine.tsx index 03da576715..ed7c940762 100644 --- a/packages/hydrogen-react/src/useCartAPIStateMachine.tsx +++ b/packages/hydrogen-react/src/useCartAPIStateMachine.tsx @@ -207,9 +207,9 @@ export function useCartAPIStateMachine({ context: CartMachineContext, event: CartMachineFetchResultEvent, ) => void; - /** An object with fields that correspond to the Storefront API's [Cart object](https://shopify.dev/api/storefront/2024-04/objects/cart). */ + /** An object with fields that correspond to the Storefront API's [Cart object](https://shopify.dev/api/storefront/2024-07/objects/cart). */ data?: PartialDeep; - /** A fragment used to query the Storefront API's [Cart object](https://shopify.dev/api/storefront/2024-04/objects/cart) for all queries and mutations. A default value is used if no argument is provided. */ + /** A fragment used to query the Storefront API's [Cart object](https://shopify.dev/api/storefront/2024-07/objects/cart) for all queries and mutations. A default value is used if no argument is provided. */ cartFragment: string; /** The ISO country code for i18n. */ countryCode?: CountryCode; diff --git a/packages/hydrogen-react/src/useCartActions.tsx b/packages/hydrogen-react/src/useCartActions.tsx index f3eb2fc9bb..07485221c6 100644 --- a/packages/hydrogen-react/src/useCartActions.tsx +++ b/packages/hydrogen-react/src/useCartActions.tsx @@ -30,7 +30,7 @@ type CartResponse = PartialDeep; /** * The `useCartActions` hook returns helper graphql functions for Storefront Cart API * - * See [cart API graphql mutations](https://shopify.dev/api/storefront/2024-04/objects/Cart) + * See [cart API graphql mutations](https://shopify.dev/api/storefront/2024-07/objects/Cart) */ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function useCartActions({ @@ -41,7 +41,7 @@ export function useCartActions({ }: { /** Maximum number of cart lines to fetch. Defaults to 250 cart lines. */ numCartLines?: number; - /** A fragment used to query the Storefront API's [Cart object](https://shopify.dev/api/storefront/2024-04/objects/cart) for all queries and mutations. A default value is used if no argument is provided. */ + /** A fragment used to query the Storefront API's [Cart object](https://shopify.dev/api/storefront/2024-07/objects/cart) for all queries and mutations. A default value is used if no argument is provided. */ cartFragment: string; /** The ISO country code for i18n. Default to `US` */ countryCode?: CountryCode; diff --git a/packages/hydrogen/CHANGELOG.md b/packages/hydrogen/CHANGELOG.md index 08f1bc62aa..cef033d6a2 100644 --- a/packages/hydrogen/CHANGELOG.md +++ b/packages/hydrogen/CHANGELOG.md @@ -130,7 +130,7 @@ - Add JSdoc to `getSelectedProductOptions` utility and cleanup the skeleton implementation ([#2089](https://github.com/Shopify/hydrogen/pull/2089)) by [@juanpprieto](https://github.com/juanpprieto) -- Adding support for B2B to the customer account client and cart handler to store and manage [buyer context](https://shopify.dev/docs/api/storefront/2024-04/input-objects/BuyerInput). Currently Unstable. ([#1886](https://github.com/Shopify/hydrogen/pull/1886)) by [@dustinfirman](https://github.com/dustinfirman) +- Adding support for B2B to the customer account client and cart handler to store and manage [buyer context](https://shopify.dev/docs/api/storefront/2024-07/input-objects/BuyerInput). Currently Unstable. ([#1886](https://github.com/Shopify/hydrogen/pull/1886)) by [@dustinfirman](https://github.com/dustinfirman) - When extending the content security policy, if the default directive is 'none' then the default won't be merged into the final directive. ([#2076](https://github.com/Shopify/hydrogen/pull/2076)) by [@nkgentile](https://github.com/nkgentile) diff --git a/packages/hydrogen/docs/generated/generated_docs_data.json b/packages/hydrogen/docs/generated/generated_docs_data.json index 35e9b903e7..8875e1fa6b 100644 --- a/packages/hydrogen/docs/generated/generated_docs_data.json +++ b/packages/hydrogen/docs/generated/generated_docs_data.json @@ -314,7 +314,7 @@ "subCategory": "analytics", "isVisualComponent": false, "related": [], - "description": "Provides a context for tracking page views and cart events to send as analytics data to Shopify. This component is integrated with the Customer Privacy API for consent management. The provider can also be used to connect third-party analytics services through its subscribe and publish system. The [`useAnalytics`](/docs/api/hydrogen/2024-04/hooks/useanalytics) hook provides access to the analytics provider context.", + "description": "Provides a context for tracking page views and cart events to send as analytics data to Shopify. This component is integrated with the Customer Privacy API for consent management. The provider can also be used to connect third-party analytics services through its subscribe and publish system. The [`useAnalytics`](/docs/api/hydrogen/2024-07/hooks/useanalytics) hook provides access to the analytics provider context.", "type": "component", "defaultExample": { "description": "This is the default example", @@ -344,7 +344,7 @@ "filePath": "/analytics-manager/AnalyticsProvider.tsx", "syntaxKind": "TypeAliasDeclaration", "name": "AnalyticsProviderProps", - "value": "{\n /** React children to render. */\n children?: ReactNode;\n /** The cart or cart promise to track for cart analytics. When there is a difference between the state of the cart, `AnalyticsProvider` will trigger a `cart_updated` event. It will also produce `product_added_to_cart` and `product_removed_from_cart` based on cart line quantity and cart line id changes. */\n cart: Promise | CartReturn | null;\n /** An optional function to set wether the user can be tracked. Defaults to Customer Privacy API's `window.Shopify.customerPrivacy.analyticsProcessingAllowed()`. */\n canTrack?: () => boolean;\n /** An optional custom payload to pass to all events. e.g language/locale/currency. */\n customData?: Record;\n /** The shop configuration required to publish analytics events to Shopify. Use [`getShopAnalytics`](/docs/api/hydrogen/2024-04/utilities/getshopanalytics). */\n shop: Promise | ShopAnalytics | null;\n /** The customer privacy consent configuration and options. */\n consent: Partial<\n Pick<\n CustomerPrivacyApiProps,\n 'checkoutDomain' | 'storefrontAccessToken' | 'withPrivacyBanner'\n >\n >;\n /** Disable throwing errors when required props are missing. */\n disableThrowOnError?: boolean;\n /** The domain scope of the cookie set with `useShopifyCookies`. **/\n cookieDomain?: string;\n}", + "value": "{\n /** React children to render. */\n children?: ReactNode;\n /** The cart or cart promise to track for cart analytics. When there is a difference between the state of the cart, `AnalyticsProvider` will trigger a `cart_updated` event. It will also produce `product_added_to_cart` and `product_removed_from_cart` based on cart line quantity and cart line id changes. */\n cart: Promise | CartReturn | null;\n /** An optional function to set wether the user can be tracked. Defaults to Customer Privacy API's `window.Shopify.customerPrivacy.analyticsProcessingAllowed()`. */\n canTrack?: () => boolean;\n /** An optional custom payload to pass to all events. e.g language/locale/currency. */\n customData?: Record;\n /** The shop configuration required to publish analytics events to Shopify. Use [`getShopAnalytics`](/docs/api/hydrogen/2024-07/utilities/getshopanalytics). */\n shop: Promise | ShopAnalytics | null;\n /** The customer privacy consent configuration and options. */\n consent: Partial<\n Pick<\n CustomerPrivacyApiProps,\n 'checkoutDomain' | 'storefrontAccessToken' | 'withPrivacyBanner'\n >\n >;\n /** Disable throwing errors when required props are missing. */\n disableThrowOnError?: boolean;\n /** The domain scope of the cookie set with `useShopifyCookies`. **/\n cookieDomain?: string;\n}", "description": "", "members": [ { @@ -383,7 +383,7 @@ "syntaxKind": "PropertySignature", "name": "shop", "value": "ShopAnalytics | Promise", - "description": "The shop configuration required to publish analytics events to Shopify. Use [`getShopAnalytics`](/docs/api/hydrogen/2024-04/utilities/getshopanalytics)." + "description": "The shop configuration required to publish analytics events to Shopify. Use [`getShopAnalytics`](/docs/api/hydrogen/2024-07/utilities/getshopanalytics)." }, { "filePath": "/analytics-manager/AnalyticsProvider.tsx", @@ -422,7 +422,7 @@ "name": "Cart", "value": "Cart", "members": [], - "override": "[Cart](/docs/api/storefront/2024-04/objects/Cart) - Storefront API type" + "override": "[Cart](/docs/api/storefront/2024-07/objects/Cart) - Storefront API type" }, "StorefrontApiErrors": { "filePath": "/storefront.ts", @@ -913,7 +913,7 @@ "category": "utilities", "isVisualComponent": false, "related": [], - "description": "A function that queries for shop required analytics data to be used in the [`Analytics.Provider`](/docs/api/hydrogen/2024-04/components/Analytics-provider) component.", + "description": "A function that queries for shop required analytics data to be used in the [`Analytics.Provider`](/docs/api/hydrogen/2024-07/components/Analytics-provider) component.", "type": "utility", "defaultExample": { "description": "This is the default example", @@ -963,7 +963,7 @@ "filePath": "/analytics-manager/AnalyticsProvider.tsx", "syntaxKind": "TypeAliasDeclaration", "name": "ShopAnalyticsProps", - "value": "{\n /**\n * The storefront client instance created by [`createStorefrontClient`](docs/api/hydrogen/2024-04/utilities/createstorefrontclient).\n */\n storefront: Storefront;\n /**\n * The `PUBLIC_STOREFRONT_ID` generated by Oxygen in the environment variable.\n */\n publicStorefrontId: string;\n}", + "value": "{\n /**\n * The storefront client instance created by [`createStorefrontClient`](docs/api/hydrogen/2024-07/utilities/createstorefrontclient).\n */\n storefront: Storefront;\n /**\n * The `PUBLIC_STOREFRONT_ID` generated by Oxygen in the environment variable.\n */\n publicStorefrontId: string;\n}", "description": "", "members": [ { @@ -971,7 +971,7 @@ "syntaxKind": "PropertySignature", "name": "storefront", "value": "Storefront", - "description": "The storefront client instance created by [`createStorefrontClient`](docs/api/hydrogen/2024-04/utilities/createstorefrontclient)." + "description": "The storefront client instance created by [`createStorefrontClient`](docs/api/hydrogen/2024-07/utilities/createstorefrontclient)." }, { "filePath": "/analytics-manager/AnalyticsProvider.tsx", @@ -1327,7 +1327,7 @@ "category": "hooks", "isVisualComponent": false, "related": [], - "description": "A hook that provides access to the analytics provider context. Must be a descendent of [`Analytics.Provider`](/docs/api/hydrogen/2024-04/components/Analytics-provider).", + "description": "A hook that provides access to the analytics provider context. Must be a descendent of [`Analytics.Provider`](/docs/api/hydrogen/2024-07/components/Analytics-provider).", "type": "hook", "defaultExample": { "description": "This is the default example", @@ -1357,7 +1357,7 @@ "filePath": "/analytics-manager/AnalyticsProvider.tsx", "syntaxKind": "TypeAliasDeclaration", "name": "AnalyticsContextValueForDoc", - "value": "{\n /** A function to tell you the current state of if the user can be tracked by analytics. Defaults to Customer Privacy API's `window.Shopify.customerPrivacy.analyticsProcessingAllowed()`. */\n canTrack?: () => boolean;\n /** The current cart state. */\n cart?: Promise | CartReturn | null;\n /** The custom data passed in from the `AnalyticsProvider`. */\n customData?: Record;\n /** The previous cart state. */\n prevCart?: Promise | CartReturn | null;\n /** A function to publish an analytics event. */\n publish?: AnalyticsContextPublishForDoc;\n /** A function to register with the analytics provider. It holds the first browser load events until all registered key has executed the supplied `ready` function. [See example register usage](/docs/api/hydrogen/2024-04/hooks/useanalytics#example-useanalytics.register). */\n register?: (key: string) => {ready: () => void};\n /** The shop configuration required to publish events to Shopify. */\n shop?: Promise | ShopAnalytics | null;\n /** A function to subscribe to analytics events. */\n subscribe?: AnalyticsContextSubscribeForDoc;\n}", + "value": "{\n /** A function to tell you the current state of if the user can be tracked by analytics. Defaults to Customer Privacy API's `window.Shopify.customerPrivacy.analyticsProcessingAllowed()`. */\n canTrack?: () => boolean;\n /** The current cart state. */\n cart?: Promise | CartReturn | null;\n /** The custom data passed in from the `AnalyticsProvider`. */\n customData?: Record;\n /** The previous cart state. */\n prevCart?: Promise | CartReturn | null;\n /** A function to publish an analytics event. */\n publish?: AnalyticsContextPublishForDoc;\n /** A function to register with the analytics provider. It holds the first browser load events until all registered key has executed the supplied `ready` function. [See example register usage](/docs/api/hydrogen/2024-07/hooks/useanalytics#example-useanalytics.register). */\n register?: (key: string) => {ready: () => void};\n /** The shop configuration required to publish events to Shopify. */\n shop?: Promise | ShopAnalytics | null;\n /** A function to subscribe to analytics events. */\n subscribe?: AnalyticsContextSubscribeForDoc;\n}", "description": "", "members": [ { @@ -1405,7 +1405,7 @@ "syntaxKind": "PropertySignature", "name": "register", "value": "(key: string) => { ready: () => void; }", - "description": "A function to register with the analytics provider. It holds the first browser load events until all registered key has executed the supplied `ready` function. [See example register usage](/docs/api/hydrogen/2024-04/hooks/useanalytics#example-useanalytics.register).", + "description": "A function to register with the analytics provider. It holds the first browser load events until all registered key has executed the supplied `ready` function. [See example register usage](/docs/api/hydrogen/2024-07/hooks/useanalytics#example-useanalytics.register).", "isOptional": true }, { @@ -1438,7 +1438,7 @@ "name": "Cart", "value": "Cart", "members": [], - "override": "[Cart](/docs/api/storefront/2024-04/objects/Cart) - Storefront API type" + "override": "[Cart](/docs/api/storefront/2024-07/objects/Cart) - Storefront API type" }, "StorefrontApiErrors": { "filePath": "/storefront.ts", @@ -2960,7 +2960,7 @@ "name": "AttributeInput", "value": "AttributeInput", "members": [], - "override": "[AttributeInput](/docs/api/storefront/2024-04/input-objects/AttributeInput) - Storefront API type" + "override": "[AttributeInput](/docs/api/storefront/2024-07/input-objects/AttributeInput) - Storefront API type" }, "OtherFormData": { "description": "", @@ -2998,7 +2998,7 @@ "name": "CartBuyerIdentityInput", "value": "CartBuyerIdentityInput", "members": [], - "override": "[CartBuyerIdentityInput](/docs/api/storefront/2024-04/input-objects/CartBuyerIdentityInput) - Storefront API type" + "override": "[CartBuyerIdentityInput](/docs/api/storefront/2024-07/input-objects/CartBuyerIdentityInput) - Storefront API type" }, "CartCreateProps": { "filePath": "/cart/CartForm.tsx", @@ -3029,7 +3029,7 @@ "name": "CartInput", "value": "CartInput", "members": [], - "override": "[CartInput](/docs/api/storefront/2024-04/input-objects/CartInput) - Storefront API type" + "override": "[CartInput](/docs/api/storefront/2024-07/input-objects/CartInput) - Storefront API type" }, "CartDiscountCodesUpdateProps": { "filePath": "/cart/CartForm.tsx", @@ -3091,7 +3091,7 @@ "name": "CartLineInput", "value": "CartLineInput", "members": [], - "override": "[CartLineInput](/docs/api/storefront/2024-04/input-objects/CartLineInput) - Storefront API type" + "override": "[CartLineInput](/docs/api/storefront/2024-07/input-objects/CartLineInput) - Storefront API type" }, "CartLinesUpdateProps": { "filePath": "/cart/CartForm.tsx", @@ -3122,7 +3122,7 @@ "name": "CartLineUpdateInput", "value": "CartLineUpdateInput", "members": [], - "override": "[CartLineUpdateInput](/docs/api/storefront/2024-04/input-objects/CartLineUpdateInput) - Storefront API type" + "override": "[CartLineUpdateInput](/docs/api/storefront/2024-07/input-objects/CartLineUpdateInput) - Storefront API type" }, "CartLinesRemoveProps": { "filePath": "/cart/CartForm.tsx", @@ -3201,7 +3201,7 @@ "name": "CartSelectedDeliveryOptionInput", "value": "CartSelectedDeliveryOptionInput", "members": [], - "override": "[CartSelectedDeliveryOptionInput](/docs/api/storefront/2024-04/input-objects/CartSelectedDeliveryOptionInput) - Storefront API type" + "override": "[CartSelectedDeliveryOptionInput](/docs/api/storefront/2024-07/input-objects/CartSelectedDeliveryOptionInput) - Storefront API type" }, "CartMetafieldsSetProps": { "filePath": "/cart/CartForm.tsx", @@ -3232,7 +3232,7 @@ "name": "MetafieldWithoutOwnerId", "value": "MetafieldWithoutOwnerId", "members": [], - "override": "Same as [CartMetafieldsSetInput](https://shopify.dev/docs/api/storefront/2024-04/input-objects/CartMetafieldsSetInput) Storefront API type but without `ownerId`. `ownerId` is always set to the cart id." + "override": "Same as [CartMetafieldsSetInput](https://shopify.dev/docs/api/storefront/2024-07/input-objects/CartMetafieldsSetInput) Storefront API type but without `ownerId`. `ownerId` is always set to the cart id." }, "CartMetafieldDeleteProps": { "filePath": "/cart/CartForm.tsx", @@ -3603,7 +3603,7 @@ "filePath": "/cart/createCartHandler.ts", "syntaxKind": "TypeAliasDeclaration", "name": "CartHandlerOptionsForDocs", - "value": "{\n /**\n * A function that returns the cart id in the form of `gid://shopify/Cart/c1-123`.\n */\n getCartId: () => string | undefined;\n /**\n * A function that sets the cart ID.\n */\n setCartId: (cartId: string) => Headers;\n /**\n * The storefront client instance created by [`createStorefrontClient`](docs/api/hydrogen/2024-04/utilities/createstorefrontclient).\n */\n storefront: Storefront;\n /**\n * The cart mutation fragment used in most mutation requests, except for `setMetafields` and `deleteMetafield`.\n * See the [example usage](/docs/api/hydrogen/2024-04/utilities/createcarthandler#example-cart-fragments) in the documentation.\n */\n cartMutateFragment?: string;\n /**\n * The cart query fragment used by `cart.get()`.\n * See the [example usage](/docs/api/hydrogen/2024-04/utilities/createcarthandler#example-cart-fragments) in the documentation.\n */\n cartQueryFragment?: string;\n /**\n * Define custom methods or override existing methods for your cart API instance.\n * See the [example usage](/docs/api/hydrogen/2024-04/utilities/createcarthandler#example-custom-methods) in the documentation.\n */\n customMethods?: TCustomMethods;\n}", + "value": "{\n /**\n * A function that returns the cart id in the form of `gid://shopify/Cart/c1-123`.\n */\n getCartId: () => string | undefined;\n /**\n * A function that sets the cart ID.\n */\n setCartId: (cartId: string) => Headers;\n /**\n * The storefront client instance created by [`createStorefrontClient`](docs/api/hydrogen/2024-07/utilities/createstorefrontclient).\n */\n storefront: Storefront;\n /**\n * The cart mutation fragment used in most mutation requests, except for `setMetafields` and `deleteMetafield`.\n * See the [example usage](/docs/api/hydrogen/2024-07/utilities/createcarthandler#example-cart-fragments) in the documentation.\n */\n cartMutateFragment?: string;\n /**\n * The cart query fragment used by `cart.get()`.\n * See the [example usage](/docs/api/hydrogen/2024-07/utilities/createcarthandler#example-cart-fragments) in the documentation.\n */\n cartQueryFragment?: string;\n /**\n * Define custom methods or override existing methods for your cart API instance.\n * See the [example usage](/docs/api/hydrogen/2024-07/utilities/createcarthandler#example-custom-methods) in the documentation.\n */\n customMethods?: TCustomMethods;\n}", "description": "", "members": [ { @@ -3625,14 +3625,14 @@ "syntaxKind": "PropertySignature", "name": "storefront", "value": "Storefront", - "description": "The storefront client instance created by [`createStorefrontClient`](docs/api/hydrogen/2024-04/utilities/createstorefrontclient)." + "description": "The storefront client instance created by [`createStorefrontClient`](docs/api/hydrogen/2024-07/utilities/createstorefrontclient)." }, { "filePath": "/cart/createCartHandler.ts", "syntaxKind": "PropertySignature", "name": "cartMutateFragment", "value": "string", - "description": "The cart mutation fragment used in most mutation requests, except for `setMetafields` and `deleteMetafield`. See the [example usage](/docs/api/hydrogen/2024-04/utilities/createcarthandler#example-cart-fragments) in the documentation.", + "description": "The cart mutation fragment used in most mutation requests, except for `setMetafields` and `deleteMetafield`. See the [example usage](/docs/api/hydrogen/2024-07/utilities/createcarthandler#example-cart-fragments) in the documentation.", "isOptional": true }, { @@ -3640,7 +3640,7 @@ "syntaxKind": "PropertySignature", "name": "cartQueryFragment", "value": "string", - "description": "The cart query fragment used by `cart.get()`. See the [example usage](/docs/api/hydrogen/2024-04/utilities/createcarthandler#example-cart-fragments) in the documentation.", + "description": "The cart query fragment used by `cart.get()`. See the [example usage](/docs/api/hydrogen/2024-07/utilities/createcarthandler#example-cart-fragments) in the documentation.", "isOptional": true }, { @@ -3648,7 +3648,7 @@ "syntaxKind": "PropertySignature", "name": "customMethods", "value": "TCustomMethods", - "description": "Define custom methods or override existing methods for your cart API instance. See the [example usage](/docs/api/hydrogen/2024-04/utilities/createcarthandler#example-custom-methods) in the documentation.", + "description": "Define custom methods or override existing methods for your cart API instance. See the [example usage](/docs/api/hydrogen/2024-07/utilities/createcarthandler#example-custom-methods) in the documentation.", "isOptional": true } ] @@ -3963,7 +3963,7 @@ }, { "title": "Returns", - "description": "The handler returns the following default methods. Any [custom](/docs/api/hydrogen/2024-04/utilities/createcarthandler#example-custom-methods) or overwritten methods will also be available in the returned cart instance.", + "description": "The handler returns the following default methods. Any [custom](/docs/api/hydrogen/2024-07/utilities/createcarthandler#example-custom-methods) or overwritten methods will also be available in the returned cart instance.", "type": "HydrogenCartForDocs", "typeDefinitions": { "HydrogenCartForDocs": { @@ -4126,7 +4126,7 @@ "name": "CartLineInput", "value": "CartLineInput", "members": [], - "override": "[CartLineInput](/docs/api/storefront/2024-04/input-objects/CartLineInput) - Storefront API type" + "override": "[CartLineInput](/docs/api/storefront/2024-07/input-objects/CartLineInput) - Storefront API type" }, "CartOptionalInput": { "filePath": "/cart/queries/cart-types.ts", @@ -4200,28 +4200,28 @@ "name": "Cart", "value": "Cart", "members": [], - "override": "[Cart](/docs/api/storefront/2024-04/objects/Cart) - Storefront API type" + "override": "[Cart](/docs/api/storefront/2024-07/objects/Cart) - Storefront API type" }, "CartUserError": { "description": "", "name": "CartUserError", "value": "CartUserError", "members": [], - "override": "[CartUserError](/docs/api/storefront/2024-04/objects/CartUserError) - Storefront API type" + "override": "[CartUserError](/docs/api/storefront/2024-07/objects/CartUserError) - Storefront API type" }, "MetafieldsSetUserError": { "description": "", "name": "MetafieldsSetUserError", "value": "MetafieldsSetUserError", "members": [], - "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-04/objects/MetafieldsSetUserError) - Storefront API type" + "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-07/objects/MetafieldsSetUserError) - Storefront API type" }, "MetafieldDeleteUserError": { "description": "", "name": "MetafieldDeleteUserError", "value": "MetafieldDeleteUserError", "members": [], - "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-04/objects/MetafieldDeleteUserError) - Storefront API type" + "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-07/objects/MetafieldDeleteUserError) - Storefront API type" }, "StorefrontApiErrors": { "filePath": "/storefront.ts", @@ -4262,7 +4262,7 @@ "name": "CartInput", "value": "CartInput", "members": [], - "override": "[CartInput](/docs/api/storefront/2024-04/input-objects/CartInput) - Storefront API type" + "override": "[CartInput](/docs/api/storefront/2024-07/input-objects/CartInput) - Storefront API type" }, "CartMetafieldDeleteFunction": { "filePath": "/cart/queries/cartMetafieldDeleteDefault.ts", @@ -4430,7 +4430,7 @@ "name": "MetafieldWithoutOwnerId", "value": "MetafieldWithoutOwnerId", "members": [], - "override": "Same as [CartMetafieldsSetInput](https://shopify.dev/docs/api/storefront/2024-04/input-objects/CartMetafieldsSetInput) Storefront API type but without `ownerId`. `ownerId` is always set to the cart id." + "override": "Same as [CartMetafieldsSetInput](https://shopify.dev/docs/api/storefront/2024-07/input-objects/CartMetafieldsSetInput) Storefront API type but without `ownerId`. `ownerId` is always set to the cart id." }, "CartAttributesUpdateFunction": { "filePath": "/cart/queries/cartAttributesUpdateDefault.ts", @@ -4464,7 +4464,7 @@ "name": "AttributeInput", "value": "AttributeInput", "members": [], - "override": "[AttributeInput](/docs/api/storefront/2024-04/input-objects/AttributeInput) - Storefront API type" + "override": "[AttributeInput](/docs/api/storefront/2024-07/input-objects/AttributeInput) - Storefront API type" }, "CartBuyerIdentityUpdateFunction": { "filePath": "/cart/queries/cartBuyerIdentityUpdateDefault.ts", @@ -4498,7 +4498,7 @@ "name": "CartBuyerIdentityInput", "value": "CartBuyerIdentityInput", "members": [], - "override": "[CartBuyerIdentityInput](/docs/api/storefront/2024-04/input-objects/CartBuyerIdentityInput) - Storefront API type" + "override": "[CartBuyerIdentityInput](/docs/api/storefront/2024-07/input-objects/CartBuyerIdentityInput) - Storefront API type" }, "CartDiscountCodesUpdateFunction": { "filePath": "/cart/queries/cartDiscountCodesUpdateDefault.ts", @@ -4559,7 +4559,7 @@ "name": "CartLineUpdateInput", "value": "CartLineUpdateInput", "members": [], - "override": "[CartLineUpdateInput](/docs/api/storefront/2024-04/input-objects/CartLineUpdateInput) - Storefront API type" + "override": "[CartLineUpdateInput](/docs/api/storefront/2024-07/input-objects/CartLineUpdateInput) - Storefront API type" }, "CartNoteUpdateFunction": { "filePath": "/cart/queries/cartNoteUpdateDefault.ts", @@ -4620,7 +4620,7 @@ "name": "CartSelectedDeliveryOptionInput", "value": "CartSelectedDeliveryOptionInput", "members": [], - "override": "[CartSelectedDeliveryOptionInput](/docs/api/storefront/2024-04/input-objects/CartSelectedDeliveryOptionInput) - Storefront API type" + "override": "[CartSelectedDeliveryOptionInput](/docs/api/storefront/2024-07/input-objects/CartSelectedDeliveryOptionInput) - Storefront API type" } } } @@ -4862,7 +4862,7 @@ { "name": "CartForm", "type": "components", - "url": "/docs/api/hydrogen/2024-04/components/cartform" + "url": "/docs/api/hydrogen/2024-07/components/cartform" } ], "description": "The `useOptimisticCart` takes an existing cart object, processes all pending cart actions, and locally mutates the cart with optimistic state. An optimistic cart makes cart actions immediately render in the browser while actions sync to the server. This increases the perceived performance of the application.", @@ -4930,7 +4930,7 @@ "name": "Cart", "value": "Cart", "members": [], - "override": "[Cart](/docs/api/storefront/2024-04/objects/Cart) - Storefront API type" + "override": "[Cart](/docs/api/storefront/2024-07/objects/Cart) - Storefront API type" }, "StorefrontApiErrors": { "filePath": "/storefront.ts", @@ -4949,7 +4949,7 @@ "subCategory": "cart", "isVisualComponent": false, "related": [], - "description": "Creates a function that accepts an array of [AttributeInput](/docs/api/storefront/2024-04/input-objects/AttributeInput) and updates attributes to a cart", + "description": "Creates a function that accepts an array of [AttributeInput](/docs/api/storefront/2024-07/input-objects/AttributeInput) and updates attributes to a cart", "type": "utility", "defaultExample": { "description": "This is the default example", @@ -5501,7 +5501,7 @@ "name": "AttributeInput", "value": "AttributeInput", "members": [], - "override": "[AttributeInput](/docs/api/storefront/2024-04/input-objects/AttributeInput) - Storefront API type" + "override": "[AttributeInput](/docs/api/storefront/2024-07/input-objects/AttributeInput) - Storefront API type" }, "CartOptionalInput": { "filePath": "/cart/queries/cart-types.ts", @@ -5575,28 +5575,28 @@ "name": "Cart", "value": "Cart", "members": [], - "override": "[Cart](/docs/api/storefront/2024-04/objects/Cart) - Storefront API type" + "override": "[Cart](/docs/api/storefront/2024-07/objects/Cart) - Storefront API type" }, "CartUserError": { "description": "", "name": "CartUserError", "value": "CartUserError", "members": [], - "override": "[CartUserError](/docs/api/storefront/2024-04/objects/CartUserError) - Storefront API type" + "override": "[CartUserError](/docs/api/storefront/2024-07/objects/CartUserError) - Storefront API type" }, "MetafieldsSetUserError": { "description": "", "name": "MetafieldsSetUserError", "value": "MetafieldsSetUserError", "members": [], - "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-04/objects/MetafieldsSetUserError) - Storefront API type" + "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-07/objects/MetafieldsSetUserError) - Storefront API type" }, "MetafieldDeleteUserError": { "description": "", "name": "MetafieldDeleteUserError", "value": "MetafieldDeleteUserError", "members": [], - "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-04/objects/MetafieldDeleteUserError) - Storefront API type" + "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-07/objects/MetafieldDeleteUserError) - Storefront API type" } } } @@ -5608,7 +5608,7 @@ "subCategory": "cart", "isVisualComponent": false, "related": [], - "description": "Creates a function that accepts an object of [CartBuyerIdentityInput](/docs/api/storefront/2024-04/input-objects/CartBuyerIdentityInput) and updates the buyer identity of a cart", + "description": "Creates a function that accepts an object of [CartBuyerIdentityInput](/docs/api/storefront/2024-07/input-objects/CartBuyerIdentityInput) and updates the buyer identity of a cart", "type": "utility", "defaultExample": { "description": "This is the default example", @@ -6160,7 +6160,7 @@ "name": "CartBuyerIdentityInput", "value": "CartBuyerIdentityInput", "members": [], - "override": "[CartBuyerIdentityInput](/docs/api/storefront/2024-04/input-objects/CartBuyerIdentityInput) - Storefront API type" + "override": "[CartBuyerIdentityInput](/docs/api/storefront/2024-07/input-objects/CartBuyerIdentityInput) - Storefront API type" }, "CartOptionalInput": { "filePath": "/cart/queries/cart-types.ts", @@ -6234,28 +6234,28 @@ "name": "Cart", "value": "Cart", "members": [], - "override": "[Cart](/docs/api/storefront/2024-04/objects/Cart) - Storefront API type" + "override": "[Cart](/docs/api/storefront/2024-07/objects/Cart) - Storefront API type" }, "CartUserError": { "description": "", "name": "CartUserError", "value": "CartUserError", "members": [], - "override": "[CartUserError](/docs/api/storefront/2024-04/objects/CartUserError) - Storefront API type" + "override": "[CartUserError](/docs/api/storefront/2024-07/objects/CartUserError) - Storefront API type" }, "MetafieldsSetUserError": { "description": "", "name": "MetafieldsSetUserError", "value": "MetafieldsSetUserError", "members": [], - "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-04/objects/MetafieldsSetUserError) - Storefront API type" + "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-07/objects/MetafieldsSetUserError) - Storefront API type" }, "MetafieldDeleteUserError": { "description": "", "name": "MetafieldDeleteUserError", "value": "MetafieldDeleteUserError", "members": [], - "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-04/objects/MetafieldDeleteUserError) - Storefront API type" + "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-07/objects/MetafieldDeleteUserError) - Storefront API type" } } } @@ -6267,7 +6267,7 @@ "subCategory": "cart", "isVisualComponent": false, "related": [], - "description": "Creates a function that accepts an object of [CartInput](/docs/api/storefront/2024-04/input-objects/CartInput) and returns a new cart", + "description": "Creates a function that accepts an object of [CartInput](/docs/api/storefront/2024-07/input-objects/CartInput) and returns a new cart", "type": "utility", "defaultExample": { "description": "This is the default example", @@ -6819,7 +6819,7 @@ "name": "CartInput", "value": "CartInput", "members": [], - "override": "[CartInput](/docs/api/storefront/2024-04/input-objects/CartInput) - Storefront API type" + "override": "[CartInput](/docs/api/storefront/2024-07/input-objects/CartInput) - Storefront API type" }, "CartOptionalInput": { "filePath": "/cart/queries/cart-types.ts", @@ -6893,28 +6893,28 @@ "name": "Cart", "value": "Cart", "members": [], - "override": "[Cart](/docs/api/storefront/2024-04/objects/Cart) - Storefront API type" + "override": "[Cart](/docs/api/storefront/2024-07/objects/Cart) - Storefront API type" }, "CartUserError": { "description": "", "name": "CartUserError", "value": "CartUserError", "members": [], - "override": "[CartUserError](/docs/api/storefront/2024-04/objects/CartUserError) - Storefront API type" + "override": "[CartUserError](/docs/api/storefront/2024-07/objects/CartUserError) - Storefront API type" }, "MetafieldsSetUserError": { "description": "", "name": "MetafieldsSetUserError", "value": "MetafieldsSetUserError", "members": [], - "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-04/objects/MetafieldsSetUserError) - Storefront API type" + "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-07/objects/MetafieldsSetUserError) - Storefront API type" }, "MetafieldDeleteUserError": { "description": "", "name": "MetafieldDeleteUserError", "value": "MetafieldDeleteUserError", "members": [], - "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-04/objects/MetafieldDeleteUserError) - Storefront API type" + "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-07/objects/MetafieldDeleteUserError) - Storefront API type" } } } @@ -7545,28 +7545,28 @@ "name": "Cart", "value": "Cart", "members": [], - "override": "[Cart](/docs/api/storefront/2024-04/objects/Cart) - Storefront API type" + "override": "[Cart](/docs/api/storefront/2024-07/objects/Cart) - Storefront API type" }, "CartUserError": { "description": "", "name": "CartUserError", "value": "CartUserError", "members": [], - "override": "[CartUserError](/docs/api/storefront/2024-04/objects/CartUserError) - Storefront API type" + "override": "[CartUserError](/docs/api/storefront/2024-07/objects/CartUserError) - Storefront API type" }, "MetafieldsSetUserError": { "description": "", "name": "MetafieldsSetUserError", "value": "MetafieldsSetUserError", "members": [], - "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-04/objects/MetafieldsSetUserError) - Storefront API type" + "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-07/objects/MetafieldsSetUserError) - Storefront API type" }, "MetafieldDeleteUserError": { "description": "", "name": "MetafieldDeleteUserError", "value": "MetafieldDeleteUserError", "members": [], - "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-04/objects/MetafieldDeleteUserError) - Storefront API type" + "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-07/objects/MetafieldDeleteUserError) - Storefront API type" } } } @@ -8183,7 +8183,7 @@ "name": "Cart", "value": "Cart", "members": [], - "override": "[Cart](/docs/api/storefront/2024-04/objects/Cart) - Storefront API type" + "override": "[Cart](/docs/api/storefront/2024-07/objects/Cart) - Storefront API type" } } } @@ -8195,7 +8195,7 @@ "subCategory": "cart", "isVisualComponent": false, "related": [], - "description": "Creates a function that accepts an array of [CartLineInput](/docs/api/storefront/2024-04/input-objects/CartLineInput) and adds the line items to a cart", + "description": "Creates a function that accepts an array of [CartLineInput](/docs/api/storefront/2024-07/input-objects/CartLineInput) and adds the line items to a cart", "type": "utility", "defaultExample": { "description": "This is the default example", @@ -8754,7 +8754,7 @@ "name": "CartLineInput", "value": "CartLineInput", "members": [], - "override": "[CartLineInput](/docs/api/storefront/2024-04/input-objects/CartLineInput) - Storefront API type" + "override": "[CartLineInput](/docs/api/storefront/2024-07/input-objects/CartLineInput) - Storefront API type" }, "CartOptionalInput": { "filePath": "/cart/queries/cart-types.ts", @@ -8828,28 +8828,28 @@ "name": "Cart", "value": "Cart", "members": [], - "override": "[Cart](/docs/api/storefront/2024-04/objects/Cart) - Storefront API type" + "override": "[Cart](/docs/api/storefront/2024-07/objects/Cart) - Storefront API type" }, "CartUserError": { "description": "", "name": "CartUserError", "value": "CartUserError", "members": [], - "override": "[CartUserError](/docs/api/storefront/2024-04/objects/CartUserError) - Storefront API type" + "override": "[CartUserError](/docs/api/storefront/2024-07/objects/CartUserError) - Storefront API type" }, "MetafieldsSetUserError": { "description": "", "name": "MetafieldsSetUserError", "value": "MetafieldsSetUserError", "members": [], - "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-04/objects/MetafieldsSetUserError) - Storefront API type" + "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-07/objects/MetafieldsSetUserError) - Storefront API type" }, "MetafieldDeleteUserError": { "description": "", "name": "MetafieldDeleteUserError", "value": "MetafieldDeleteUserError", "members": [], - "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-04/objects/MetafieldDeleteUserError) - Storefront API type" + "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-07/objects/MetafieldDeleteUserError) - Storefront API type" } } } @@ -9480,28 +9480,28 @@ "name": "Cart", "value": "Cart", "members": [], - "override": "[Cart](/docs/api/storefront/2024-04/objects/Cart) - Storefront API type" + "override": "[Cart](/docs/api/storefront/2024-07/objects/Cart) - Storefront API type" }, "CartUserError": { "description": "", "name": "CartUserError", "value": "CartUserError", "members": [], - "override": "[CartUserError](/docs/api/storefront/2024-04/objects/CartUserError) - Storefront API type" + "override": "[CartUserError](/docs/api/storefront/2024-07/objects/CartUserError) - Storefront API type" }, "MetafieldsSetUserError": { "description": "", "name": "MetafieldsSetUserError", "value": "MetafieldsSetUserError", "members": [], - "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-04/objects/MetafieldsSetUserError) - Storefront API type" + "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-07/objects/MetafieldsSetUserError) - Storefront API type" }, "MetafieldDeleteUserError": { "description": "", "name": "MetafieldDeleteUserError", "value": "MetafieldDeleteUserError", "members": [], - "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-04/objects/MetafieldDeleteUserError) - Storefront API type" + "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-07/objects/MetafieldDeleteUserError) - Storefront API type" } } } @@ -9513,7 +9513,7 @@ "subCategory": "cart", "isVisualComponent": false, "related": [], - "description": "Creates a function that accepts an array of [CartLineUpdateInput](/docs/api/storefront/2024-04/input-objects/CartLineUpdateInput) and updates the line items in a cart", + "description": "Creates a function that accepts an array of [CartLineUpdateInput](/docs/api/storefront/2024-07/input-objects/CartLineUpdateInput) and updates the line items in a cart", "type": "utility", "defaultExample": { "description": "This is the default example", @@ -10065,7 +10065,7 @@ "name": "CartLineUpdateInput", "value": "CartLineUpdateInput", "members": [], - "override": "[CartLineUpdateInput](/docs/api/storefront/2024-04/input-objects/CartLineUpdateInput) - Storefront API type" + "override": "[CartLineUpdateInput](/docs/api/storefront/2024-07/input-objects/CartLineUpdateInput) - Storefront API type" }, "CartOptionalInput": { "filePath": "/cart/queries/cart-types.ts", @@ -10139,28 +10139,28 @@ "name": "Cart", "value": "Cart", "members": [], - "override": "[Cart](/docs/api/storefront/2024-04/objects/Cart) - Storefront API type" + "override": "[Cart](/docs/api/storefront/2024-07/objects/Cart) - Storefront API type" }, "CartUserError": { "description": "", "name": "CartUserError", "value": "CartUserError", "members": [], - "override": "[CartUserError](/docs/api/storefront/2024-04/objects/CartUserError) - Storefront API type" + "override": "[CartUserError](/docs/api/storefront/2024-07/objects/CartUserError) - Storefront API type" }, "MetafieldsSetUserError": { "description": "", "name": "MetafieldsSetUserError", "value": "MetafieldsSetUserError", "members": [], - "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-04/objects/MetafieldsSetUserError) - Storefront API type" + "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-07/objects/MetafieldsSetUserError) - Storefront API type" }, "MetafieldDeleteUserError": { "description": "", "name": "MetafieldDeleteUserError", "value": "MetafieldDeleteUserError", "members": [], - "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-04/objects/MetafieldDeleteUserError) - Storefront API type" + "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-07/objects/MetafieldDeleteUserError) - Storefront API type" } } } @@ -10791,28 +10791,28 @@ "name": "Cart", "value": "Cart", "members": [], - "override": "[Cart](/docs/api/storefront/2024-04/objects/Cart) - Storefront API type" + "override": "[Cart](/docs/api/storefront/2024-07/objects/Cart) - Storefront API type" }, "CartUserError": { "description": "", "name": "CartUserError", "value": "CartUserError", "members": [], - "override": "[CartUserError](/docs/api/storefront/2024-04/objects/CartUserError) - Storefront API type" + "override": "[CartUserError](/docs/api/storefront/2024-07/objects/CartUserError) - Storefront API type" }, "MetafieldsSetUserError": { "description": "", "name": "MetafieldsSetUserError", "value": "MetafieldsSetUserError", "members": [], - "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-04/objects/MetafieldsSetUserError) - Storefront API type" + "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-07/objects/MetafieldsSetUserError) - Storefront API type" }, "MetafieldDeleteUserError": { "description": "", "name": "MetafieldDeleteUserError", "value": "MetafieldDeleteUserError", "members": [], - "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-04/objects/MetafieldDeleteUserError) - Storefront API type" + "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-07/objects/MetafieldDeleteUserError) - Storefront API type" } } } @@ -10824,7 +10824,7 @@ "subCategory": "cart", "isVisualComponent": false, "related": [], - "description": "Creates a function that accepts an array of [CartMetafieldsSetInput](https://shopify.dev/docs/api/storefront/2024-04/input-objects/CartMetafieldsSetInput) without `ownerId` and set the metafields to a cart", + "description": "Creates a function that accepts an array of [CartMetafieldsSetInput](https://shopify.dev/docs/api/storefront/2024-07/input-objects/CartMetafieldsSetInput) without `ownerId` and set the metafields to a cart", "type": "utility", "defaultExample": { "description": "This is the default example", @@ -11376,7 +11376,7 @@ "name": "MetafieldWithoutOwnerId", "value": "MetafieldWithoutOwnerId", "members": [], - "override": "Same as [CartMetafieldsSetInput](https://shopify.dev/docs/api/storefront/2024-04/input-objects/CartMetafieldsSetInput) Storefront API type but without `ownerId`. `ownerId` is always set to the cart id." + "override": "Same as [CartMetafieldsSetInput](https://shopify.dev/docs/api/storefront/2024-07/input-objects/CartMetafieldsSetInput) Storefront API type but without `ownerId`. `ownerId` is always set to the cart id." }, "CartOptionalInput": { "filePath": "/cart/queries/cart-types.ts", @@ -11450,28 +11450,28 @@ "name": "Cart", "value": "Cart", "members": [], - "override": "[Cart](/docs/api/storefront/2024-04/objects/Cart) - Storefront API type" + "override": "[Cart](/docs/api/storefront/2024-07/objects/Cart) - Storefront API type" }, "CartUserError": { "description": "", "name": "CartUserError", "value": "CartUserError", "members": [], - "override": "[CartUserError](/docs/api/storefront/2024-04/objects/CartUserError) - Storefront API type" + "override": "[CartUserError](/docs/api/storefront/2024-07/objects/CartUserError) - Storefront API type" }, "MetafieldsSetUserError": { "description": "", "name": "MetafieldsSetUserError", "value": "MetafieldsSetUserError", "members": [], - "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-04/objects/MetafieldsSetUserError) - Storefront API type" + "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-07/objects/MetafieldsSetUserError) - Storefront API type" }, "MetafieldDeleteUserError": { "description": "", "name": "MetafieldDeleteUserError", "value": "MetafieldDeleteUserError", "members": [], - "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-04/objects/MetafieldDeleteUserError) - Storefront API type" + "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-07/objects/MetafieldDeleteUserError) - Storefront API type" } } } @@ -12102,28 +12102,28 @@ "name": "Cart", "value": "Cart", "members": [], - "override": "[Cart](/docs/api/storefront/2024-04/objects/Cart) - Storefront API type" + "override": "[Cart](/docs/api/storefront/2024-07/objects/Cart) - Storefront API type" }, "CartUserError": { "description": "", "name": "CartUserError", "value": "CartUserError", "members": [], - "override": "[CartUserError](/docs/api/storefront/2024-04/objects/CartUserError) - Storefront API type" + "override": "[CartUserError](/docs/api/storefront/2024-07/objects/CartUserError) - Storefront API type" }, "MetafieldsSetUserError": { "description": "", "name": "MetafieldsSetUserError", "value": "MetafieldsSetUserError", "members": [], - "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-04/objects/MetafieldsSetUserError) - Storefront API type" + "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-07/objects/MetafieldsSetUserError) - Storefront API type" }, "MetafieldDeleteUserError": { "description": "", "name": "MetafieldDeleteUserError", "value": "MetafieldDeleteUserError", "members": [], - "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-04/objects/MetafieldDeleteUserError) - Storefront API type" + "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-07/objects/MetafieldDeleteUserError) - Storefront API type" } } } @@ -12135,7 +12135,7 @@ "subCategory": "cart", "isVisualComponent": false, "related": [], - "description": "Creates a function that accepts an object of [CartSelectedDeliveryOptionInput](/docs/api/storefront/2024-04/input-objects/CartSelectedDeliveryOptionInput) and updates the selected delivery option of a cart", + "description": "Creates a function that accepts an object of [CartSelectedDeliveryOptionInput](/docs/api/storefront/2024-07/input-objects/CartSelectedDeliveryOptionInput) and updates the selected delivery option of a cart", "type": "utility", "defaultExample": { "description": "This is the default example", @@ -12687,7 +12687,7 @@ "name": "CartSelectedDeliveryOptionInput", "value": "CartSelectedDeliveryOptionInput", "members": [], - "override": "[CartSelectedDeliveryOptionInput](/docs/api/storefront/2024-04/input-objects/CartSelectedDeliveryOptionInput) - Storefront API type" + "override": "[CartSelectedDeliveryOptionInput](/docs/api/storefront/2024-07/input-objects/CartSelectedDeliveryOptionInput) - Storefront API type" }, "CartOptionalInput": { "filePath": "/cart/queries/cart-types.ts", @@ -12761,28 +12761,28 @@ "name": "Cart", "value": "Cart", "members": [], - "override": "[Cart](/docs/api/storefront/2024-04/objects/Cart) - Storefront API type" + "override": "[Cart](/docs/api/storefront/2024-07/objects/Cart) - Storefront API type" }, "CartUserError": { "description": "", "name": "CartUserError", "value": "CartUserError", "members": [], - "override": "[CartUserError](/docs/api/storefront/2024-04/objects/CartUserError) - Storefront API type" + "override": "[CartUserError](/docs/api/storefront/2024-07/objects/CartUserError) - Storefront API type" }, "MetafieldsSetUserError": { "description": "", "name": "MetafieldsSetUserError", "value": "MetafieldsSetUserError", "members": [], - "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-04/objects/MetafieldsSetUserError) - Storefront API type" + "override": "[MetafieldsSetUserError](/docs/api/storefront/2024-07/objects/MetafieldsSetUserError) - Storefront API type" }, "MetafieldDeleteUserError": { "description": "", "name": "MetafieldDeleteUserError", "value": "MetafieldDeleteUserError", "members": [], - "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-04/objects/MetafieldDeleteUserError) - Storefront API type" + "override": "[MetafieldDeleteUserError](/docs/api/storefront/2024-07/objects/MetafieldDeleteUserError) - Storefront API type" } } } @@ -12796,30 +12796,30 @@ { "name": "CacheNone", "type": "utilities", - "url": "/docs/api/hydrogen/2024-04/utilities/cachenone" + "url": "/docs/api/hydrogen/2024-07/utilities/cachenone" }, { "name": "CacheShort", "type": "utilities", - "url": "/docs/api/hydrogen/2024-04/utilities/cacheshort" + "url": "/docs/api/hydrogen/2024-07/utilities/cacheshort" }, { "name": "CacheLong", "type": "utilities", - "url": "/docs/api/hydrogen/2024-04/utilities/cachelong" + "url": "/docs/api/hydrogen/2024-07/utilities/cachelong" }, { "name": "CacheCustom", "type": "utilities", - "url": "/docs/api/hydrogen/2024-04/utilities/cachecustom" + "url": "/docs/api/hydrogen/2024-07/utilities/cachecustom" }, { "name": "InMemoryCache", "type": "utilities", - "url": "/docs/api/hydrogen/2024-04/utilities/inmemorycache" + "url": "/docs/api/hydrogen/2024-07/utilities/inmemorycache" } ], - "description": "This function extends `createStorefrontClient` from [Hydrogen React](/docs/api/hydrogen-react/2024-04/utilities/createstorefrontclient).\nThe additional arguments enable internationalization (i18n), caching, and other features particular to Remix and Oxygen.\n\nLearn more about [data fetching in Hydrogen](/docs/custom-storefronts/hydrogen/data-fetching/fetch-data).", + "description": "This function extends `createStorefrontClient` from [Hydrogen React](/docs/api/hydrogen-react/2024-07/utilities/createstorefrontclient).\nThe additional arguments enable internationalization (i18n), caching, and other features particular to Remix and Oxygen.\n\nLearn more about [data fetching in Hydrogen](/docs/custom-storefronts/hydrogen/data-fetching/fetch-data).", "type": "utility", "defaultExample": { "description": "I am the default example", @@ -12974,7 +12974,7 @@ "filePath": "/storefront.ts", "syntaxKind": "TypeAliasDeclaration", "name": "StorefrontForDoc", - "value": "{\n /** The function to run a query on Storefront API. */\n query?: (\n query: string,\n options: StorefrontQueryOptionsForDocs,\n ) => Promise;\n /** The function to run a mutation on Storefront API. */\n mutate?: (\n mutation: string,\n options: StorefrontMutationOptionsForDocs,\n ) => Promise;\n /** The cache instance passed in from the `createStorefrontClient` argument. */\n cache?: Cache;\n /** Re-export of [`CacheNone`](/docs/api/hydrogen/2024-04/utilities/cachenone). */\n CacheNone?: typeof CacheNone;\n /** Re-export of [`CacheLong`](/docs/api/hydrogen/2024-04/utilities/cachelong). */\n CacheLong?: typeof CacheLong;\n /** Re-export of [`CacheShort`](/docs/api/hydrogen/2024-04/utilities/cacheshort). */\n CacheShort?: typeof CacheShort;\n /** Re-export of [`CacheCustom`](/docs/api/hydrogen/2024-04/utilities/cachecustom). */\n CacheCustom?: typeof CacheCustom;\n /** Re-export of [`generateCacheControlHeader`](/docs/api/hydrogen/2024-04/utilities/generatecachecontrolheader). */\n generateCacheControlHeader?: typeof generateCacheControlHeader;\n /** Returns an object that contains headers that are needed for each query to Storefront API GraphQL endpoint. See [`getPublicTokenHeaders` in Hydrogen React](/docs/api/hydrogen-react/2024-04/utilities/createstorefrontclient#:~:text=%27graphql%27.-,getPublicTokenHeaders,-(props%3F%3A) for more details. */\n getPublicTokenHeaders?: ReturnType<\n typeof createStorefrontUtilities\n >['getPublicTokenHeaders'];\n /** Returns an object that contains headers that are needed for each query to Storefront API GraphQL endpoint for API calls made from a server. See [`getPrivateTokenHeaders` in Hydrogen React](/docs/api/hydrogen-react/2024-04/utilities/createstorefrontclient#:~:text=storefrontApiVersion-,getPrivateTokenHeaders,-(props%3F%3A) for more details.*/\n getPrivateTokenHeaders?: ReturnType<\n typeof createStorefrontUtilities\n >['getPrivateTokenHeaders'];\n /** Creates the fully-qualified URL to your myshopify.com domain. See [`getShopifyDomain` in Hydrogen React](/docs/api/hydrogen-react/2024-04/utilities/createstorefrontclient#:~:text=StorefrontClientReturn-,getShopifyDomain,-(props%3F%3A) for more details. */\n getShopifyDomain?: ReturnType<\n typeof createStorefrontUtilities\n >['getShopifyDomain'];\n /** Creates the fully-qualified URL to your store's GraphQL endpoint. See [`getStorefrontApiUrl` in Hydrogen React](/docs/api/hydrogen-react/2024-04/utilities/createstorefrontclient#:~:text=storeDomain-,getStorefrontApiUrl,-(props%3F%3A) for more details.*/\n getApiUrl?: ReturnType<\n typeof createStorefrontUtilities\n >['getStorefrontApiUrl'];\n /** The `i18n` object passed in from the `createStorefrontClient` argument. */\n i18n?: TI18n;\n}", + "value": "{\n /** The function to run a query on Storefront API. */\n query?: (\n query: string,\n options: StorefrontQueryOptionsForDocs,\n ) => Promise;\n /** The function to run a mutation on Storefront API. */\n mutate?: (\n mutation: string,\n options: StorefrontMutationOptionsForDocs,\n ) => Promise;\n /** The cache instance passed in from the `createStorefrontClient` argument. */\n cache?: Cache;\n /** Re-export of [`CacheNone`](/docs/api/hydrogen/2024-07/utilities/cachenone). */\n CacheNone?: typeof CacheNone;\n /** Re-export of [`CacheLong`](/docs/api/hydrogen/2024-07/utilities/cachelong). */\n CacheLong?: typeof CacheLong;\n /** Re-export of [`CacheShort`](/docs/api/hydrogen/2024-07/utilities/cacheshort). */\n CacheShort?: typeof CacheShort;\n /** Re-export of [`CacheCustom`](/docs/api/hydrogen/2024-07/utilities/cachecustom). */\n CacheCustom?: typeof CacheCustom;\n /** Re-export of [`generateCacheControlHeader`](/docs/api/hydrogen/2024-07/utilities/generatecachecontrolheader). */\n generateCacheControlHeader?: typeof generateCacheControlHeader;\n /** Returns an object that contains headers that are needed for each query to Storefront API GraphQL endpoint. See [`getPublicTokenHeaders` in Hydrogen React](/docs/api/hydrogen-react/2024-07/utilities/createstorefrontclient#:~:text=%27graphql%27.-,getPublicTokenHeaders,-(props%3F%3A) for more details. */\n getPublicTokenHeaders?: ReturnType<\n typeof createStorefrontUtilities\n >['getPublicTokenHeaders'];\n /** Returns an object that contains headers that are needed for each query to Storefront API GraphQL endpoint for API calls made from a server. See [`getPrivateTokenHeaders` in Hydrogen React](/docs/api/hydrogen-react/2024-07/utilities/createstorefrontclient#:~:text=storefrontApiVersion-,getPrivateTokenHeaders,-(props%3F%3A) for more details.*/\n getPrivateTokenHeaders?: ReturnType<\n typeof createStorefrontUtilities\n >['getPrivateTokenHeaders'];\n /** Creates the fully-qualified URL to your myshopify.com domain. See [`getShopifyDomain` in Hydrogen React](/docs/api/hydrogen-react/2024-07/utilities/createstorefrontclient#:~:text=StorefrontClientReturn-,getShopifyDomain,-(props%3F%3A) for more details. */\n getShopifyDomain?: ReturnType<\n typeof createStorefrontUtilities\n >['getShopifyDomain'];\n /** Creates the fully-qualified URL to your store's GraphQL endpoint. See [`getStorefrontApiUrl` in Hydrogen React](/docs/api/hydrogen-react/2024-07/utilities/createstorefrontclient#:~:text=storeDomain-,getStorefrontApiUrl,-(props%3F%3A) for more details.*/\n getApiUrl?: ReturnType<\n typeof createStorefrontUtilities\n >['getStorefrontApiUrl'];\n /** The `i18n` object passed in from the `createStorefrontClient` argument. */\n i18n?: TI18n;\n}", "description": "", "members": [ { @@ -13006,7 +13006,7 @@ "syntaxKind": "PropertySignature", "name": "CacheNone", "value": "() => NoStoreStrategy", - "description": "Re-export of [`CacheNone`](/docs/api/hydrogen/2024-04/utilities/cachenone).", + "description": "Re-export of [`CacheNone`](/docs/api/hydrogen/2024-07/utilities/cachenone).", "isOptional": true }, { @@ -13014,7 +13014,7 @@ "syntaxKind": "PropertySignature", "name": "CacheLong", "value": "(overrideOptions?: AllCacheOptions) => AllCacheOptions", - "description": "Re-export of [`CacheLong`](/docs/api/hydrogen/2024-04/utilities/cachelong).", + "description": "Re-export of [`CacheLong`](/docs/api/hydrogen/2024-07/utilities/cachelong).", "isOptional": true }, { @@ -13022,7 +13022,7 @@ "syntaxKind": "PropertySignature", "name": "CacheShort", "value": "(overrideOptions?: AllCacheOptions) => AllCacheOptions", - "description": "Re-export of [`CacheShort`](/docs/api/hydrogen/2024-04/utilities/cacheshort).", + "description": "Re-export of [`CacheShort`](/docs/api/hydrogen/2024-07/utilities/cacheshort).", "isOptional": true }, { @@ -13030,7 +13030,7 @@ "syntaxKind": "PropertySignature", "name": "CacheCustom", "value": "(overrideOptions: AllCacheOptions) => AllCacheOptions", - "description": "Re-export of [`CacheCustom`](/docs/api/hydrogen/2024-04/utilities/cachecustom).", + "description": "Re-export of [`CacheCustom`](/docs/api/hydrogen/2024-07/utilities/cachecustom).", "isOptional": true }, { @@ -13038,7 +13038,7 @@ "syntaxKind": "PropertySignature", "name": "generateCacheControlHeader", "value": "(cacheOptions: AllCacheOptions) => string", - "description": "Re-export of [`generateCacheControlHeader`](/docs/api/hydrogen/2024-04/utilities/generatecachecontrolheader).", + "description": "Re-export of [`generateCacheControlHeader`](/docs/api/hydrogen/2024-07/utilities/generatecachecontrolheader).", "isOptional": true }, { @@ -13046,7 +13046,7 @@ "syntaxKind": "PropertySignature", "name": "getPublicTokenHeaders", "value": "(props?: Partial> & Pick) => Record", - "description": "Returns an object that contains headers that are needed for each query to Storefront API GraphQL endpoint. See [`getPublicTokenHeaders` in Hydrogen React](/docs/api/hydrogen-react/2024-04/utilities/createstorefrontclient#:~:text=%27graphql%27.-,getPublicTokenHeaders,-(props%3F%3A) for more details.", + "description": "Returns an object that contains headers that are needed for each query to Storefront API GraphQL endpoint. See [`getPublicTokenHeaders` in Hydrogen React](/docs/api/hydrogen-react/2024-07/utilities/createstorefrontclient#:~:text=%27graphql%27.-,getPublicTokenHeaders,-(props%3F%3A) for more details.", "isOptional": true }, { @@ -13054,7 +13054,7 @@ "syntaxKind": "PropertySignature", "name": "getPrivateTokenHeaders", "value": "(props?: Partial> & Pick & { buyerIp?: string; }) => Record", - "description": "Returns an object that contains headers that are needed for each query to Storefront API GraphQL endpoint for API calls made from a server. See [`getPrivateTokenHeaders` in Hydrogen React](/docs/api/hydrogen-react/2024-04/utilities/createstorefrontclient#:~:text=storefrontApiVersion-,getPrivateTokenHeaders,-(props%3F%3A) for more details.", + "description": "Returns an object that contains headers that are needed for each query to Storefront API GraphQL endpoint for API calls made from a server. See [`getPrivateTokenHeaders` in Hydrogen React](/docs/api/hydrogen-react/2024-07/utilities/createstorefrontclient#:~:text=storefrontApiVersion-,getPrivateTokenHeaders,-(props%3F%3A) for more details.", "isOptional": true }, { @@ -13062,7 +13062,7 @@ "syntaxKind": "PropertySignature", "name": "getShopifyDomain", "value": "(props?: Partial>) => string", - "description": "Creates the fully-qualified URL to your myshopify.com domain. See [`getShopifyDomain` in Hydrogen React](/docs/api/hydrogen-react/2024-04/utilities/createstorefrontclient#:~:text=StorefrontClientReturn-,getShopifyDomain,-(props%3F%3A) for more details.", + "description": "Creates the fully-qualified URL to your myshopify.com domain. See [`getShopifyDomain` in Hydrogen React](/docs/api/hydrogen-react/2024-07/utilities/createstorefrontclient#:~:text=StorefrontClientReturn-,getShopifyDomain,-(props%3F%3A) for more details.", "isOptional": true }, { @@ -13070,7 +13070,7 @@ "syntaxKind": "PropertySignature", "name": "getApiUrl", "value": "(props?: Partial>) => string", - "description": "Creates the fully-qualified URL to your store's GraphQL endpoint. See [`getStorefrontApiUrl` in Hydrogen React](/docs/api/hydrogen-react/2024-04/utilities/createstorefrontclient#:~:text=storeDomain-,getStorefrontApiUrl,-(props%3F%3A) for more details.", + "description": "Creates the fully-qualified URL to your store's GraphQL endpoint. See [`getStorefrontApiUrl` in Hydrogen React](/docs/api/hydrogen-react/2024-07/utilities/createstorefrontclient#:~:text=storeDomain-,getStorefrontApiUrl,-(props%3F%3A) for more details.", "isOptional": true }, { @@ -13322,12 +13322,12 @@ { "name": "createContentSecurityPolicy", "type": "utilities", - "url": "/docs/api/hydrogen/2024-04/utilities/createcontentsecuritypolicy" + "url": "/docs/api/hydrogen/2024-07/utilities/createcontentsecuritypolicy" }, { "name": "useNonce", "type": "hooks", - "url": "/docs/api/hydrogen/2024-04/hooks/usenonce" + "url": "/docs/api/hydrogen/2024-07/hooks/usenonce" } ], "description": "Use the `Script` component to add third-party scripts to your app. It automatically adds a nonce attribute from your [content security policy](/docs/custom-storefronts/hydrogen/content-security-policy).", @@ -13375,12 +13375,12 @@ { "name": "useNonce", "type": "hooks", - "url": "/docs/api/hydrogen/2024-04/hooks/usenonce" + "url": "/docs/api/hydrogen/2024-07/hooks/usenonce" }, { "name": "Script", "type": "components", - "url": "/docs/api/hydrogen/2024-04/components/script" + "url": "/docs/api/hydrogen/2024-07/components/script" } ], "description": "Create a [content security policy](/docs/custom-storefronts/hydrogen/content-security-policy) to secure your application. The default content security policy includes exclusions for cdn.shopify.com and a script nonce.", @@ -13722,12 +13722,12 @@ { "name": "createContentSecurityPolicy", "type": "utilities", - "url": "/docs/api/hydrogen/2024-04/utilities/createcontentsecuritypolicy" + "url": "/docs/api/hydrogen/2024-07/utilities/createcontentsecuritypolicy" }, { "name": "Script", "type": "components", - "url": "/docs/api/hydrogen/2024-04/components/script" + "url": "/docs/api/hydrogen/2024-07/components/script" } ], "description": "The `useNonce` hook returns the [content security policy](/docs/custom-storefronts/hydrogen/content-security-policy) nonce. Use the hook to manually add a nonce to third party scripts. The `Script` component automatically does this for you. Note, the nonce should never be available in the client, and should always return undefined in the browser.", @@ -13957,7 +13957,7 @@ { "name": "createStorefrontClient", "type": "utility", - "url": "/docs/api/hydrogen/2024-04/utilities/createstorefrontclient" + "url": "/docs/api/hydrogen/2024-07/utilities/createstorefrontclient" } ], "description": "\nThe `createCustomerAccountClient` function creates a GraphQL client for querying the [Customer Account API](https://shopify.dev/docs/api/customer). It also provides methods to authenticate and check if the user is logged in.", @@ -14432,7 +14432,7 @@ { "name": "getPaginationVariables", "type": "utilities", - "url": "/docs/api/hydrogen/2024-04/utilities/getpaginationvariables" + "url": "/docs/api/hydrogen/2024-07/utilities/getpaginationvariables" } ], "description": "The [Storefront API uses cursors](https://shopify.dev/docs/api/usage/pagination-graphql) to paginate through lists of data and the `` component makes it easy to paginate data from the Storefront API. It is important for pagination state to be maintained in the URL, so that the user can navigate to a product and return back to the same scrolled position in a list. It is also important that the list state is shareable via URL. The `` component provides a render prop with properties to load more elements into your list.", @@ -14615,7 +14615,7 @@ { "name": "Pagination", "type": "components", - "url": "/docs/api/hydrogen/2024-04/components/pagination" + "url": "/docs/api/hydrogen/2024-07/components/pagination" } ], "description": "The `getPaginationVariables` function is used with the [``](/docs/api/hydrogen/components/pagnination) component to generate the variables needed to fetch paginated data from the Storefront API. The returned variables should be used within your storefront GraphQL query.", @@ -14684,7 +14684,7 @@ { "name": "getSelectedProductOptions", "type": "utilities", - "url": "/docs/api/hydrogen/2024-04/utilities/getselectedproductoptions" + "url": "/docs/api/hydrogen/2024-07/utilities/getselectedproductoptions" } ], "description": "The `VariantSelector` component helps you build a form for selecting available variants of a product. It is important for variant selection state to be maintained in the URL, so that the user can navigate to a product and return back to the same variant selection. It is also important that the variant selection state is shareable via URL. The `VariantSelector` component provides a render prop that renders for each product option.", @@ -14717,7 +14717,7 @@ "filePath": "/product/VariantSelector.ts", "syntaxKind": "TypeAliasDeclaration", "name": "VariantSelectorProps", - "value": "{\n /** The product handle for all of the variants */\n handle: string;\n /** Product options from the [Storefront API](/docs/api/storefront/2024-04/objects/ProductOption). Make sure both `name` and `values` are apart of your query. */\n options: Array> | undefined;\n /** Product variants from the [Storefront API](/docs/api/storefront/2024-04/objects/ProductVariant). You only need to pass this prop if you want to show product availability. If a product option combination is not found within `variants`, it is assumed to be available. Make sure to include `availableForSale` and `selectedOptions.name` and `selectedOptions.value`. */\n variants?:\n | PartialDeep\n | Array>;\n /** By default all products are under /products. Use this prop to provide a custom path. */\n productPath?: string;\n children: ({option}: {option: VariantOption}) => ReactNode;\n}", + "value": "{\n /** The product handle for all of the variants */\n handle: string;\n /** Product options from the [Storefront API](/docs/api/storefront/2024-07/objects/ProductOption). Make sure both `name` and `values` are apart of your query. */\n options: Array> | undefined;\n /** Product variants from the [Storefront API](/docs/api/storefront/2024-07/objects/ProductVariant). You only need to pass this prop if you want to show product availability. If a product option combination is not found within `variants`, it is assumed to be available. Make sure to include `availableForSale` and `selectedOptions.name` and `selectedOptions.value`. */\n variants?:\n | PartialDeep\n | Array>;\n /** By default all products are under /products. Use this prop to provide a custom path. */\n productPath?: string;\n children: ({option}: {option: VariantOption}) => ReactNode;\n}", "description": "", "members": [ { @@ -14732,14 +14732,14 @@ "syntaxKind": "PropertySignature", "name": "options", "value": "PartialObjectDeep[]", - "description": "Product options from the [Storefront API](/docs/api/storefront/2024-04/objects/ProductOption). Make sure both `name` and `values` are apart of your query." + "description": "Product options from the [Storefront API](/docs/api/storefront/2024-07/objects/ProductOption). Make sure both `name` and `values` are apart of your query." }, { "filePath": "/product/VariantSelector.ts", "syntaxKind": "PropertySignature", "name": "variants", "value": "PartialObjectDeep | PartialObjectDeep[]", - "description": "Product variants from the [Storefront API](/docs/api/storefront/2024-04/objects/ProductVariant). You only need to pass this prop if you want to show product availability. If a product option combination is not found within `variants`, it is assumed to be available. Make sure to include `availableForSale` and `selectedOptions.name` and `selectedOptions.value`.", + "description": "Product variants from the [Storefront API](/docs/api/storefront/2024-07/objects/ProductVariant). You only need to pass this prop if you want to show product availability. If a product option combination is not found within `variants`, it is assumed to be available. Make sure to include `availableForSale` and `selectedOptions.name` and `selectedOptions.value`.", "isOptional": true }, { @@ -14854,10 +14854,10 @@ { "name": "VariantSelector", "type": "components", - "url": "/docs/api/hydrogen/2024-04/components/variantselector" + "url": "/docs/api/hydrogen/2024-07/components/variantselector" } ], - "description": "The `getSelectedProductOptions` returns the selected options from the Request search parameters. The selected options can then be easily passed to your GraphQL query with [`variantBySelectedOptions`](https://shopify.dev/docs/api/storefront/2024-04/objects/product#field-product-variantbyselectedoptions).", + "description": "The `getSelectedProductOptions` returns the selected options from the Request search parameters. The selected options can then be easily passed to your GraphQL query with [`variantBySelectedOptions`](https://shopify.dev/docs/api/storefront/2024-07/objects/product#field-product-variantbyselectedoptions).", "type": "component", "defaultExample": { "description": "I am the default example", @@ -15017,7 +15017,7 @@ "filePath": "/routing/redirect.ts", "syntaxKind": "TypeAliasDeclaration", "name": "StorefrontRedirect", - "value": "{\n /** The [Storefront client](/docs/api/hydrogen/2024-04/utilities/createstorefrontclient) instance */\n storefront: Storefront;\n /** The [MDN Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) object that was passed to the `server.ts` request handler. */\n request: Request;\n /** The [MDN Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) object created by `handleRequest` */\n response?: Response;\n /** By default the `/admin` route is redirected to the Shopify Admin page for the current storefront. Disable this redirect by passing `true`. */\n noAdminRedirect?: boolean;\n /** By default, query parameters are not used to match redirects. Set this to `true` if you'd like redirects to be query parameter sensitive */\n matchQueryParams?: boolean;\n}", + "value": "{\n /** The [Storefront client](/docs/api/hydrogen/2024-07/utilities/createstorefrontclient) instance */\n storefront: Storefront;\n /** The [MDN Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) object that was passed to the `server.ts` request handler. */\n request: Request;\n /** The [MDN Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) object created by `handleRequest` */\n response?: Response;\n /** By default the `/admin` route is redirected to the Shopify Admin page for the current storefront. Disable this redirect by passing `true`. */\n noAdminRedirect?: boolean;\n /** By default, query parameters are not used to match redirects. Set this to `true` if you'd like redirects to be query parameter sensitive */\n matchQueryParams?: boolean;\n}", "description": "", "members": [ { @@ -15025,7 +15025,7 @@ "syntaxKind": "PropertySignature", "name": "storefront", "value": "Storefront", - "description": "The [Storefront client](/docs/api/hydrogen/2024-04/utilities/createstorefrontclient) instance" + "description": "The [Storefront client](/docs/api/hydrogen/2024-07/utilities/createstorefrontclient) instance" }, { "filePath": "/routing/redirect.ts", @@ -16079,7 +16079,7 @@ "filePath": "/Image.tsx", "syntaxKind": "TypeAliasDeclaration", "name": "HydrogenImageBaseProps", - "value": "{\n /** The aspect ratio of the image, in the format of `width/height`.\n *\n * @example\n * ```\n * \n * ```\n */\n aspectRatio?: string;\n /** The crop position of the image.\n *\n * @remarks\n * In the event that AspectRatio is set, without specifying a crop,\n * the Shopify CDN won't return the expected image.\n *\n * @defaultValue `center`\n */\n crop?: Crop;\n /** Data mapping to the [Storefront API `Image`](https://shopify.dev/docs/api/storefront/2024-04/objects/Image) object. Must be an Image object.\n *\n * @example\n * ```\n * import {IMAGE_FRAGMENT, Image} from '@shopify/hydrogen';\n *\n * export const IMAGE_QUERY = `#graphql\n * ${IMAGE_FRAGMENT}\n * query {\n * product {\n * featuredImage {\n * ...Image\n * }\n * }\n * }`\n *\n * \n * ```\n *\n * Image: {@link https://shopify.dev/api/storefront/reference/common-objects/image}\n */\n data?: PartialDeep;\n /** A function that returns a URL string for an image.\n *\n * @remarks\n * By default, this uses Shopify’s CDN {@link https://cdn.shopify.com/} but you can provide\n * your own function to use a another provider, as long as they support URL based image transformations.\n */\n loader?: Loader;\n /** An optional prop you can use to change the default srcSet generation behaviour */\n srcSetOptions?: SrcSetOptions;\n}", + "value": "{\n /** The aspect ratio of the image, in the format of `width/height`.\n *\n * @example\n * ```\n * \n * ```\n */\n aspectRatio?: string;\n /** The crop position of the image.\n *\n * @remarks\n * In the event that AspectRatio is set, without specifying a crop,\n * the Shopify CDN won't return the expected image.\n *\n * @defaultValue `center`\n */\n crop?: Crop;\n /** Data mapping to the [Storefront API `Image`](https://shopify.dev/docs/api/storefront/2024-07/objects/Image) object. Must be an Image object.\n *\n * @example\n * ```\n * import {IMAGE_FRAGMENT, Image} from '@shopify/hydrogen';\n *\n * export const IMAGE_QUERY = `#graphql\n * ${IMAGE_FRAGMENT}\n * query {\n * product {\n * featuredImage {\n * ...Image\n * }\n * }\n * }`\n *\n * \n * ```\n *\n * Image: {@link https://shopify.dev/api/storefront/reference/common-objects/image}\n */\n data?: PartialDeep;\n /** A function that returns a URL string for an image.\n *\n * @remarks\n * By default, this uses Shopify’s CDN {@link https://cdn.shopify.com/} but you can provide\n * your own function to use a another provider, as long as they support URL based image transformations.\n */\n loader?: Loader;\n /** An optional prop you can use to change the default srcSet generation behaviour */\n srcSetOptions?: SrcSetOptions;\n}", "description": "", "members": [ { @@ -16116,7 +16116,7 @@ "syntaxKind": "PropertySignature", "name": "data", "value": "PartialDeep", - "description": "Data mapping to the [Storefront API `Image`](https://shopify.dev/docs/api/storefront/2024-04/objects/Image) object. Must be an Image object.", + "description": "Data mapping to the [Storefront API `Image`](https://shopify.dev/docs/api/storefront/2024-07/objects/Image) object. Must be an Image object.", "isOptional": true, "examples": [ { @@ -18922,7 +18922,7 @@ "filePath": "/Image.tsx", "syntaxKind": "TypeAliasDeclaration", "name": "HydrogenImageBaseProps", - "value": "{\n /** The aspect ratio of the image, in the format of `width/height`.\n *\n * @example\n * ```\n * \n * ```\n */\n aspectRatio?: string;\n /** The crop position of the image.\n *\n * @remarks\n * In the event that AspectRatio is set, without specifying a crop,\n * the Shopify CDN won't return the expected image.\n *\n * @defaultValue `center`\n */\n crop?: Crop;\n /** Data mapping to the [Storefront API `Image`](https://shopify.dev/docs/api/storefront/2024-04/objects/Image) object. Must be an Image object.\n *\n * @example\n * ```\n * import {IMAGE_FRAGMENT, Image} from '@shopify/hydrogen';\n *\n * export const IMAGE_QUERY = `#graphql\n * ${IMAGE_FRAGMENT}\n * query {\n * product {\n * featuredImage {\n * ...Image\n * }\n * }\n * }`\n *\n * \n * ```\n *\n * Image: {@link https://shopify.dev/api/storefront/reference/common-objects/image}\n */\n data?: PartialDeep;\n /** A function that returns a URL string for an image.\n *\n * @remarks\n * By default, this uses Shopify’s CDN {@link https://cdn.shopify.com/} but you can provide\n * your own function to use a another provider, as long as they support URL based image transformations.\n */\n loader?: Loader;\n /** An optional prop you can use to change the default srcSet generation behaviour */\n srcSetOptions?: SrcSetOptions;\n}", + "value": "{\n /** The aspect ratio of the image, in the format of `width/height`.\n *\n * @example\n * ```\n * \n * ```\n */\n aspectRatio?: string;\n /** The crop position of the image.\n *\n * @remarks\n * In the event that AspectRatio is set, without specifying a crop,\n * the Shopify CDN won't return the expected image.\n *\n * @defaultValue `center`\n */\n crop?: Crop;\n /** Data mapping to the [Storefront API `Image`](https://shopify.dev/docs/api/storefront/2024-07/objects/Image) object. Must be an Image object.\n *\n * @example\n * ```\n * import {IMAGE_FRAGMENT, Image} from '@shopify/hydrogen';\n *\n * export const IMAGE_QUERY = `#graphql\n * ${IMAGE_FRAGMENT}\n * query {\n * product {\n * featuredImage {\n * ...Image\n * }\n * }\n * }`\n *\n * \n * ```\n *\n * Image: {@link https://shopify.dev/api/storefront/reference/common-objects/image}\n */\n data?: PartialDeep;\n /** A function that returns a URL string for an image.\n *\n * @remarks\n * By default, this uses Shopify’s CDN {@link https://cdn.shopify.com/} but you can provide\n * your own function to use a another provider, as long as they support URL based image transformations.\n */\n loader?: Loader;\n /** An optional prop you can use to change the default srcSet generation behaviour */\n srcSetOptions?: SrcSetOptions;\n}", "description": "", "members": [ { @@ -18959,7 +18959,7 @@ "syntaxKind": "PropertySignature", "name": "data", "value": "PartialDeep", - "description": "Data mapping to the [Storefront API `Image`](https://shopify.dev/docs/api/storefront/2024-04/objects/Image) object. Must be an Image object.", + "description": "Data mapping to the [Storefront API `Image`](https://shopify.dev/docs/api/storefront/2024-07/objects/Image) object. Must be an Image object.", "isOptional": true, "examples": [ { @@ -19183,7 +19183,7 @@ "syntaxKind": "PropertySignature", "name": "measurement", "value": "PartialDeep", - "description": "A [UnitPriceMeasurement object](https://shopify.dev/api/storefront/2024-04/objects/unitpricemeasurement).", + "description": "A [UnitPriceMeasurement object](https://shopify.dev/api/storefront/2024-07/objects/unitpricemeasurement).", "isOptional": true }, { @@ -19195,7 +19195,7 @@ "isOptional": true } ], - "value": "export interface MoneyPropsBase {\n /** An HTML tag or React Component to be rendered as the base element wrapper. The default is `div`. */\n as?: ComponentGeneric;\n /** An object with fields that correspond to the Storefront API's [MoneyV2 object](https://shopify.dev/api/storefront/reference/common-objects/moneyv2). */\n data: PartialDeep;\n /** Whether to remove the currency symbol from the output. */\n withoutCurrency?: boolean;\n /** Whether to remove trailing zeros (fractional money) from the output. */\n withoutTrailingZeros?: boolean;\n /** A [UnitPriceMeasurement object](https://shopify.dev/api/storefront/2024-04/objects/unitpricemeasurement). */\n measurement?: PartialDeep;\n /** Customizes the separator between the money output and the measurement output. Used with the `measurement` prop. Defaults to `'/'`. */\n measurementSeparator?: ReactNode;\n}" + "value": "export interface MoneyPropsBase {\n /** An HTML tag or React Component to be rendered as the base element wrapper. The default is `div`. */\n as?: ComponentGeneric;\n /** An object with fields that correspond to the Storefront API's [MoneyV2 object](https://shopify.dev/api/storefront/reference/common-objects/moneyv2). */\n data: PartialDeep;\n /** Whether to remove the currency symbol from the output. */\n withoutCurrency?: boolean;\n /** Whether to remove trailing zeros (fractional money) from the output. */\n withoutTrailingZeros?: boolean;\n /** A [UnitPriceMeasurement object](https://shopify.dev/api/storefront/2024-07/objects/unitpricemeasurement). */\n measurement?: PartialDeep;\n /** Customizes the separator between the money output and the measurement output. Used with the `measurement` prop. Defaults to `'/'`. */\n measurementSeparator?: ReactNode;\n}" } } } @@ -19243,7 +19243,7 @@ "filePath": "/ModelViewer.tsx", "syntaxKind": "TypeAliasDeclaration", "name": "ModelViewerBaseProps", - "value": "{\n /** An object with fields that correspond to the Storefront API's [Model3D object](https://shopify.dev/api/storefront/2024-04/objects/model3d). */\n data: PartialDeep;\n /** The callback to invoke when the 'error' event is triggered. Refer to [error in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-error). */\n onError?: (event: Event) => void;\n /** The callback to invoke when the `load` event is triggered. Refer to [load in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-load). */\n onLoad?: (event: Event) => void;\n /** The callback to invoke when the 'preload' event is triggered. Refer to [preload in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-preload). */\n onPreload?: (event: Event) => void;\n /** The callback to invoke when the 'model-visibility' event is triggered. Refer to [model-visibility in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-modelVisibility). */\n onModelVisibility?: (event: Event) => void;\n /** The callback to invoke when the 'progress' event is triggered. Refer to [progress in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-progress). */\n onProgress?: (event: Event) => void;\n /** The callback to invoke when the 'ar-status' event is triggered. Refer to [ar-status in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-augmentedreality-events-arStatus). */\n onArStatus?: (event: Event) => void;\n /** The callback to invoke when the 'ar-tracking' event is triggered. Refer to [ar-tracking in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-augmentedreality-events-arTracking). */\n onArTracking?: (event: Event) => void;\n /** The callback to invoke when the 'quick-look-button-tapped' event is triggered. Refer to [quick-look-button-tapped in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-augmentedreality-events-quickLookButtonTapped). */\n onQuickLookButtonTapped?: (event: Event) => void;\n /** The callback to invoke when the 'camera-change' event is triggered. Refer to [camera-change in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-stagingandcameras-events-cameraChange). */\n onCameraChange?: (event: Event) => void;\n /** The callback to invoke when the 'environment-change' event is triggered. Refer to [environment-change in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-lightingandenv-events-environmentChange). */\n onEnvironmentChange?: (event: Event) => void;\n /** The callback to invoke when the 'play' event is triggered. Refer to [play in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-animation-events-play). */\n onPlay?: (event: Event) => void;\n /** The callback to invoke when the 'pause' event is triggered. Refer to [pause in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-animation-events-pause). */\n onPause?: (event: Event) => void;\n /** The callback to invoke when the 'scene-graph-ready' event is triggered. Refer to [scene-graph-ready in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-scenegraph-events-sceneGraphReady). */\n onSceneGraphReady?: (event: Event) => void;\n}", + "value": "{\n /** An object with fields that correspond to the Storefront API's [Model3D object](https://shopify.dev/api/storefront/2024-07/objects/model3d). */\n data: PartialDeep;\n /** The callback to invoke when the 'error' event is triggered. Refer to [error in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-error). */\n onError?: (event: Event) => void;\n /** The callback to invoke when the `load` event is triggered. Refer to [load in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-load). */\n onLoad?: (event: Event) => void;\n /** The callback to invoke when the 'preload' event is triggered. Refer to [preload in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-preload). */\n onPreload?: (event: Event) => void;\n /** The callback to invoke when the 'model-visibility' event is triggered. Refer to [model-visibility in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-modelVisibility). */\n onModelVisibility?: (event: Event) => void;\n /** The callback to invoke when the 'progress' event is triggered. Refer to [progress in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-progress). */\n onProgress?: (event: Event) => void;\n /** The callback to invoke when the 'ar-status' event is triggered. Refer to [ar-status in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-augmentedreality-events-arStatus). */\n onArStatus?: (event: Event) => void;\n /** The callback to invoke when the 'ar-tracking' event is triggered. Refer to [ar-tracking in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-augmentedreality-events-arTracking). */\n onArTracking?: (event: Event) => void;\n /** The callback to invoke when the 'quick-look-button-tapped' event is triggered. Refer to [quick-look-button-tapped in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-augmentedreality-events-quickLookButtonTapped). */\n onQuickLookButtonTapped?: (event: Event) => void;\n /** The callback to invoke when the 'camera-change' event is triggered. Refer to [camera-change in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-stagingandcameras-events-cameraChange). */\n onCameraChange?: (event: Event) => void;\n /** The callback to invoke when the 'environment-change' event is triggered. Refer to [environment-change in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-lightingandenv-events-environmentChange). */\n onEnvironmentChange?: (event: Event) => void;\n /** The callback to invoke when the 'play' event is triggered. Refer to [play in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-animation-events-play). */\n onPlay?: (event: Event) => void;\n /** The callback to invoke when the 'pause' event is triggered. Refer to [pause in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-animation-events-pause). */\n onPause?: (event: Event) => void;\n /** The callback to invoke when the 'scene-graph-ready' event is triggered. Refer to [scene-graph-ready in the documentation](https://modelviewer.dev/docs/index.html#entrydocs-scenegraph-events-sceneGraphReady). */\n onSceneGraphReady?: (event: Event) => void;\n}", "description": "", "members": [ { @@ -19251,7 +19251,7 @@ "syntaxKind": "PropertySignature", "name": "data", "value": "PartialDeep", - "description": "An object with fields that correspond to the Storefront API's [Model3D object](https://shopify.dev/api/storefront/2024-04/objects/model3d)." + "description": "An object with fields that correspond to the Storefront API's [Model3D object](https://shopify.dev/api/storefront/2024-07/objects/model3d)." }, { "filePath": "/ModelViewer.tsx", @@ -19728,7 +19728,7 @@ "syntaxKind": "PropertySignature", "name": "data", "value": "PartialDeep", - "description": "An object with fields that correspond to the Storefront API's [Video object](https://shopify.dev/api/storefront/2024-04/objects/video)." + "description": "An object with fields that correspond to the Storefront API's [Video object](https://shopify.dev/api/storefront/2024-07/objects/video)." }, { "filePath": "/Video.tsx", @@ -19747,7 +19747,7 @@ "isOptional": true } ], - "value": "export interface VideoProps {\n /** An object with fields that correspond to the Storefront API's [Video object](https://shopify.dev/api/storefront/2024-04/objects/video). */\n data: PartialDeep;\n /** An object of image size options for the video's `previewImage`. Uses `shopifyImageLoader` to generate the `poster` URL. */\n previewImageOptions?: Parameters[0];\n /** Props that will be passed to the `video` element's `source` children elements. */\n sourceProps?: HTMLAttributes & {\n 'data-testid'?: string;\n };\n}" + "value": "export interface VideoProps {\n /** An object with fields that correspond to the Storefront API's [Video object](https://shopify.dev/api/storefront/2024-07/objects/video). */\n data: PartialDeep;\n /** An object of image size options for the video's `previewImage`. Uses `shopifyImageLoader` to generate the `poster` URL. */\n previewImageOptions?: Parameters[0];\n /** Props that will be passed to the `video` element's `source` children elements. */\n sourceProps?: HTMLAttributes & {\n 'data-testid'?: string;\n };\n}" }, "LoaderParams": { "filePath": "/Image.tsx", diff --git a/packages/hydrogen/docs/typeOverride.json b/packages/hydrogen/docs/typeOverride.json index 13a13bf1fb..bbaaa1adfb 100644 --- a/packages/hydrogen/docs/typeOverride.json +++ b/packages/hydrogen/docs/typeOverride.json @@ -2,17 +2,17 @@ "Headers": "[Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) - Web API", "LoaderArgs": "The config argument Remix passed to your loader function. Read more about [Remix LoaderArgs](https://remix.run/docs/en/v1/route/loader#type-safety).", - "AttributeInput": "[AttributeInput](/docs/api/storefront/2024-04/input-objects/AttributeInput) - Storefront API type", - "Cart": "[Cart](/docs/api/storefront/2024-04/objects/Cart) - Storefront API type", - "CartBuyerIdentityInput": "[CartBuyerIdentityInput](/docs/api/storefront/2024-04/input-objects/CartBuyerIdentityInput) - Storefront API type", - "CartInput": "[CartInput](/docs/api/storefront/2024-04/input-objects/CartInput) - Storefront API type", - "CartLineInput": "[CartLineInput](/docs/api/storefront/2024-04/input-objects/CartLineInput) - Storefront API type", - "CartLineUpdateInput": "[CartLineUpdateInput](/docs/api/storefront/2024-04/input-objects/CartLineUpdateInput) - Storefront API type", - "CartSelectedDeliveryOptionInput": "[CartSelectedDeliveryOptionInput](/docs/api/storefront/2024-04/input-objects/CartSelectedDeliveryOptionInput) - Storefront API type", - "CartUserError": "[CartUserError](/docs/api/storefront/2024-04/objects/CartUserError) - Storefront API type", - "MetafieldDeleteUserError": "[MetafieldDeleteUserError](/docs/api/storefront/2024-04/objects/MetafieldDeleteUserError) - Storefront API type", - "MetafieldsSetUserError": "[MetafieldsSetUserError](/docs/api/storefront/2024-04/objects/MetafieldsSetUserError) - Storefront API type", - "MetafieldWithoutOwnerId": "Same as [CartMetafieldsSetInput](https://shopify.dev/docs/api/storefront/2024-04/input-objects/CartMetafieldsSetInput) Storefront API type but without `ownerId`. `ownerId` is always set to the cart id.", + "AttributeInput": "[AttributeInput](/docs/api/storefront/2024-07/input-objects/AttributeInput) - Storefront API type", + "Cart": "[Cart](/docs/api/storefront/2024-07/objects/Cart) - Storefront API type", + "CartBuyerIdentityInput": "[CartBuyerIdentityInput](/docs/api/storefront/2024-07/input-objects/CartBuyerIdentityInput) - Storefront API type", + "CartInput": "[CartInput](/docs/api/storefront/2024-07/input-objects/CartInput) - Storefront API type", + "CartLineInput": "[CartLineInput](/docs/api/storefront/2024-07/input-objects/CartLineInput) - Storefront API type", + "CartLineUpdateInput": "[CartLineUpdateInput](/docs/api/storefront/2024-07/input-objects/CartLineUpdateInput) - Storefront API type", + "CartSelectedDeliveryOptionInput": "[CartSelectedDeliveryOptionInput](/docs/api/storefront/2024-07/input-objects/CartSelectedDeliveryOptionInput) - Storefront API type", + "CartUserError": "[CartUserError](/docs/api/storefront/2024-07/objects/CartUserError) - Storefront API type", + "MetafieldDeleteUserError": "[MetafieldDeleteUserError](/docs/api/storefront/2024-07/objects/MetafieldDeleteUserError) - Storefront API type", + "MetafieldsSetUserError": "[MetafieldsSetUserError](/docs/api/storefront/2024-07/objects/MetafieldsSetUserError) - Storefront API type", + "MetafieldWithoutOwnerId": "Same as [CartMetafieldsSetInput](https://shopify.dev/docs/api/storefront/2024-07/input-objects/CartMetafieldsSetInput) Storefront API type but without `ownerId`. `ownerId` is always set to the cart id.", "OtherData": "Any `` pair", "OtherFormData": "Any `` pair" } diff --git a/packages/hydrogen/src/analytics-manager/AnalyticsProvider.doc.ts b/packages/hydrogen/src/analytics-manager/AnalyticsProvider.doc.ts index f67b14f768..1a10ef0331 100644 --- a/packages/hydrogen/src/analytics-manager/AnalyticsProvider.doc.ts +++ b/packages/hydrogen/src/analytics-manager/AnalyticsProvider.doc.ts @@ -7,7 +7,7 @@ const data: ReferenceEntityTemplateSchema = { isVisualComponent: false, related: [], description: - 'Provides a context for tracking page views and cart events to send as analytics data to Shopify. This component is integrated with the Customer Privacy API for consent management. The provider can also be used to connect third-party analytics services through its subscribe and publish system. The [`useAnalytics`](/docs/api/hydrogen/2024-04/hooks/useanalytics) hook provides access to the analytics provider context.', + 'Provides a context for tracking page views and cart events to send as analytics data to Shopify. This component is integrated with the Customer Privacy API for consent management. The provider can also be used to connect third-party analytics services through its subscribe and publish system. The [`useAnalytics`](/docs/api/hydrogen/2024-07/hooks/useanalytics) hook provides access to the analytics provider context.', type: 'component', defaultExample: { description: 'This is the default example', diff --git a/packages/hydrogen/src/analytics-manager/AnalyticsProvider.tsx b/packages/hydrogen/src/analytics-manager/AnalyticsProvider.tsx index cc8f59788e..29e853fa3d 100644 --- a/packages/hydrogen/src/analytics-manager/AnalyticsProvider.tsx +++ b/packages/hydrogen/src/analytics-manager/AnalyticsProvider.tsx @@ -59,7 +59,7 @@ export type AnalyticsProviderProps = { canTrack?: () => boolean; /** An optional custom payload to pass to all events. e.g language/locale/currency. */ customData?: Record; - /** The shop configuration required to publish analytics events to Shopify. Use [`getShopAnalytics`](/docs/api/hydrogen/2024-04/utilities/getshopanalytics). */ + /** The shop configuration required to publish analytics events to Shopify. Use [`getShopAnalytics`](/docs/api/hydrogen/2024-07/utilities/getshopanalytics). */ shop: Promise | ShopAnalytics | null; /** The customer privacy consent configuration and options. */ consent: Partial< @@ -396,7 +396,7 @@ function useShopAnalytics(shopProp: AnalyticsProviderProps['shop']): { type ShopAnalyticsProps = { /** - * The storefront client instance created by [`createStorefrontClient`](docs/api/hydrogen/2024-04/utilities/createstorefrontclient). + * The storefront client instance created by [`createStorefrontClient`](docs/api/hydrogen/2024-07/utilities/createstorefrontclient). */ storefront: Storefront; /** @@ -464,7 +464,7 @@ export type AnalyticsContextValueForDoc = { prevCart?: Promise | CartReturn | null; /** A function to publish an analytics event. */ publish?: AnalyticsContextPublishForDoc; - /** A function to register with the analytics provider. It holds the first browser load events until all registered key has executed the supplied `ready` function. [See example register usage](/docs/api/hydrogen/2024-04/hooks/useanalytics#example-useanalytics.register). */ + /** A function to register with the analytics provider. It holds the first browser load events until all registered key has executed the supplied `ready` function. [See example register usage](/docs/api/hydrogen/2024-07/hooks/useanalytics#example-useanalytics.register). */ register?: (key: string) => {ready: () => void}; /** The shop configuration required to publish events to Shopify. */ shop?: Promise | ShopAnalytics | null; diff --git a/packages/hydrogen/src/analytics-manager/getShopAnalytics.doc.ts b/packages/hydrogen/src/analytics-manager/getShopAnalytics.doc.ts index 11d3a02363..2217a385fe 100644 --- a/packages/hydrogen/src/analytics-manager/getShopAnalytics.doc.ts +++ b/packages/hydrogen/src/analytics-manager/getShopAnalytics.doc.ts @@ -6,7 +6,7 @@ const data: ReferenceEntityTemplateSchema = { isVisualComponent: false, related: [], description: - 'A function that queries for shop required analytics data to be used in the [`Analytics.Provider`](/docs/api/hydrogen/2024-04/components/Analytics-provider) component.', + 'A function that queries for shop required analytics data to be used in the [`Analytics.Provider`](/docs/api/hydrogen/2024-07/components/Analytics-provider) component.', type: 'utility', defaultExample: { description: 'This is the default example', diff --git a/packages/hydrogen/src/analytics-manager/useAnalytics.doc.ts b/packages/hydrogen/src/analytics-manager/useAnalytics.doc.ts index be4316386f..62f4648eef 100644 --- a/packages/hydrogen/src/analytics-manager/useAnalytics.doc.ts +++ b/packages/hydrogen/src/analytics-manager/useAnalytics.doc.ts @@ -6,7 +6,7 @@ const data: ReferenceEntityTemplateSchema = { isVisualComponent: false, related: [], description: - 'A hook that provides access to the analytics provider context. Must be a descendent of [`Analytics.Provider`](/docs/api/hydrogen/2024-04/components/Analytics-provider).', + 'A hook that provides access to the analytics provider context. Must be a descendent of [`Analytics.Provider`](/docs/api/hydrogen/2024-07/components/Analytics-provider).', type: 'hook', defaultExample: { description: 'This is the default example', diff --git a/packages/hydrogen/src/cart/createCartHandler.doc.ts b/packages/hydrogen/src/cart/createCartHandler.doc.ts index ba3af7dbaa..51f9676f19 100644 --- a/packages/hydrogen/src/cart/createCartHandler.doc.ts +++ b/packages/hydrogen/src/cart/createCartHandler.doc.ts @@ -36,7 +36,7 @@ const data: ReferenceEntityTemplateSchema = { title: 'Returns', type: 'HydrogenCartForDocs', description: - 'The handler returns the following default methods. Any [custom](/docs/api/hydrogen/2024-04/utilities/createcarthandler#example-custom-methods) or overwritten methods will also be available in the returned cart instance.', + 'The handler returns the following default methods. Any [custom](/docs/api/hydrogen/2024-07/utilities/createcarthandler#example-custom-methods) or overwritten methods will also be available in the returned cart instance.', }, ], examples: { diff --git a/packages/hydrogen/src/cart/createCartHandler.ts b/packages/hydrogen/src/cart/createCartHandler.ts index 6818bb2027..9aea7d45f6 100644 --- a/packages/hydrogen/src/cart/createCartHandler.ts +++ b/packages/hydrogen/src/cart/createCartHandler.ts @@ -213,22 +213,22 @@ export type CartHandlerOptionsForDocs< */ setCartId: (cartId: string) => Headers; /** - * The storefront client instance created by [`createStorefrontClient`](docs/api/hydrogen/2024-04/utilities/createstorefrontclient). + * The storefront client instance created by [`createStorefrontClient`](docs/api/hydrogen/2024-07/utilities/createstorefrontclient). */ storefront: Storefront; /** * The cart mutation fragment used in most mutation requests, except for `setMetafields` and `deleteMetafield`. - * See the [example usage](/docs/api/hydrogen/2024-04/utilities/createcarthandler#example-cart-fragments) in the documentation. + * See the [example usage](/docs/api/hydrogen/2024-07/utilities/createcarthandler#example-cart-fragments) in the documentation. */ cartMutateFragment?: string; /** * The cart query fragment used by `cart.get()`. - * See the [example usage](/docs/api/hydrogen/2024-04/utilities/createcarthandler#example-cart-fragments) in the documentation. + * See the [example usage](/docs/api/hydrogen/2024-07/utilities/createcarthandler#example-cart-fragments) in the documentation. */ cartQueryFragment?: string; /** * Define custom methods or override existing methods for your cart API instance. - * See the [example usage](/docs/api/hydrogen/2024-04/utilities/createcarthandler#example-custom-methods) in the documentation. + * See the [example usage](/docs/api/hydrogen/2024-07/utilities/createcarthandler#example-custom-methods) in the documentation. */ customMethods?: TCustomMethods; }; diff --git a/packages/hydrogen/src/cart/optimistic/useOptimisticCart.doc.ts b/packages/hydrogen/src/cart/optimistic/useOptimisticCart.doc.ts index 0f2477a507..70e813ed7d 100644 --- a/packages/hydrogen/src/cart/optimistic/useOptimisticCart.doc.ts +++ b/packages/hydrogen/src/cart/optimistic/useOptimisticCart.doc.ts @@ -8,7 +8,7 @@ const data: ReferenceEntityTemplateSchema = { { name: 'CartForm', type: 'components', - url: '/docs/api/hydrogen/2024-04/components/cartform', + url: '/docs/api/hydrogen/2024-07/components/cartform', }, ], description: `The \`useOptimisticCart\` takes an existing cart object, processes all pending cart actions, and locally mutates the cart with optimistic state. An optimistic cart makes cart actions immediately render in the browser while actions sync to the server. This increases the perceived performance of the application.`, diff --git a/packages/hydrogen/src/cart/queries/cartAttributesUpdateDefault.doc.ts b/packages/hydrogen/src/cart/queries/cartAttributesUpdateDefault.doc.ts index 06052e423e..3601762c5f 100644 --- a/packages/hydrogen/src/cart/queries/cartAttributesUpdateDefault.doc.ts +++ b/packages/hydrogen/src/cart/queries/cartAttributesUpdateDefault.doc.ts @@ -7,7 +7,7 @@ const data: ReferenceEntityTemplateSchema = { isVisualComponent: false, related: [], description: - 'Creates a function that accepts an array of [AttributeInput](/docs/api/storefront/2024-04/input-objects/AttributeInput) and updates attributes to a cart', + 'Creates a function that accepts an array of [AttributeInput](/docs/api/storefront/2024-07/input-objects/AttributeInput) and updates attributes to a cart', type: 'utility', defaultExample: { description: 'This is the default example', diff --git a/packages/hydrogen/src/cart/queries/cartBuyerIdentityUpdateDefault.doc.ts b/packages/hydrogen/src/cart/queries/cartBuyerIdentityUpdateDefault.doc.ts index a7b2cbde0f..684a743580 100644 --- a/packages/hydrogen/src/cart/queries/cartBuyerIdentityUpdateDefault.doc.ts +++ b/packages/hydrogen/src/cart/queries/cartBuyerIdentityUpdateDefault.doc.ts @@ -7,7 +7,7 @@ const data: ReferenceEntityTemplateSchema = { isVisualComponent: false, related: [], description: - 'Creates a function that accepts an object of [CartBuyerIdentityInput](/docs/api/storefront/2024-04/input-objects/CartBuyerIdentityInput) and updates the buyer identity of a cart', + 'Creates a function that accepts an object of [CartBuyerIdentityInput](/docs/api/storefront/2024-07/input-objects/CartBuyerIdentityInput) and updates the buyer identity of a cart', type: 'utility', defaultExample: { description: 'This is the default example', diff --git a/packages/hydrogen/src/cart/queries/cartCreateDefault.doc.ts b/packages/hydrogen/src/cart/queries/cartCreateDefault.doc.ts index 043c796b83..ed73fefd38 100644 --- a/packages/hydrogen/src/cart/queries/cartCreateDefault.doc.ts +++ b/packages/hydrogen/src/cart/queries/cartCreateDefault.doc.ts @@ -7,7 +7,7 @@ const data: ReferenceEntityTemplateSchema = { isVisualComponent: false, related: [], description: - 'Creates a function that accepts an object of [CartInput](/docs/api/storefront/2024-04/input-objects/CartInput) and returns a new cart', + 'Creates a function that accepts an object of [CartInput](/docs/api/storefront/2024-07/input-objects/CartInput) and returns a new cart', type: 'utility', defaultExample: { description: 'This is the default example', diff --git a/packages/hydrogen/src/cart/queries/cartLinesAddDefault.doc.ts b/packages/hydrogen/src/cart/queries/cartLinesAddDefault.doc.ts index 7b0b4e2568..8b4155f3e8 100644 --- a/packages/hydrogen/src/cart/queries/cartLinesAddDefault.doc.ts +++ b/packages/hydrogen/src/cart/queries/cartLinesAddDefault.doc.ts @@ -7,7 +7,7 @@ const data: ReferenceEntityTemplateSchema = { isVisualComponent: false, related: [], description: - 'Creates a function that accepts an array of [CartLineInput](/docs/api/storefront/2024-04/input-objects/CartLineInput) and adds the line items to a cart', + 'Creates a function that accepts an array of [CartLineInput](/docs/api/storefront/2024-07/input-objects/CartLineInput) and adds the line items to a cart', type: 'utility', defaultExample: { description: 'This is the default example', diff --git a/packages/hydrogen/src/cart/queries/cartLinesUpdateDefault.doc.ts b/packages/hydrogen/src/cart/queries/cartLinesUpdateDefault.doc.ts index 63dc3866a4..efa5a4787b 100644 --- a/packages/hydrogen/src/cart/queries/cartLinesUpdateDefault.doc.ts +++ b/packages/hydrogen/src/cart/queries/cartLinesUpdateDefault.doc.ts @@ -7,7 +7,7 @@ const data: ReferenceEntityTemplateSchema = { isVisualComponent: false, related: [], description: - 'Creates a function that accepts an array of [CartLineUpdateInput](/docs/api/storefront/2024-04/input-objects/CartLineUpdateInput) and updates the line items in a cart', + 'Creates a function that accepts an array of [CartLineUpdateInput](/docs/api/storefront/2024-07/input-objects/CartLineUpdateInput) and updates the line items in a cart', type: 'utility', defaultExample: { description: 'This is the default example', diff --git a/packages/hydrogen/src/cart/queries/cartMetafieldDeleteDefault.ts b/packages/hydrogen/src/cart/queries/cartMetafieldDeleteDefault.ts index 38db0fbbcf..d7848140d4 100644 --- a/packages/hydrogen/src/cart/queries/cartMetafieldDeleteDefault.ts +++ b/packages/hydrogen/src/cart/queries/cartMetafieldDeleteDefault.ts @@ -45,7 +45,7 @@ export function cartMetafieldDeleteDefault( }; } -//! @see https://shopify.dev/docs/api/storefront/2024-04/mutations/cartMetafieldDelete +//! @see https://shopify.dev/docs/api/storefront/2024-07/mutations/cartMetafieldDelete export const CART_METAFIELD_DELETE_MUTATION = () => `#graphql mutation cartMetafieldDelete( $input: CartMetafieldDeleteInput! diff --git a/packages/hydrogen/src/cart/queries/cartMetafieldsSetDefault.doc.ts b/packages/hydrogen/src/cart/queries/cartMetafieldsSetDefault.doc.ts index bbaa385305..8604a6b123 100644 --- a/packages/hydrogen/src/cart/queries/cartMetafieldsSetDefault.doc.ts +++ b/packages/hydrogen/src/cart/queries/cartMetafieldsSetDefault.doc.ts @@ -7,7 +7,7 @@ const data: ReferenceEntityTemplateSchema = { isVisualComponent: false, related: [], description: - 'Creates a function that accepts an array of [CartMetafieldsSetInput](https://shopify.dev/docs/api/storefront/2024-04/input-objects/CartMetafieldsSetInput) without `ownerId` and set the metafields to a cart', + 'Creates a function that accepts an array of [CartMetafieldsSetInput](https://shopify.dev/docs/api/storefront/2024-07/input-objects/CartMetafieldsSetInput) without `ownerId` and set the metafields to a cart', type: 'utility', defaultExample: { description: 'This is the default example', diff --git a/packages/hydrogen/src/cart/queries/cartSelectedDeliveryOptionsUpdateDefault.doc.ts b/packages/hydrogen/src/cart/queries/cartSelectedDeliveryOptionsUpdateDefault.doc.ts index 978407ddcd..7a280b1688 100644 --- a/packages/hydrogen/src/cart/queries/cartSelectedDeliveryOptionsUpdateDefault.doc.ts +++ b/packages/hydrogen/src/cart/queries/cartSelectedDeliveryOptionsUpdateDefault.doc.ts @@ -7,7 +7,7 @@ const data: ReferenceEntityTemplateSchema = { isVisualComponent: false, related: [], description: - 'Creates a function that accepts an object of [CartSelectedDeliveryOptionInput](/docs/api/storefront/2024-04/input-objects/CartSelectedDeliveryOptionInput) and updates the selected delivery option of a cart', + 'Creates a function that accepts an object of [CartSelectedDeliveryOptionInput](/docs/api/storefront/2024-07/input-objects/CartSelectedDeliveryOptionInput) and updates the selected delivery option of a cart', type: 'utility', defaultExample: { description: 'This is the default example', diff --git a/packages/hydrogen/src/createStorefrontClient.doc.ts b/packages/hydrogen/src/createStorefrontClient.doc.ts index 72bacbcc53..f3923a1590 100644 --- a/packages/hydrogen/src/createStorefrontClient.doc.ts +++ b/packages/hydrogen/src/createStorefrontClient.doc.ts @@ -8,30 +8,30 @@ const data: ReferenceEntityTemplateSchema = { { name: 'CacheNone', type: 'utilities', - url: '/docs/api/hydrogen/2024-04/utilities/cachenone', + url: '/docs/api/hydrogen/2024-07/utilities/cachenone', }, { name: 'CacheShort', type: 'utilities', - url: '/docs/api/hydrogen/2024-04/utilities/cacheshort', + url: '/docs/api/hydrogen/2024-07/utilities/cacheshort', }, { name: 'CacheLong', type: 'utilities', - url: '/docs/api/hydrogen/2024-04/utilities/cachelong', + url: '/docs/api/hydrogen/2024-07/utilities/cachelong', }, { name: 'CacheCustom', type: 'utilities', - url: '/docs/api/hydrogen/2024-04/utilities/cachecustom', + url: '/docs/api/hydrogen/2024-07/utilities/cachecustom', }, { name: 'InMemoryCache', type: 'utilities', - url: '/docs/api/hydrogen/2024-04/utilities/inmemorycache', + url: '/docs/api/hydrogen/2024-07/utilities/inmemorycache', }, ], - description: `This function extends \`createStorefrontClient\` from [Hydrogen React](/docs/api/hydrogen-react/2024-04/utilities/createstorefrontclient). + description: `This function extends \`createStorefrontClient\` from [Hydrogen React](/docs/api/hydrogen-react/2024-07/utilities/createstorefrontclient). The additional arguments enable internationalization (i18n), caching, and other features particular to Remix and Oxygen. Learn more about [data fetching in Hydrogen](/docs/custom-storefronts/hydrogen/data-fetching/fetch-data).`, diff --git a/packages/hydrogen/src/csp/Script.doc.ts b/packages/hydrogen/src/csp/Script.doc.ts index 401041bfc4..549049e4e2 100644 --- a/packages/hydrogen/src/csp/Script.doc.ts +++ b/packages/hydrogen/src/csp/Script.doc.ts @@ -8,12 +8,12 @@ const data: ReferenceEntityTemplateSchema = { { name: 'createContentSecurityPolicy', type: 'utilities', - url: '/docs/api/hydrogen/2024-04/utilities/createcontentsecuritypolicy', + url: '/docs/api/hydrogen/2024-07/utilities/createcontentsecuritypolicy', }, { name: 'useNonce', type: 'hooks', - url: '/docs/api/hydrogen/2024-04/hooks/usenonce', + url: '/docs/api/hydrogen/2024-07/hooks/usenonce', }, ], description: `Use the \`Script\` component to add third-party scripts to your app. It automatically adds a nonce attribute from your [content security policy](/docs/custom-storefronts/hydrogen/content-security-policy).`, diff --git a/packages/hydrogen/src/csp/createContentSecurityPolicy.doc.ts b/packages/hydrogen/src/csp/createContentSecurityPolicy.doc.ts index ad94adb11e..83e294d57f 100644 --- a/packages/hydrogen/src/csp/createContentSecurityPolicy.doc.ts +++ b/packages/hydrogen/src/csp/createContentSecurityPolicy.doc.ts @@ -8,12 +8,12 @@ const data: ReferenceEntityTemplateSchema = { { name: 'useNonce', type: 'hooks', - url: '/docs/api/hydrogen/2024-04/hooks/usenonce', + url: '/docs/api/hydrogen/2024-07/hooks/usenonce', }, { name: 'Script', type: 'components', - url: '/docs/api/hydrogen/2024-04/components/script', + url: '/docs/api/hydrogen/2024-07/components/script', }, ], description: `Create a [content security policy](/docs/custom-storefronts/hydrogen/content-security-policy) to secure your application. The default content security policy includes exclusions for cdn.shopify.com and a script nonce.`, diff --git a/packages/hydrogen/src/csp/useNonce.doc.ts b/packages/hydrogen/src/csp/useNonce.doc.ts index f6468b3364..34ff08d81c 100644 --- a/packages/hydrogen/src/csp/useNonce.doc.ts +++ b/packages/hydrogen/src/csp/useNonce.doc.ts @@ -8,12 +8,12 @@ const data: ReferenceEntityTemplateSchema = { { name: 'createContentSecurityPolicy', type: 'utilities', - url: '/docs/api/hydrogen/2024-04/utilities/createcontentsecuritypolicy', + url: '/docs/api/hydrogen/2024-07/utilities/createcontentsecuritypolicy', }, { name: 'Script', type: 'components', - url: '/docs/api/hydrogen/2024-04/components/script', + url: '/docs/api/hydrogen/2024-07/components/script', }, ], description: `The \`useNonce\` hook returns the [content security policy](/docs/custom-storefronts/hydrogen/content-security-policy) nonce. Use the hook to manually add a nonce to third party scripts. The \`Script\` component automatically does this for you. Note, the nonce should never be available in the client, and should always return undefined in the browser.`, diff --git a/packages/hydrogen/src/customer/customer.doc.ts b/packages/hydrogen/src/customer/customer.doc.ts index 9595fcd623..2d2bd63aa9 100644 --- a/packages/hydrogen/src/customer/customer.doc.ts +++ b/packages/hydrogen/src/customer/customer.doc.ts @@ -8,7 +8,7 @@ const data: ReferenceEntityTemplateSchema = { { name: 'createStorefrontClient', type: 'utility', - url: '/docs/api/hydrogen/2024-04/utilities/createstorefrontclient', + url: '/docs/api/hydrogen/2024-07/utilities/createstorefrontclient', }, ], description: ` diff --git a/packages/hydrogen/src/pagination/Pagination.doc.ts b/packages/hydrogen/src/pagination/Pagination.doc.ts index d66538f2c5..0dc2b77f3c 100644 --- a/packages/hydrogen/src/pagination/Pagination.doc.ts +++ b/packages/hydrogen/src/pagination/Pagination.doc.ts @@ -8,7 +8,7 @@ const data: ReferenceEntityTemplateSchema = { { name: 'getPaginationVariables', type: 'utilities', - url: '/docs/api/hydrogen/2024-04/utilities/getpaginationvariables', + url: '/docs/api/hydrogen/2024-07/utilities/getpaginationvariables', }, ], description: `The [Storefront API uses cursors](https://shopify.dev/docs/api/usage/pagination-graphql) to paginate through lists of data and the \`\` component makes it easy to paginate data from the Storefront API. It is important for pagination state to be maintained in the URL, so that the user can navigate to a product and return back to the same scrolled position in a list. It is also important that the list state is shareable via URL. The \`\` component provides a render prop with properties to load more elements into your list.`, diff --git a/packages/hydrogen/src/pagination/getPaginationVariables.doc.ts b/packages/hydrogen/src/pagination/getPaginationVariables.doc.ts index bd14e2dc20..9605c4e2e6 100644 --- a/packages/hydrogen/src/pagination/getPaginationVariables.doc.ts +++ b/packages/hydrogen/src/pagination/getPaginationVariables.doc.ts @@ -8,7 +8,7 @@ const data: ReferenceEntityTemplateSchema = { { name: 'Pagination', type: 'components', - url: '/docs/api/hydrogen/2024-04/components/pagination', + url: '/docs/api/hydrogen/2024-07/components/pagination', }, ], description: `The \`getPaginationVariables\` function is used with the [\`\`](/docs/api/hydrogen/components/pagnination) component to generate the variables needed to fetch paginated data from the Storefront API. The returned variables should be used within your storefront GraphQL query.`, diff --git a/packages/hydrogen/src/product/VariantSelector.doc.ts b/packages/hydrogen/src/product/VariantSelector.doc.ts index 5aaaeab400..6c90f06f53 100644 --- a/packages/hydrogen/src/product/VariantSelector.doc.ts +++ b/packages/hydrogen/src/product/VariantSelector.doc.ts @@ -8,7 +8,7 @@ const data: ReferenceEntityTemplateSchema = { { name: 'getSelectedProductOptions', type: 'utilities', - url: '/docs/api/hydrogen/2024-04/utilities/getselectedproductoptions', + url: '/docs/api/hydrogen/2024-07/utilities/getselectedproductoptions', }, ], description: `The \`VariantSelector\` component helps you build a form for selecting available variants of a product. It is important for variant selection state to be maintained in the URL, so that the user can navigate to a product and return back to the same variant selection. It is also important that the variant selection state is shareable via URL. The \`VariantSelector\` component provides a render prop that renders for each product option.`, diff --git a/packages/hydrogen/src/product/VariantSelector.ts b/packages/hydrogen/src/product/VariantSelector.ts index 338239bc38..5566b73beb 100644 --- a/packages/hydrogen/src/product/VariantSelector.ts +++ b/packages/hydrogen/src/product/VariantSelector.ts @@ -27,9 +27,9 @@ export type VariantOptionValue = { type VariantSelectorProps = { /** The product handle for all of the variants */ handle: string; - /** Product options from the [Storefront API](/docs/api/storefront/2024-04/objects/ProductOption). Make sure both `name` and `values` are apart of your query. */ + /** Product options from the [Storefront API](/docs/api/storefront/2024-07/objects/ProductOption). Make sure both `name` and `values` are apart of your query. */ options: Array> | undefined; - /** Product variants from the [Storefront API](/docs/api/storefront/2024-04/objects/ProductVariant). You only need to pass this prop if you want to show product availability. If a product option combination is not found within `variants`, it is assumed to be available. Make sure to include `availableForSale` and `selectedOptions.name` and `selectedOptions.value`. */ + /** Product variants from the [Storefront API](/docs/api/storefront/2024-07/objects/ProductVariant). You only need to pass this prop if you want to show product availability. If a product option combination is not found within `variants`, it is assumed to be available. Make sure to include `availableForSale` and `selectedOptions.name` and `selectedOptions.value`. */ variants?: | PartialDeep | Array>; diff --git a/packages/hydrogen/src/product/getSelectedProductOptions.doc.ts b/packages/hydrogen/src/product/getSelectedProductOptions.doc.ts index 84d3add806..2c17cbd292 100644 --- a/packages/hydrogen/src/product/getSelectedProductOptions.doc.ts +++ b/packages/hydrogen/src/product/getSelectedProductOptions.doc.ts @@ -8,10 +8,10 @@ const data: ReferenceEntityTemplateSchema = { { name: 'VariantSelector', type: 'components', - url: '/docs/api/hydrogen/2024-04/components/variantselector', + url: '/docs/api/hydrogen/2024-07/components/variantselector', }, ], - description: `The \`getSelectedProductOptions\` returns the selected options from the Request search parameters. The selected options can then be easily passed to your GraphQL query with [\`variantBySelectedOptions\`](https://shopify.dev/docs/api/storefront/2024-04/objects/product#field-product-variantbyselectedoptions).`, + description: `The \`getSelectedProductOptions\` returns the selected options from the Request search parameters. The selected options can then be easily passed to your GraphQL query with [\`variantBySelectedOptions\`](https://shopify.dev/docs/api/storefront/2024-07/objects/product#field-product-variantbyselectedoptions).`, type: 'component', defaultExample: { description: 'I am the default example', diff --git a/packages/hydrogen/src/product/useOptimisticProduct.doc.ts b/packages/hydrogen/src/product/useOptimisticProduct.doc.ts index d7f3716ee1..ed2c5596cb 100644 --- a/packages/hydrogen/src/product/useOptimisticProduct.doc.ts +++ b/packages/hydrogen/src/product/useOptimisticProduct.doc.ts @@ -8,12 +8,12 @@ const data: ReferenceEntityTemplateSchema = { { name: 'VariantSelector', type: 'components', - url: '/docs/api/hydrogen/2024-04/components/variantselector', + url: '/docs/api/hydrogen/2024-07/components/variantselector', }, { name: 'useOptimisticCart', type: 'hooks', - url: '/docs/api/hydrogen/2024-04/hooks/useoptimisticcart', + url: '/docs/api/hydrogen/2024-07/hooks/useoptimisticcart', }, ], description: `The \`useOptimisticProduct\` takes an existing product object, processes a pending navigation to a product variant, and locally mutates the product with optimistic state. This makes switching product options immediate. It requires that the product query include a \`selectedVariant\` field populated by \`variantBySelectedOptions\`.`, diff --git a/packages/hydrogen/src/routing/redirect.ts b/packages/hydrogen/src/routing/redirect.ts index b87ec833eb..63fb19ec6f 100644 --- a/packages/hydrogen/src/routing/redirect.ts +++ b/packages/hydrogen/src/routing/redirect.ts @@ -3,7 +3,7 @@ import type {I18nBase, Storefront} from '../storefront'; import {getRedirectUrl} from '../utils/get-redirect-url'; type StorefrontRedirect = { - /** The [Storefront client](/docs/api/hydrogen/2024-04/utilities/createstorefrontclient) instance */ + /** The [Storefront client](/docs/api/hydrogen/2024-07/utilities/createstorefrontclient) instance */ storefront: Storefront; /** The [MDN Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) object that was passed to the `server.ts` request handler. */ request: Request; diff --git a/packages/hydrogen/src/storefront.ts b/packages/hydrogen/src/storefront.ts index 26d066e96e..8935231f4f 100644 --- a/packages/hydrogen/src/storefront.ts +++ b/packages/hydrogen/src/storefront.ts @@ -205,7 +205,7 @@ type StorefrontMutationOptions = StorefrontCommonExtraParams & { const defaultI18n: I18nBase = {language: 'EN', country: 'US'}; /** - * This function extends `createStorefrontClient` from [Hydrogen React](/docs/api/hydrogen-react/2024-04/utilities/createstorefrontclient). The additional arguments enable internationalization (i18n), caching, and other features particular to Remix and Oxygen. + * This function extends `createStorefrontClient` from [Hydrogen React](/docs/api/hydrogen-react/2024-07/utilities/createstorefrontclient). The additional arguments enable internationalization (i18n), caching, and other features particular to Remix and Oxygen. * * Learn more about [data fetching in Hydrogen](/docs/custom-storefronts/hydrogen/data-fetching/fetch-data). */ @@ -495,29 +495,29 @@ export type StorefrontForDoc = { ) => Promise; /** The cache instance passed in from the `createStorefrontClient` argument. */ cache?: Cache; - /** Re-export of [`CacheNone`](/docs/api/hydrogen/2024-04/utilities/cachenone). */ + /** Re-export of [`CacheNone`](/docs/api/hydrogen/2024-07/utilities/cachenone). */ CacheNone?: typeof CacheNone; - /** Re-export of [`CacheLong`](/docs/api/hydrogen/2024-04/utilities/cachelong). */ + /** Re-export of [`CacheLong`](/docs/api/hydrogen/2024-07/utilities/cachelong). */ CacheLong?: typeof CacheLong; - /** Re-export of [`CacheShort`](/docs/api/hydrogen/2024-04/utilities/cacheshort). */ + /** Re-export of [`CacheShort`](/docs/api/hydrogen/2024-07/utilities/cacheshort). */ CacheShort?: typeof CacheShort; - /** Re-export of [`CacheCustom`](/docs/api/hydrogen/2024-04/utilities/cachecustom). */ + /** Re-export of [`CacheCustom`](/docs/api/hydrogen/2024-07/utilities/cachecustom). */ CacheCustom?: typeof CacheCustom; - /** Re-export of [`generateCacheControlHeader`](/docs/api/hydrogen/2024-04/utilities/generatecachecontrolheader). */ + /** Re-export of [`generateCacheControlHeader`](/docs/api/hydrogen/2024-07/utilities/generatecachecontrolheader). */ generateCacheControlHeader?: typeof generateCacheControlHeader; - /** Returns an object that contains headers that are needed for each query to Storefront API GraphQL endpoint. See [`getPublicTokenHeaders` in Hydrogen React](/docs/api/hydrogen-react/2024-04/utilities/createstorefrontclient#:~:text=%27graphql%27.-,getPublicTokenHeaders,-(props%3F%3A) for more details. */ + /** Returns an object that contains headers that are needed for each query to Storefront API GraphQL endpoint. See [`getPublicTokenHeaders` in Hydrogen React](/docs/api/hydrogen-react/2024-07/utilities/createstorefrontclient#:~:text=%27graphql%27.-,getPublicTokenHeaders,-(props%3F%3A) for more details. */ getPublicTokenHeaders?: ReturnType< typeof createStorefrontUtilities >['getPublicTokenHeaders']; - /** Returns an object that contains headers that are needed for each query to Storefront API GraphQL endpoint for API calls made from a server. See [`getPrivateTokenHeaders` in Hydrogen React](/docs/api/hydrogen-react/2024-04/utilities/createstorefrontclient#:~:text=storefrontApiVersion-,getPrivateTokenHeaders,-(props%3F%3A) for more details.*/ + /** Returns an object that contains headers that are needed for each query to Storefront API GraphQL endpoint for API calls made from a server. See [`getPrivateTokenHeaders` in Hydrogen React](/docs/api/hydrogen-react/2024-07/utilities/createstorefrontclient#:~:text=storefrontApiVersion-,getPrivateTokenHeaders,-(props%3F%3A) for more details.*/ getPrivateTokenHeaders?: ReturnType< typeof createStorefrontUtilities >['getPrivateTokenHeaders']; - /** Creates the fully-qualified URL to your myshopify.com domain. See [`getShopifyDomain` in Hydrogen React](/docs/api/hydrogen-react/2024-04/utilities/createstorefrontclient#:~:text=StorefrontClientReturn-,getShopifyDomain,-(props%3F%3A) for more details. */ + /** Creates the fully-qualified URL to your myshopify.com domain. See [`getShopifyDomain` in Hydrogen React](/docs/api/hydrogen-react/2024-07/utilities/createstorefrontclient#:~:text=StorefrontClientReturn-,getShopifyDomain,-(props%3F%3A) for more details. */ getShopifyDomain?: ReturnType< typeof createStorefrontUtilities >['getShopifyDomain']; - /** Creates the fully-qualified URL to your store's GraphQL endpoint. See [`getStorefrontApiUrl` in Hydrogen React](/docs/api/hydrogen-react/2024-04/utilities/createstorefrontclient#:~:text=storeDomain-,getStorefrontApiUrl,-(props%3F%3A) for more details.*/ + /** Creates the fully-qualified URL to your store's GraphQL endpoint. See [`getStorefrontApiUrl` in Hydrogen React](/docs/api/hydrogen-react/2024-07/utilities/createstorefrontclient#:~:text=storeDomain-,getStorefrontApiUrl,-(props%3F%3A) for more details.*/ getApiUrl?: ReturnType< typeof createStorefrontUtilities >['getStorefrontApiUrl'];