@shopify/hydrogen 2026.4.5 → 2026.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/development/index.cjs +222 -369
- package/dist/development/index.cjs.map +1 -1
- package/dist/development/index.js +225 -372
- package/dist/development/index.js.map +1 -1
- package/dist/oxygen/index.d.ts +39 -7
- package/dist/production/index.cjs +51 -51
- package/dist/production/index.cjs.map +1 -1
- package/dist/production/index.d.cts +46 -20
- package/dist/production/index.d.ts +46 -20
- package/dist/production/index.js +51 -51
- package/dist/production/index.js.map +1 -1
- package/dist/vite/request-events.d.ts +39 -7
- package/package.json +2 -2
|
@@ -1384,6 +1384,23 @@ type VisitorConsent = {
|
|
|
1384
1384
|
preferences: ConsentStatus;
|
|
1385
1385
|
sale_of_data: ConsentStatus;
|
|
1386
1386
|
};
|
|
1387
|
+
/** Consent choices returned by the Customer Privacy API. */
|
|
1388
|
+
type VisitorConsentValues = Record<keyof VisitorConsent, 'yes' | 'no' | ''>;
|
|
1389
|
+
type CustomerPrivacyConfiguration = {
|
|
1390
|
+
isHeadless?: boolean;
|
|
1391
|
+
asyncConsent?: boolean;
|
|
1392
|
+
asyncVisitorState?: boolean;
|
|
1393
|
+
consentDomain?: string;
|
|
1394
|
+
storefrontAccessToken?: string;
|
|
1395
|
+
injectedConsent?: string;
|
|
1396
|
+
debug?: {
|
|
1397
|
+
hydrogen?: {
|
|
1398
|
+
generation: number;
|
|
1399
|
+
serverTiming: boolean;
|
|
1400
|
+
};
|
|
1401
|
+
[key: string]: unknown;
|
|
1402
|
+
};
|
|
1403
|
+
};
|
|
1387
1404
|
type VisitorConsentCollected = {
|
|
1388
1405
|
analyticsAllowed: boolean;
|
|
1389
1406
|
firstPartyMarketingAllowed: boolean;
|
|
@@ -1392,7 +1409,6 @@ type VisitorConsentCollected = {
|
|
|
1392
1409
|
saleOfDataAllowed: boolean;
|
|
1393
1410
|
thirdPartyMarketingAllowed: boolean;
|
|
1394
1411
|
};
|
|
1395
|
-
type CustomerPrivacyApiLoaded = boolean;
|
|
1396
1412
|
type CustomerPrivacyConsentConfig = {
|
|
1397
1413
|
checkoutRootDomain: string;
|
|
1398
1414
|
storefrontRootDomain?: string;
|
|
@@ -1401,11 +1417,11 @@ type CustomerPrivacyConsentConfig = {
|
|
|
1401
1417
|
/** The privacyBanner refers to `language` as `locale` */
|
|
1402
1418
|
locale?: LanguageCode$1;
|
|
1403
1419
|
};
|
|
1404
|
-
type SetConsentHeadlessParams = VisitorConsent & CustomerPrivacyConsentConfig & {
|
|
1420
|
+
type SetConsentHeadlessParams = Partial<VisitorConsent> & CustomerPrivacyConsentConfig & {
|
|
1405
1421
|
headlessStorefront?: boolean;
|
|
1406
1422
|
};
|
|
1407
1423
|
/**
|
|
1408
|
-
Ideally this type should come from the
|
|
1424
|
+
Ideally this type should come from the Customer Privacy API sdk
|
|
1409
1425
|
analyticsProcessingAllowed -
|
|
1410
1426
|
currentVisitorConsent
|
|
1411
1427
|
doesMerchantSupportGranularConsent
|
|
@@ -1422,7 +1438,9 @@ type SetConsentHeadlessParams = VisitorConsent & CustomerPrivacyConsentConfig &
|
|
|
1422
1438
|
thirdPartyMarketingAllowed
|
|
1423
1439
|
**/
|
|
1424
1440
|
type OriginalCustomerPrivacy = {
|
|
1425
|
-
currentVisitorConsent: () =>
|
|
1441
|
+
currentVisitorConsent: () => VisitorConsentValues;
|
|
1442
|
+
consentStatus?: 'loading' | 'loaded';
|
|
1443
|
+
config?: CustomerPrivacyConfiguration;
|
|
1426
1444
|
preferencesProcessingAllowed: () => boolean;
|
|
1427
1445
|
saleOfDataAllowed: () => boolean;
|
|
1428
1446
|
marketingAllowed: () => boolean;
|
|
@@ -1433,7 +1451,7 @@ type OriginalCustomerPrivacy = {
|
|
|
1433
1451
|
shouldShowBanner: () => boolean;
|
|
1434
1452
|
};
|
|
1435
1453
|
type CustomerPrivacy = Omit<OriginalCustomerPrivacy, 'setTrackingConsent'> & {
|
|
1436
|
-
setTrackingConsent: (consent: VisitorConsent
|
|
1454
|
+
setTrackingConsent: (consent: Partial<VisitorConsent>, // we have already applied the headlessStorefront in the override
|
|
1437
1455
|
callback: (data: {
|
|
1438
1456
|
error: string;
|
|
1439
1457
|
} | undefined) => void) => void;
|
|
@@ -1442,16 +1460,17 @@ type PrivacyBanner = {
|
|
|
1442
1460
|
loadBanner: (options?: Partial<CustomerPrivacyConsentConfig>) => void;
|
|
1443
1461
|
showPreferences: (options?: Partial<CustomerPrivacyConsentConfig>) => void;
|
|
1444
1462
|
};
|
|
1445
|
-
interface CustomEventMap
|
|
1463
|
+
interface CustomEventMap {
|
|
1446
1464
|
visitorConsentCollected: CustomEvent<VisitorConsentCollected>;
|
|
1447
|
-
|
|
1465
|
+
consentTrackingApiLoaded: Event;
|
|
1466
|
+
shopifyCustomerPrivacyApiLoaded: CustomEvent<null>;
|
|
1448
1467
|
}
|
|
1449
1468
|
type CustomerPrivacyApiProps = {
|
|
1450
1469
|
/** The production shop checkout domain url. */
|
|
1451
1470
|
checkoutDomain: string;
|
|
1452
1471
|
/** The storefront access token for the shop. */
|
|
1453
1472
|
storefrontAccessToken: string;
|
|
1454
|
-
/** Whether to load the Shopify privacy banner as configured in Shopify admin. Defaults to
|
|
1473
|
+
/** Whether to load the Shopify privacy banner as configured in Shopify admin. Defaults to false. */
|
|
1455
1474
|
withPrivacyBanner?: boolean;
|
|
1456
1475
|
/** Country code for the shop. */
|
|
1457
1476
|
country?: CountryCode$1;
|
|
@@ -1459,18 +1478,25 @@ type CustomerPrivacyApiProps = {
|
|
|
1459
1478
|
locale?: LanguageCode$1;
|
|
1460
1479
|
/** Callback to be called when visitor consent is collected. */
|
|
1461
1480
|
onVisitorConsentCollected?: (consent: VisitorConsentCollected) => void;
|
|
1462
|
-
/**
|
|
1481
|
+
/**
|
|
1482
|
+
* Called once consent is available and the selected APIs are loaded. If initial
|
|
1483
|
+
* consent fails to load, waits for a successful consent update. The returned
|
|
1484
|
+
* customerPrivacy API may be available earlier, for example to show a custom CMP.
|
|
1485
|
+
*/
|
|
1463
1486
|
onReady?: () => void;
|
|
1464
1487
|
/**
|
|
1465
|
-
*
|
|
1466
|
-
*
|
|
1488
|
+
* @deprecated This option is ignored: consent requests always use the
|
|
1489
|
+
* same-origin Storefront API proxy that Hydrogen's `createRequestHandler`
|
|
1490
|
+
* includes, as if this were `true`. Consent and analytics do not work
|
|
1491
|
+
* without the proxy, so `false` is no longer supported,
|
|
1492
|
+
* [notice](https://shopify.dev/changelog/posts/tracking-cookie-deprecation-hydrogen).
|
|
1467
1493
|
*/
|
|
1468
1494
|
sameDomainForStorefrontApi?: boolean;
|
|
1469
1495
|
};
|
|
1470
1496
|
/** @publicDocs */
|
|
1471
1497
|
declare function useCustomerPrivacy(props: CustomerPrivacyApiProps): {
|
|
1498
|
+
privacyBanner?: PrivacyBanner | null | undefined;
|
|
1472
1499
|
customerPrivacy: CustomerPrivacy | null;
|
|
1473
|
-
privacyBanner?: PrivacyBanner | null;
|
|
1474
1500
|
};
|
|
1475
1501
|
|
|
1476
1502
|
interface HydrogenSessionData {
|
|
@@ -1557,9 +1583,9 @@ declare global {
|
|
|
1557
1583
|
interface Window {
|
|
1558
1584
|
privacyBanner: PrivacyBanner;
|
|
1559
1585
|
Shopify: {
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1586
|
+
country?: string;
|
|
1587
|
+
locale?: string;
|
|
1588
|
+
customerPrivacy?: Partial<CustomerPrivacy>;
|
|
1563
1589
|
};
|
|
1564
1590
|
}
|
|
1565
1591
|
interface Document {
|
|
@@ -1651,8 +1677,8 @@ type Storefront<TI18n extends I18nBase = I18nBase> = {
|
|
|
1651
1677
|
forwardMcp: (request: Request) => Promise<Response>;
|
|
1652
1678
|
/**
|
|
1653
1679
|
* Sets the collected subrequest headers in the response.
|
|
1654
|
-
* Useful to forward
|
|
1655
|
-
*
|
|
1680
|
+
* Useful to forward cookies from server subrequests
|
|
1681
|
+
* to the browser.
|
|
1656
1682
|
*/
|
|
1657
1683
|
setCollectedSubrequestHeaders: (response: {
|
|
1658
1684
|
headers: Headers;
|
|
@@ -1974,7 +2000,7 @@ type AnalyticsProviderProps = {
|
|
|
1974
2000
|
consent: Consent;
|
|
1975
2001
|
/** @deprecated Disable throwing errors when required props are missing. */
|
|
1976
2002
|
disableThrowOnError?: boolean;
|
|
1977
|
-
/**
|
|
2003
|
+
/** @deprecated No longer used. The Customer Privacy API manages Shopify cookies. */
|
|
1978
2004
|
cookieDomain?: string;
|
|
1979
2005
|
};
|
|
1980
2006
|
type AnalyticsContextValue = {
|
|
@@ -2018,7 +2044,7 @@ declare function publish(event: typeof AnalyticsEvent.CART_UPDATED, payload: Car
|
|
|
2018
2044
|
declare function publish(event: typeof AnalyticsEvent.PRODUCT_ADD_TO_CART, payload: CartLineUpdatePayload): void;
|
|
2019
2045
|
declare function publish(event: typeof AnalyticsEvent.PRODUCT_REMOVED_FROM_CART, payload: CartLineUpdatePayload): void;
|
|
2020
2046
|
declare function publish(event: typeof AnalyticsEvent.CUSTOM_EVENT, payload: OtherData): void;
|
|
2021
|
-
declare function AnalyticsProvider({ canTrack: customCanTrack, cart: currentCart, children, consent, customData, shop: shopProp,
|
|
2047
|
+
declare function AnalyticsProvider({ canTrack: customCanTrack, cart: currentCart, children, consent, customData, shop: shopProp, }: AnalyticsProviderProps): JSX.Element;
|
|
2022
2048
|
/** @publicDocs */
|
|
2023
2049
|
declare function useAnalytics(): AnalyticsContextValue;
|
|
2024
2050
|
type ShopAnalyticsProps = {
|
|
@@ -3257,4 +3283,4 @@ interface GetSiteMapOptions {
|
|
|
3257
3283
|
*/
|
|
3258
3284
|
declare function getSitemap(options: GetSiteMapOptions): Promise<Response>;
|
|
3259
3285
|
|
|
3260
|
-
export { Analytics, AnalyticsEvent, CacheCustom, type CacheKey, CacheLong, CacheNone, CacheShort, type CachingStrategy, type CartActionInput, CartForm, type CartLineUpdatePayload, type CartQueryDataReturn, type CartQueryOptions, type CartQueryReturn, type CartReturn, type CartUpdatePayload, type CartViewPayload, type CollectionViewPayload, type ConsentStatus, type CookieOptions, type CreateStorefrontClientForDocs, type CreateStorefrontClientOptions, type CustomEventMap
|
|
3286
|
+
export { Analytics, AnalyticsEvent, CacheCustom, type CacheKey, CacheLong, CacheNone, CacheShort, type CachingStrategy, type CartActionInput, CartForm, type CartLineUpdatePayload, type CartQueryDataReturn, type CartQueryOptions, type CartQueryReturn, type CartReturn, type CartUpdatePayload, type CartViewPayload, type CollectionViewPayload, type ConsentStatus, type CookieOptions, type CreateStorefrontClientForDocs, type CreateStorefrontClientOptions, type CustomEventMap, type CustomerAccount, type CustomerAccountMutations, type CustomerAccountQueries, type CustomerPrivacy, type CustomerPrivacyApiProps, type CustomerPrivacyConsentConfig, type HydrogenCart, type HydrogenCartCustom, type HydrogenContext, type HydrogenEnv, type HydrogenRouterContextProvider, type HydrogenSession, type HydrogenSessionData, type I18nBase, InMemoryCache, type MetafieldWithoutOwnerId, type NoStoreStrategy, NonceProvider, type OptimisticCart, type OptimisticCartLine, type OptimisticCartLineInput, OptimisticInput, type PageViewPayload, Pagination, type PrivacyBanner, type ProductViewPayload, RichText, Script, type SearchViewPayload, Seo, type SeoConfig, type SeoHandleFunction, type SetConsentHeadlessParams, type ShopAnalytics, ShopPayButton, type Storefront, type StorefrontApiErrors, type StorefrontClient, type StorefrontForDoc, type StorefrontMutationOptionsForDocs, type StorefrontMutations, type StorefrontQueries, type StorefrontQueryOptionsForDocs, type VariantOption, type VariantOptionValue, VariantSelector, type VisitorConsent, type VisitorConsentCollected, type WithCache, cartAttributesUpdateDefault, cartBuyerIdentityUpdateDefault, cartCreateDefault, cartDiscountCodesUpdateDefault, cartGetDefault, cartGetIdDefault, cartGiftCardCodesAddDefault, cartGiftCardCodesRemoveDefault, cartGiftCardCodesUpdateDefault, cartLinesAddDefault, cartLinesRemoveDefault, cartLinesUpdateDefault, cartMetafieldDeleteDefault, cartMetafieldsSetDefault, cartNoteUpdateDefault, cartSelectedDeliveryOptionsUpdateDefault, cartSetIdDefault, changelogHandler, createCartHandler, createContentSecurityPolicy, createCustomerAccountClient, createHydrogenContext, createRequestHandler, createStorefrontClient, createWithCache, formatAPIResult, generateCacheControlHeader, getPaginationVariables, getSelectedProductOptions, getSeoMeta, getShopAnalytics, getSitemap, getSitemapIndex, graphiqlLoader, hydrogenContext, hydrogenPreset, hydrogenRoutes, storefrontRedirect, useAnalytics, useCustomerPrivacy, useNonce, useOptimisticCart, useOptimisticData, useOptimisticVariant };
|
|
@@ -1384,6 +1384,23 @@ type VisitorConsent = {
|
|
|
1384
1384
|
preferences: ConsentStatus;
|
|
1385
1385
|
sale_of_data: ConsentStatus;
|
|
1386
1386
|
};
|
|
1387
|
+
/** Consent choices returned by the Customer Privacy API. */
|
|
1388
|
+
type VisitorConsentValues = Record<keyof VisitorConsent, 'yes' | 'no' | ''>;
|
|
1389
|
+
type CustomerPrivacyConfiguration = {
|
|
1390
|
+
isHeadless?: boolean;
|
|
1391
|
+
asyncConsent?: boolean;
|
|
1392
|
+
asyncVisitorState?: boolean;
|
|
1393
|
+
consentDomain?: string;
|
|
1394
|
+
storefrontAccessToken?: string;
|
|
1395
|
+
injectedConsent?: string;
|
|
1396
|
+
debug?: {
|
|
1397
|
+
hydrogen?: {
|
|
1398
|
+
generation: number;
|
|
1399
|
+
serverTiming: boolean;
|
|
1400
|
+
};
|
|
1401
|
+
[key: string]: unknown;
|
|
1402
|
+
};
|
|
1403
|
+
};
|
|
1387
1404
|
type VisitorConsentCollected = {
|
|
1388
1405
|
analyticsAllowed: boolean;
|
|
1389
1406
|
firstPartyMarketingAllowed: boolean;
|
|
@@ -1392,7 +1409,6 @@ type VisitorConsentCollected = {
|
|
|
1392
1409
|
saleOfDataAllowed: boolean;
|
|
1393
1410
|
thirdPartyMarketingAllowed: boolean;
|
|
1394
1411
|
};
|
|
1395
|
-
type CustomerPrivacyApiLoaded = boolean;
|
|
1396
1412
|
type CustomerPrivacyConsentConfig = {
|
|
1397
1413
|
checkoutRootDomain: string;
|
|
1398
1414
|
storefrontRootDomain?: string;
|
|
@@ -1401,11 +1417,11 @@ type CustomerPrivacyConsentConfig = {
|
|
|
1401
1417
|
/** The privacyBanner refers to `language` as `locale` */
|
|
1402
1418
|
locale?: LanguageCode$1;
|
|
1403
1419
|
};
|
|
1404
|
-
type SetConsentHeadlessParams = VisitorConsent & CustomerPrivacyConsentConfig & {
|
|
1420
|
+
type SetConsentHeadlessParams = Partial<VisitorConsent> & CustomerPrivacyConsentConfig & {
|
|
1405
1421
|
headlessStorefront?: boolean;
|
|
1406
1422
|
};
|
|
1407
1423
|
/**
|
|
1408
|
-
Ideally this type should come from the
|
|
1424
|
+
Ideally this type should come from the Customer Privacy API sdk
|
|
1409
1425
|
analyticsProcessingAllowed -
|
|
1410
1426
|
currentVisitorConsent
|
|
1411
1427
|
doesMerchantSupportGranularConsent
|
|
@@ -1422,7 +1438,9 @@ type SetConsentHeadlessParams = VisitorConsent & CustomerPrivacyConsentConfig &
|
|
|
1422
1438
|
thirdPartyMarketingAllowed
|
|
1423
1439
|
**/
|
|
1424
1440
|
type OriginalCustomerPrivacy = {
|
|
1425
|
-
currentVisitorConsent: () =>
|
|
1441
|
+
currentVisitorConsent: () => VisitorConsentValues;
|
|
1442
|
+
consentStatus?: 'loading' | 'loaded';
|
|
1443
|
+
config?: CustomerPrivacyConfiguration;
|
|
1426
1444
|
preferencesProcessingAllowed: () => boolean;
|
|
1427
1445
|
saleOfDataAllowed: () => boolean;
|
|
1428
1446
|
marketingAllowed: () => boolean;
|
|
@@ -1433,7 +1451,7 @@ type OriginalCustomerPrivacy = {
|
|
|
1433
1451
|
shouldShowBanner: () => boolean;
|
|
1434
1452
|
};
|
|
1435
1453
|
type CustomerPrivacy = Omit<OriginalCustomerPrivacy, 'setTrackingConsent'> & {
|
|
1436
|
-
setTrackingConsent: (consent: VisitorConsent
|
|
1454
|
+
setTrackingConsent: (consent: Partial<VisitorConsent>, // we have already applied the headlessStorefront in the override
|
|
1437
1455
|
callback: (data: {
|
|
1438
1456
|
error: string;
|
|
1439
1457
|
} | undefined) => void) => void;
|
|
@@ -1442,16 +1460,17 @@ type PrivacyBanner = {
|
|
|
1442
1460
|
loadBanner: (options?: Partial<CustomerPrivacyConsentConfig>) => void;
|
|
1443
1461
|
showPreferences: (options?: Partial<CustomerPrivacyConsentConfig>) => void;
|
|
1444
1462
|
};
|
|
1445
|
-
interface CustomEventMap
|
|
1463
|
+
interface CustomEventMap {
|
|
1446
1464
|
visitorConsentCollected: CustomEvent<VisitorConsentCollected>;
|
|
1447
|
-
|
|
1465
|
+
consentTrackingApiLoaded: Event;
|
|
1466
|
+
shopifyCustomerPrivacyApiLoaded: CustomEvent<null>;
|
|
1448
1467
|
}
|
|
1449
1468
|
type CustomerPrivacyApiProps = {
|
|
1450
1469
|
/** The production shop checkout domain url. */
|
|
1451
1470
|
checkoutDomain: string;
|
|
1452
1471
|
/** The storefront access token for the shop. */
|
|
1453
1472
|
storefrontAccessToken: string;
|
|
1454
|
-
/** Whether to load the Shopify privacy banner as configured in Shopify admin. Defaults to
|
|
1473
|
+
/** Whether to load the Shopify privacy banner as configured in Shopify admin. Defaults to false. */
|
|
1455
1474
|
withPrivacyBanner?: boolean;
|
|
1456
1475
|
/** Country code for the shop. */
|
|
1457
1476
|
country?: CountryCode$1;
|
|
@@ -1459,18 +1478,25 @@ type CustomerPrivacyApiProps = {
|
|
|
1459
1478
|
locale?: LanguageCode$1;
|
|
1460
1479
|
/** Callback to be called when visitor consent is collected. */
|
|
1461
1480
|
onVisitorConsentCollected?: (consent: VisitorConsentCollected) => void;
|
|
1462
|
-
/**
|
|
1481
|
+
/**
|
|
1482
|
+
* Called once consent is available and the selected APIs are loaded. If initial
|
|
1483
|
+
* consent fails to load, waits for a successful consent update. The returned
|
|
1484
|
+
* customerPrivacy API may be available earlier, for example to show a custom CMP.
|
|
1485
|
+
*/
|
|
1463
1486
|
onReady?: () => void;
|
|
1464
1487
|
/**
|
|
1465
|
-
*
|
|
1466
|
-
*
|
|
1488
|
+
* @deprecated This option is ignored: consent requests always use the
|
|
1489
|
+
* same-origin Storefront API proxy that Hydrogen's `createRequestHandler`
|
|
1490
|
+
* includes, as if this were `true`. Consent and analytics do not work
|
|
1491
|
+
* without the proxy, so `false` is no longer supported,
|
|
1492
|
+
* [notice](https://shopify.dev/changelog/posts/tracking-cookie-deprecation-hydrogen).
|
|
1467
1493
|
*/
|
|
1468
1494
|
sameDomainForStorefrontApi?: boolean;
|
|
1469
1495
|
};
|
|
1470
1496
|
/** @publicDocs */
|
|
1471
1497
|
declare function useCustomerPrivacy(props: CustomerPrivacyApiProps): {
|
|
1498
|
+
privacyBanner?: PrivacyBanner | null | undefined;
|
|
1472
1499
|
customerPrivacy: CustomerPrivacy | null;
|
|
1473
|
-
privacyBanner?: PrivacyBanner | null;
|
|
1474
1500
|
};
|
|
1475
1501
|
|
|
1476
1502
|
interface HydrogenSessionData {
|
|
@@ -1557,9 +1583,9 @@ declare global {
|
|
|
1557
1583
|
interface Window {
|
|
1558
1584
|
privacyBanner: PrivacyBanner;
|
|
1559
1585
|
Shopify: {
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1586
|
+
country?: string;
|
|
1587
|
+
locale?: string;
|
|
1588
|
+
customerPrivacy?: Partial<CustomerPrivacy>;
|
|
1563
1589
|
};
|
|
1564
1590
|
}
|
|
1565
1591
|
interface Document {
|
|
@@ -1651,8 +1677,8 @@ type Storefront<TI18n extends I18nBase = I18nBase> = {
|
|
|
1651
1677
|
forwardMcp: (request: Request) => Promise<Response>;
|
|
1652
1678
|
/**
|
|
1653
1679
|
* Sets the collected subrequest headers in the response.
|
|
1654
|
-
* Useful to forward
|
|
1655
|
-
*
|
|
1680
|
+
* Useful to forward cookies from server subrequests
|
|
1681
|
+
* to the browser.
|
|
1656
1682
|
*/
|
|
1657
1683
|
setCollectedSubrequestHeaders: (response: {
|
|
1658
1684
|
headers: Headers;
|
|
@@ -1974,7 +2000,7 @@ type AnalyticsProviderProps = {
|
|
|
1974
2000
|
consent: Consent;
|
|
1975
2001
|
/** @deprecated Disable throwing errors when required props are missing. */
|
|
1976
2002
|
disableThrowOnError?: boolean;
|
|
1977
|
-
/**
|
|
2003
|
+
/** @deprecated No longer used. The Customer Privacy API manages Shopify cookies. */
|
|
1978
2004
|
cookieDomain?: string;
|
|
1979
2005
|
};
|
|
1980
2006
|
type AnalyticsContextValue = {
|
|
@@ -2018,7 +2044,7 @@ declare function publish(event: typeof AnalyticsEvent.CART_UPDATED, payload: Car
|
|
|
2018
2044
|
declare function publish(event: typeof AnalyticsEvent.PRODUCT_ADD_TO_CART, payload: CartLineUpdatePayload): void;
|
|
2019
2045
|
declare function publish(event: typeof AnalyticsEvent.PRODUCT_REMOVED_FROM_CART, payload: CartLineUpdatePayload): void;
|
|
2020
2046
|
declare function publish(event: typeof AnalyticsEvent.CUSTOM_EVENT, payload: OtherData): void;
|
|
2021
|
-
declare function AnalyticsProvider({ canTrack: customCanTrack, cart: currentCart, children, consent, customData, shop: shopProp,
|
|
2047
|
+
declare function AnalyticsProvider({ canTrack: customCanTrack, cart: currentCart, children, consent, customData, shop: shopProp, }: AnalyticsProviderProps): JSX.Element;
|
|
2022
2048
|
/** @publicDocs */
|
|
2023
2049
|
declare function useAnalytics(): AnalyticsContextValue;
|
|
2024
2050
|
type ShopAnalyticsProps = {
|
|
@@ -3257,4 +3283,4 @@ interface GetSiteMapOptions {
|
|
|
3257
3283
|
*/
|
|
3258
3284
|
declare function getSitemap(options: GetSiteMapOptions): Promise<Response>;
|
|
3259
3285
|
|
|
3260
|
-
export { Analytics, AnalyticsEvent, CacheCustom, type CacheKey, CacheLong, CacheNone, CacheShort, type CachingStrategy, type CartActionInput, CartForm, type CartLineUpdatePayload, type CartQueryDataReturn, type CartQueryOptions, type CartQueryReturn, type CartReturn, type CartUpdatePayload, type CartViewPayload, type CollectionViewPayload, type ConsentStatus, type CookieOptions, type CreateStorefrontClientForDocs, type CreateStorefrontClientOptions, type CustomEventMap
|
|
3286
|
+
export { Analytics, AnalyticsEvent, CacheCustom, type CacheKey, CacheLong, CacheNone, CacheShort, type CachingStrategy, type CartActionInput, CartForm, type CartLineUpdatePayload, type CartQueryDataReturn, type CartQueryOptions, type CartQueryReturn, type CartReturn, type CartUpdatePayload, type CartViewPayload, type CollectionViewPayload, type ConsentStatus, type CookieOptions, type CreateStorefrontClientForDocs, type CreateStorefrontClientOptions, type CustomEventMap, type CustomerAccount, type CustomerAccountMutations, type CustomerAccountQueries, type CustomerPrivacy, type CustomerPrivacyApiProps, type CustomerPrivacyConsentConfig, type HydrogenCart, type HydrogenCartCustom, type HydrogenContext, type HydrogenEnv, type HydrogenRouterContextProvider, type HydrogenSession, type HydrogenSessionData, type I18nBase, InMemoryCache, type MetafieldWithoutOwnerId, type NoStoreStrategy, NonceProvider, type OptimisticCart, type OptimisticCartLine, type OptimisticCartLineInput, OptimisticInput, type PageViewPayload, Pagination, type PrivacyBanner, type ProductViewPayload, RichText, Script, type SearchViewPayload, Seo, type SeoConfig, type SeoHandleFunction, type SetConsentHeadlessParams, type ShopAnalytics, ShopPayButton, type Storefront, type StorefrontApiErrors, type StorefrontClient, type StorefrontForDoc, type StorefrontMutationOptionsForDocs, type StorefrontMutations, type StorefrontQueries, type StorefrontQueryOptionsForDocs, type VariantOption, type VariantOptionValue, VariantSelector, type VisitorConsent, type VisitorConsentCollected, type WithCache, cartAttributesUpdateDefault, cartBuyerIdentityUpdateDefault, cartCreateDefault, cartDiscountCodesUpdateDefault, cartGetDefault, cartGetIdDefault, cartGiftCardCodesAddDefault, cartGiftCardCodesRemoveDefault, cartGiftCardCodesUpdateDefault, cartLinesAddDefault, cartLinesRemoveDefault, cartLinesUpdateDefault, cartMetafieldDeleteDefault, cartMetafieldsSetDefault, cartNoteUpdateDefault, cartSelectedDeliveryOptionsUpdateDefault, cartSetIdDefault, changelogHandler, createCartHandler, createContentSecurityPolicy, createCustomerAccountClient, createHydrogenContext, createRequestHandler, createStorefrontClient, createWithCache, formatAPIResult, generateCacheControlHeader, getPaginationVariables, getSelectedProductOptions, getSeoMeta, getShopAnalytics, getSitemap, getSitemapIndex, graphiqlLoader, hydrogenContext, hydrogenPreset, hydrogenRoutes, storefrontRedirect, useAnalytics, useCustomerPrivacy, useNonce, useOptimisticCart, useOptimisticData, useOptimisticVariant };
|