@shopify/hydrogen 2026.1.3 → 2026.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/customer-account-api-types.d.ts +23 -1
- package/dist/customer-account.schema.json +1 -1
- package/dist/development/index.cjs +135 -58
- package/dist/development/index.cjs.map +1 -1
- package/dist/development/index.js +135 -58
- package/dist/development/index.js.map +1 -1
- package/dist/oxygen/index.d.ts +62 -9
- package/dist/oxygen/index.js +21 -30
- package/dist/production/index.cjs +52 -52
- package/dist/production/index.cjs.map +1 -1
- package/dist/production/index.d.cts +126 -115
- package/dist/production/index.d.ts +126 -115
- package/dist/production/index.js +52 -52
- package/dist/production/index.js.map +1 -1
- package/dist/storefront-api-types.d.ts +1467 -443
- package/dist/storefront.schema.json +1 -1
- package/dist/vite/request-events.d.ts +61 -1
- package/package.json +6 -6
|
@@ -1066,6 +1066,10 @@ type CustomerAccountOptions = {
|
|
|
1066
1066
|
unstableB2b?: boolean;
|
|
1067
1067
|
/** Localization data. */
|
|
1068
1068
|
language?: LanguageCode;
|
|
1069
|
+
/** Set to true when using a custom HTTPS domain (e.g., ngrok, local proxy)
|
|
1070
|
+
* instead of the default Hydrogen tunnel for local development.
|
|
1071
|
+
* You must manually register your redirect_uri in Customer Account API settings. */
|
|
1072
|
+
useCustomAuthDomain?: boolean;
|
|
1069
1073
|
};
|
|
1070
1074
|
|
|
1071
1075
|
type CartGetProps = {
|
|
@@ -1456,6 +1460,101 @@ type RequestEventPayload = {
|
|
|
1456
1460
|
declare const CUSTOMER_ACCOUNT_SESSION_KEY = "customerAccount";
|
|
1457
1461
|
declare const BUYER_SESSION_KEY = "buyer";
|
|
1458
1462
|
|
|
1463
|
+
type ConsentStatus = boolean | undefined;
|
|
1464
|
+
type VisitorConsent = {
|
|
1465
|
+
marketing: ConsentStatus;
|
|
1466
|
+
analytics: ConsentStatus;
|
|
1467
|
+
preferences: ConsentStatus;
|
|
1468
|
+
sale_of_data: ConsentStatus;
|
|
1469
|
+
};
|
|
1470
|
+
type VisitorConsentCollected = {
|
|
1471
|
+
analyticsAllowed: boolean;
|
|
1472
|
+
firstPartyMarketingAllowed: boolean;
|
|
1473
|
+
marketingAllowed: boolean;
|
|
1474
|
+
preferencesAllowed: boolean;
|
|
1475
|
+
saleOfDataAllowed: boolean;
|
|
1476
|
+
thirdPartyMarketingAllowed: boolean;
|
|
1477
|
+
};
|
|
1478
|
+
type CustomerPrivacyApiLoaded = boolean;
|
|
1479
|
+
type CustomerPrivacyConsentConfig = {
|
|
1480
|
+
checkoutRootDomain: string;
|
|
1481
|
+
storefrontRootDomain?: string;
|
|
1482
|
+
storefrontAccessToken: string;
|
|
1483
|
+
country?: CountryCode$1;
|
|
1484
|
+
/** The privacyBanner refers to `language` as `locale` */
|
|
1485
|
+
locale?: LanguageCode$1;
|
|
1486
|
+
};
|
|
1487
|
+
type SetConsentHeadlessParams = VisitorConsent & CustomerPrivacyConsentConfig & {
|
|
1488
|
+
headlessStorefront?: boolean;
|
|
1489
|
+
};
|
|
1490
|
+
/**
|
|
1491
|
+
Ideally this type should come from the Custoemr Privacy API sdk
|
|
1492
|
+
analyticsProcessingAllowed -
|
|
1493
|
+
currentVisitorConsent
|
|
1494
|
+
doesMerchantSupportGranularConsent
|
|
1495
|
+
firstPartyMarketingAllowed
|
|
1496
|
+
getCCPAConsent
|
|
1497
|
+
getTrackingConsent
|
|
1498
|
+
marketingAllowed
|
|
1499
|
+
preferencesProcessingAllowed
|
|
1500
|
+
saleOfDataAllowed
|
|
1501
|
+
saleOfDataRegion
|
|
1502
|
+
setTrackingConsent
|
|
1503
|
+
shouldShowBanner
|
|
1504
|
+
shouldShowGDPRBanner
|
|
1505
|
+
thirdPartyMarketingAllowed
|
|
1506
|
+
**/
|
|
1507
|
+
type OriginalCustomerPrivacy = {
|
|
1508
|
+
currentVisitorConsent: () => VisitorConsent;
|
|
1509
|
+
preferencesProcessingAllowed: () => boolean;
|
|
1510
|
+
saleOfDataAllowed: () => boolean;
|
|
1511
|
+
marketingAllowed: () => boolean;
|
|
1512
|
+
analyticsProcessingAllowed: () => boolean;
|
|
1513
|
+
setTrackingConsent: (consent: SetConsentHeadlessParams, callback: (data: {
|
|
1514
|
+
error: string;
|
|
1515
|
+
} | undefined) => void) => void;
|
|
1516
|
+
shouldShowBanner: () => boolean;
|
|
1517
|
+
};
|
|
1518
|
+
type CustomerPrivacy = Omit<OriginalCustomerPrivacy, 'setTrackingConsent'> & {
|
|
1519
|
+
setTrackingConsent: (consent: VisitorConsent, // we have already applied the headlessStorefront in the override
|
|
1520
|
+
callback: (data: {
|
|
1521
|
+
error: string;
|
|
1522
|
+
} | undefined) => void) => void;
|
|
1523
|
+
};
|
|
1524
|
+
type PrivacyBanner = {
|
|
1525
|
+
loadBanner: (options?: Partial<CustomerPrivacyConsentConfig>) => void;
|
|
1526
|
+
showPreferences: (options?: Partial<CustomerPrivacyConsentConfig>) => void;
|
|
1527
|
+
};
|
|
1528
|
+
interface CustomEventMap$1 {
|
|
1529
|
+
visitorConsentCollected: CustomEvent<VisitorConsentCollected>;
|
|
1530
|
+
customerPrivacyApiLoaded: CustomEvent<CustomerPrivacyApiLoaded>;
|
|
1531
|
+
}
|
|
1532
|
+
type CustomerPrivacyApiProps = {
|
|
1533
|
+
/** The production shop checkout domain url. */
|
|
1534
|
+
checkoutDomain: string;
|
|
1535
|
+
/** The storefront access token for the shop. */
|
|
1536
|
+
storefrontAccessToken: string;
|
|
1537
|
+
/** Whether to load the Shopify privacy banner as configured in Shopify admin. Defaults to true. */
|
|
1538
|
+
withPrivacyBanner?: boolean;
|
|
1539
|
+
/** Country code for the shop. */
|
|
1540
|
+
country?: CountryCode$1;
|
|
1541
|
+
/** Language code for the shop. */
|
|
1542
|
+
locale?: LanguageCode$1;
|
|
1543
|
+
/** Callback to be called when visitor consent is collected. */
|
|
1544
|
+
onVisitorConsentCollected?: (consent: VisitorConsentCollected) => void;
|
|
1545
|
+
/** Callback to be call when customer privacy api is ready. */
|
|
1546
|
+
onReady?: () => void;
|
|
1547
|
+
/**
|
|
1548
|
+
* Whether consent libraries can use same-domain requests to the Storefront API.
|
|
1549
|
+
* Defaults to true if the standard route proxy is enabled in Hydrogen server.
|
|
1550
|
+
*/
|
|
1551
|
+
sameDomainForStorefrontApi?: boolean;
|
|
1552
|
+
};
|
|
1553
|
+
declare function useCustomerPrivacy(props: CustomerPrivacyApiProps): {
|
|
1554
|
+
customerPrivacy: CustomerPrivacy | null;
|
|
1555
|
+
privacyBanner?: PrivacyBanner | null;
|
|
1556
|
+
};
|
|
1557
|
+
|
|
1459
1558
|
interface HydrogenSessionData {
|
|
1460
1559
|
[CUSTOMER_ACCOUNT_SESSION_KEY]: {
|
|
1461
1560
|
accessToken?: string;
|
|
@@ -1540,7 +1639,9 @@ declare global {
|
|
|
1540
1639
|
interface Window {
|
|
1541
1640
|
privacyBanner: PrivacyBanner;
|
|
1542
1641
|
Shopify: {
|
|
1543
|
-
customerPrivacy
|
|
1642
|
+
customerPrivacy?: Partial<CustomerPrivacy> & {
|
|
1643
|
+
backendConsentEnabled?: boolean;
|
|
1644
|
+
};
|
|
1544
1645
|
};
|
|
1545
1646
|
}
|
|
1546
1647
|
interface Document {
|
|
@@ -1615,11 +1716,21 @@ type Storefront<TI18n extends I18nBase = I18nBase> = {
|
|
|
1615
1716
|
isStorefrontApiUrl: (request: {
|
|
1616
1717
|
url?: string;
|
|
1617
1718
|
}) => boolean;
|
|
1719
|
+
/**
|
|
1720
|
+
* Checks if the request URL matches the Storefront MCP endpoint.
|
|
1721
|
+
*/
|
|
1722
|
+
isMcpUrl: (request: {
|
|
1723
|
+
url?: string;
|
|
1724
|
+
}) => boolean;
|
|
1618
1725
|
/**
|
|
1619
1726
|
* Forwards the request to the Storefront API.
|
|
1620
1727
|
* It reads the API version from the request URL.
|
|
1621
1728
|
*/
|
|
1622
1729
|
forward: (request: Request, options?: Pick<StorefrontCommonExtraParams, 'storefrontApiVersion'>) => Promise<Response>;
|
|
1730
|
+
/**
|
|
1731
|
+
* Forwards the request to the Storefront MCP endpoint.
|
|
1732
|
+
*/
|
|
1733
|
+
forwardMcp: (request: Request) => Promise<Response>;
|
|
1623
1734
|
/**
|
|
1624
1735
|
* Sets the collected subrequest headers in the response.
|
|
1625
1736
|
* Useful to forward the cookies and server-timing headers
|
|
@@ -1650,7 +1761,7 @@ type StorefrontQueryOptions = StorefrontCommonExtraParams & {
|
|
|
1650
1761
|
cache?: CachingStrategy;
|
|
1651
1762
|
};
|
|
1652
1763
|
/**
|
|
1653
|
-
* This function extends `createStorefrontClient` from [Hydrogen React](/docs/api/hydrogen-react/2026-
|
|
1764
|
+
* This function extends `createStorefrontClient` from [Hydrogen React](/docs/api/hydrogen-react/2026-04/utilities/createstorefrontclient). The additional arguments enable internationalization (i18n), caching, and other features particular to Remix and Oxygen.
|
|
1654
1765
|
*
|
|
1655
1766
|
* Learn more about [data fetching in Hydrogen](/docs/custom-storefronts/hydrogen/data-fetching/fetch-data).
|
|
1656
1767
|
*/
|
|
@@ -1676,13 +1787,13 @@ type StorefrontForDoc<TI18n extends I18nBase = I18nBase> = {
|
|
|
1676
1787
|
CacheCustom?: typeof CacheCustom;
|
|
1677
1788
|
/** Re-export of [`generateCacheControlHeader`](/docs/api/hydrogen/utilities/generatecachecontrolheader). */
|
|
1678
1789
|
generateCacheControlHeader?: typeof generateCacheControlHeader;
|
|
1679
|
-
/** 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/2026-
|
|
1790
|
+
/** 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/2026-04/utilities/createstorefrontclient#:~:text=%27graphql%27.-,getPublicTokenHeaders,-(props%3F%3A) for more details. */
|
|
1680
1791
|
getPublicTokenHeaders?: ReturnType<typeof createStorefrontClient$1>['getPublicTokenHeaders'];
|
|
1681
|
-
/** 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/2026-
|
|
1792
|
+
/** 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/2026-04/utilities/createstorefrontclient#:~:text=storefrontApiVersion-,getPrivateTokenHeaders,-(props%3F%3A) for more details.*/
|
|
1682
1793
|
getPrivateTokenHeaders?: ReturnType<typeof createStorefrontClient$1>['getPrivateTokenHeaders'];
|
|
1683
|
-
/** Creates the fully-qualified URL to your myshopify.com domain. See [`getShopifyDomain` in Hydrogen React](/docs/api/hydrogen-react/2026-
|
|
1794
|
+
/** Creates the fully-qualified URL to your myshopify.com domain. See [`getShopifyDomain` in Hydrogen React](/docs/api/hydrogen-react/2026-04/utilities/createstorefrontclient#:~:text=StorefrontClientReturn-,getShopifyDomain,-(props%3F%3A) for more details. */
|
|
1684
1795
|
getShopifyDomain?: ReturnType<typeof createStorefrontClient$1>['getShopifyDomain'];
|
|
1685
|
-
/** Creates the fully-qualified URL to your store's GraphQL endpoint. See [`getStorefrontApiUrl` in Hydrogen React](/docs/api/hydrogen-react/2026-
|
|
1796
|
+
/** Creates the fully-qualified URL to your store's GraphQL endpoint. See [`getStorefrontApiUrl` in Hydrogen React](/docs/api/hydrogen-react/2026-04/utilities/createstorefrontclient#:~:text=storeDomain-,getStorefrontApiUrl,-(props%3F%3A) for more details.*/
|
|
1686
1797
|
getApiUrl?: ReturnType<typeof createStorefrontClient$1>['getStorefrontApiUrl'];
|
|
1687
1798
|
/** The `i18n` object passed in from the `createStorefrontClient` argument. */
|
|
1688
1799
|
i18n?: TI18n;
|
|
@@ -1886,101 +1997,6 @@ declare function AnalyticsCartView(props: BasicViewProps): react_jsx_runtime.JSX
|
|
|
1886
1997
|
declare function AnalyticsSearchView(props: SearchViewProps): react_jsx_runtime.JSX.Element;
|
|
1887
1998
|
declare function AnalyticsCustomView(props: CustomViewProps): react_jsx_runtime.JSX.Element;
|
|
1888
1999
|
|
|
1889
|
-
type ConsentStatus = boolean | undefined;
|
|
1890
|
-
type VisitorConsent = {
|
|
1891
|
-
marketing: ConsentStatus;
|
|
1892
|
-
analytics: ConsentStatus;
|
|
1893
|
-
preferences: ConsentStatus;
|
|
1894
|
-
sale_of_data: ConsentStatus;
|
|
1895
|
-
};
|
|
1896
|
-
type VisitorConsentCollected = {
|
|
1897
|
-
analyticsAllowed: boolean;
|
|
1898
|
-
firstPartyMarketingAllowed: boolean;
|
|
1899
|
-
marketingAllowed: boolean;
|
|
1900
|
-
preferencesAllowed: boolean;
|
|
1901
|
-
saleOfDataAllowed: boolean;
|
|
1902
|
-
thirdPartyMarketingAllowed: boolean;
|
|
1903
|
-
};
|
|
1904
|
-
type CustomerPrivacyApiLoaded = boolean;
|
|
1905
|
-
type CustomerPrivacyConsentConfig = {
|
|
1906
|
-
checkoutRootDomain: string;
|
|
1907
|
-
storefrontRootDomain?: string;
|
|
1908
|
-
storefrontAccessToken: string;
|
|
1909
|
-
country?: CountryCode$1;
|
|
1910
|
-
/** The privacyBanner refers to `language` as `locale` */
|
|
1911
|
-
locale?: LanguageCode$1;
|
|
1912
|
-
};
|
|
1913
|
-
type SetConsentHeadlessParams = VisitorConsent & CustomerPrivacyConsentConfig & {
|
|
1914
|
-
headlessStorefront?: boolean;
|
|
1915
|
-
};
|
|
1916
|
-
/**
|
|
1917
|
-
Ideally this type should come from the Custoemr Privacy API sdk
|
|
1918
|
-
analyticsProcessingAllowed -
|
|
1919
|
-
currentVisitorConsent
|
|
1920
|
-
doesMerchantSupportGranularConsent
|
|
1921
|
-
firstPartyMarketingAllowed
|
|
1922
|
-
getCCPAConsent
|
|
1923
|
-
getTrackingConsent
|
|
1924
|
-
marketingAllowed
|
|
1925
|
-
preferencesProcessingAllowed
|
|
1926
|
-
saleOfDataAllowed
|
|
1927
|
-
saleOfDataRegion
|
|
1928
|
-
setTrackingConsent
|
|
1929
|
-
shouldShowBanner
|
|
1930
|
-
shouldShowGDPRBanner
|
|
1931
|
-
thirdPartyMarketingAllowed
|
|
1932
|
-
**/
|
|
1933
|
-
type OriginalCustomerPrivacy = {
|
|
1934
|
-
currentVisitorConsent: () => VisitorConsent;
|
|
1935
|
-
preferencesProcessingAllowed: () => boolean;
|
|
1936
|
-
saleOfDataAllowed: () => boolean;
|
|
1937
|
-
marketingAllowed: () => boolean;
|
|
1938
|
-
analyticsProcessingAllowed: () => boolean;
|
|
1939
|
-
setTrackingConsent: (consent: SetConsentHeadlessParams, callback: (data: {
|
|
1940
|
-
error: string;
|
|
1941
|
-
} | undefined) => void) => void;
|
|
1942
|
-
shouldShowBanner: () => boolean;
|
|
1943
|
-
};
|
|
1944
|
-
type CustomerPrivacy$1 = Omit<OriginalCustomerPrivacy, 'setTrackingConsent'> & {
|
|
1945
|
-
setTrackingConsent: (consent: VisitorConsent, // we have already applied the headlessStorefront in the override
|
|
1946
|
-
callback: (data: {
|
|
1947
|
-
error: string;
|
|
1948
|
-
} | undefined) => void) => void;
|
|
1949
|
-
};
|
|
1950
|
-
type PrivacyBanner$1 = {
|
|
1951
|
-
loadBanner: (options?: Partial<CustomerPrivacyConsentConfig>) => void;
|
|
1952
|
-
showPreferences: (options?: Partial<CustomerPrivacyConsentConfig>) => void;
|
|
1953
|
-
};
|
|
1954
|
-
interface CustomEventMap$1 {
|
|
1955
|
-
visitorConsentCollected: CustomEvent<VisitorConsentCollected>;
|
|
1956
|
-
customerPrivacyApiLoaded: CustomEvent<CustomerPrivacyApiLoaded>;
|
|
1957
|
-
}
|
|
1958
|
-
type CustomerPrivacyApiProps = {
|
|
1959
|
-
/** The production shop checkout domain url. */
|
|
1960
|
-
checkoutDomain: string;
|
|
1961
|
-
/** The storefront access token for the shop. */
|
|
1962
|
-
storefrontAccessToken: string;
|
|
1963
|
-
/** Whether to load the Shopify privacy banner as configured in Shopify admin. Defaults to true. */
|
|
1964
|
-
withPrivacyBanner?: boolean;
|
|
1965
|
-
/** Country code for the shop. */
|
|
1966
|
-
country?: CountryCode$1;
|
|
1967
|
-
/** Language code for the shop. */
|
|
1968
|
-
locale?: LanguageCode$1;
|
|
1969
|
-
/** Callback to be called when visitor consent is collected. */
|
|
1970
|
-
onVisitorConsentCollected?: (consent: VisitorConsentCollected) => void;
|
|
1971
|
-
/** Callback to be call when customer privacy api is ready. */
|
|
1972
|
-
onReady?: () => void;
|
|
1973
|
-
/**
|
|
1974
|
-
* Whether consent libraries can use same-domain requests to the Storefront API.
|
|
1975
|
-
* Defaults to true if the standard route proxy is enabled in Hydrogen server.
|
|
1976
|
-
*/
|
|
1977
|
-
sameDomainForStorefrontApi?: boolean;
|
|
1978
|
-
};
|
|
1979
|
-
declare function useCustomerPrivacy(props: CustomerPrivacyApiProps): {
|
|
1980
|
-
customerPrivacy: CustomerPrivacy$1 | null;
|
|
1981
|
-
privacyBanner?: PrivacyBanner$1 | null;
|
|
1982
|
-
};
|
|
1983
|
-
|
|
1984
2000
|
type ShopAnalytics = {
|
|
1985
2001
|
/** The shop ID. */
|
|
1986
2002
|
shopId: string;
|
|
@@ -2032,9 +2048,9 @@ type AnalyticsContextValue = {
|
|
|
2032
2048
|
/** A function to subscribe to analytics events. */
|
|
2033
2049
|
subscribe: typeof subscribe;
|
|
2034
2050
|
/** The privacy banner SDK methods with the config applied */
|
|
2035
|
-
privacyBanner: PrivacyBanner
|
|
2051
|
+
privacyBanner: PrivacyBanner | null;
|
|
2036
2052
|
/** The customer privacy SDK methods with the config applied */
|
|
2037
|
-
customerPrivacy: CustomerPrivacy
|
|
2053
|
+
customerPrivacy: CustomerPrivacy | null;
|
|
2038
2054
|
};
|
|
2039
2055
|
declare function subscribe(event: typeof AnalyticsEvent.PAGE_VIEWED, callback: (payload: PageViewPayload) => void): void;
|
|
2040
2056
|
declare function subscribe(event: typeof AnalyticsEvent.PRODUCT_VIEWED, callback: (payload: ProductViewPayload) => void): void;
|
|
@@ -2536,6 +2552,8 @@ type HydrogenContextOptions<TSession extends HydrogenSession = HydrogenSession,
|
|
|
2536
2552
|
customAuthStatusHandler?: CustomerAccountOptions['customAuthStatusHandler'];
|
|
2537
2553
|
/** Deprecated. `unstableB2b` is now stable. Please remove. */
|
|
2538
2554
|
unstableB2b?: CustomerAccountOptions['unstableB2b'];
|
|
2555
|
+
/** Set to true when using a custom HTTPS domain (e.g., ngrok, local proxy) instead of the default Hydrogen tunnel. */
|
|
2556
|
+
useCustomAuthDomain?: CustomerAccountOptions['useCustomAuthDomain'];
|
|
2539
2557
|
};
|
|
2540
2558
|
/** Cart handler overwrite options. See documentation for createCartHandler for more information. */
|
|
2541
2559
|
cart?: {
|
|
@@ -2599,18 +2617,11 @@ type CreateRequestHandlerOptions<Context = unknown> = {
|
|
|
2599
2617
|
* @default true
|
|
2600
2618
|
*/
|
|
2601
2619
|
collectTrackingInformation?: boolean;
|
|
2602
|
-
/**
|
|
2603
|
-
* Whether to proxy standard routes such as `/api/.../graphql.json` (Storefront API).
|
|
2604
|
-
* You can disable this if you are handling these routes yourself. Ensure that
|
|
2605
|
-
* the proxy works if you rely on Hydrogen's built-in behaviors such as analytics.
|
|
2606
|
-
* @default true
|
|
2607
|
-
*/
|
|
2608
|
-
proxyStandardRoutes?: boolean;
|
|
2609
2620
|
};
|
|
2610
2621
|
/**
|
|
2611
2622
|
* Creates a request handler for Hydrogen apps using React Router.
|
|
2612
2623
|
*/
|
|
2613
|
-
declare function createRequestHandler<Context = unknown>({ build, mode, poweredByHeader, getLoadContext, collectTrackingInformation,
|
|
2624
|
+
declare function createRequestHandler<Context = unknown>({ build, mode, poweredByHeader, getLoadContext, collectTrackingInformation, }: CreateRequestHandlerOptions<Context>): (request: Request) => Promise<Response>;
|
|
2614
2625
|
|
|
2615
2626
|
declare const NonceProvider: react.Provider<string | undefined>;
|
|
2616
2627
|
declare const useNonce: () => string | undefined;
|
|
@@ -2673,7 +2684,7 @@ interface ScriptAttributes extends ScriptHTMLAttributes<HTMLScriptElement> {
|
|
|
2673
2684
|
}
|
|
2674
2685
|
declare const Script: react.ForwardRefExoticComponent<HydrogenScriptProps & ScriptAttributes & react.RefAttributes<HTMLScriptElement>>;
|
|
2675
2686
|
|
|
2676
|
-
declare function createCustomerAccountClient({ session, customerAccountId, shopId, customerApiVersion, request, waitUntil, authUrl, customAuthStatusHandler, logErrors, loginPath, authorizePath, defaultRedirectPath, language, }: CustomerAccountOptions): CustomerAccount;
|
|
2687
|
+
declare function createCustomerAccountClient({ session, customerAccountId, shopId, customerApiVersion, request, waitUntil, authUrl, customAuthStatusHandler, logErrors, loginPath, authorizePath, defaultRedirectPath, language, useCustomAuthDomain, }: CustomerAccountOptions): CustomerAccount;
|
|
2677
2688
|
|
|
2678
2689
|
declare function hydrogenRoutes(currentRoutes: Array<RouteConfigEntry>): Promise<Array<RouteConfigEntry>>;
|
|
2679
2690
|
|
|
@@ -2811,9 +2822,9 @@ type VariantOptionValue = {
|
|
|
2811
2822
|
type VariantSelectorProps = {
|
|
2812
2823
|
/** The product handle for all of the variants */
|
|
2813
2824
|
handle: string;
|
|
2814
|
-
/** Product options from the [Storefront API](/docs/api/storefront/2026-
|
|
2825
|
+
/** Product options from the [Storefront API](/docs/api/storefront/2026-04/objects/ProductOption). Make sure both `name` and `values` are a part of your query. */
|
|
2815
2826
|
options: Array<PartialProductOption> | undefined;
|
|
2816
|
-
/** Product variants from the [Storefront API](/docs/api/storefront/2026-
|
|
2827
|
+
/** Product variants from the [Storefront API](/docs/api/storefront/2026-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`. */
|
|
2817
2828
|
variants?: PartialDeep<ProductVariantConnection> | Array<PartialDeep<ProductVariant>>;
|
|
2818
2829
|
/** By default all products are under /products. Use this prop to provide a custom path. */
|
|
2819
2830
|
productPath?: string;
|
|
@@ -3267,4 +3278,4 @@ interface GetSiteMapOptions {
|
|
|
3267
3278
|
*/
|
|
3268
3279
|
declare function getSitemap(options: GetSiteMapOptions): Promise<Response>;
|
|
3269
3280
|
|
|
3270
|
-
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$1 as CustomEventMap, type CustomerAccount, type CustomerAccountMutations, type CustomerAccountQueries, type CustomerPrivacy
|
|
3281
|
+
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$1 as 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 };
|