import type { Product, ProductVariant } from "../types"; import { StorefrontApiClient, StorefrontApiResponse } from "./storefront-api-client"; import type { CountryCode, HasMetafieldsIdentifier, LanguageCode } from "./types/storefront.types"; export type ResolvedProductEntry = { product: Product | null; variant: ProductVariant | null; }; export type LoadProductsByIdsResponse = StorefrontApiResponse; export interface LoadProductsByIdsArgs { /** Node GIDs to resolve (product or variant). See `refToNodeId`. */ ids: string[]; productMetafields?: HasMetafieldsIdentifier[]; variantMetafields?: HasMetafieldsIdentifier[]; /** Fetch `quantityAvailable` / `totalInventory` (SWI-3267). Off unless a * badge rule reads stock. */ includeInventory?: boolean; country: CountryCode; language: LanguageCode; } /** * Resolves a wishlist item reference to the node GID to load: the variant GID * when a `variantId` is present (yielding the exact saved variant and its * parent product), otherwise the product GID. */ export declare const refToNodeId: (ref: { productId: number | string; variantId?: number | string | null; }) => string; /** * Batch-loads render-ready product data for a list of node GIDs in a single * Storefront request via `nodes(ids:)`. The result array is aligned 1:1 with * the input `ids`, with `null` product and variant for any GID the Storefront * API couldn't resolve. * * Note: this returns each product in isolation and does not resolve * combined-listing parents. Use `loadResolvedProduct` when combined-listing * awareness is required. */ export declare const loadProductsByIds: (client: StorefrontApiClient, { ids, productMetafields, variantMetafields, includeInventory, country, language, }: LoadProductsByIdsArgs) => Promise<{ data: ResolvedProductEntry[]; errors: import("@shopify/graphql-client").ResponseErrors | null; }>;