import { e as ApiConfig, aL as SearchCategoriesParams, aM as SearchCategoriesResponse, aJ as SearchCategoriesByPathParams, aK as SearchCategoriesByPathResponse, aS as SearchProductsParams, aT as SearchProductsResponse, z as GetProductParams, E as GetProductResponse, s as DownloadProductFileParams, t as DownloadProductFileResponse, aQ as SearchProductVariationsParams, aR as SearchProductVariationsResponse, J as GetProductVariationParams, K as GetProductVariationResponse, aP as SearchProductTypesResponse, H as GetProductTypeParams, I as GetProductTypeResponse, aN as SearchProductBrandsParams, aO as SearchProductBrandsResponse, N as GetStoreProfileParams, O as GetStoreProfileResponse, L as GetReviewsParams, M as GetReviewsResponse } from '../shared/ecom-headless.Bm1MKC5K.mjs'; import 'buffer'; /** * Get the API configuration. * * @example * ```typescript * import { getApiConfig, ApiConfig } from '@lightspeed/ecom-headless'; * * const config: ApiConfig = getApiConfig(); * ``` */ declare const getApiConfig: () => Required; /** * Initialize the Storefront API client. * * @example * ```typescript * import { initStorefrontApi } from '@lightspeed/ecom-headless'; * * await initStorefrontApi({ * publicToken: 'YOUR_PUBLIC_TOKEN', * storeId: 'YOUR_STORE_ID' * }); * ``` * * @remarks * - This method must be called before using any other API methods. * - If storeId is not provided, it will be auto-detected. If detection fails, an error will be thrown. */ declare const initStorefrontApi: (config: ApiConfig) => Promise; /** * Search categories in the store based on provided parameters. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/categories/search-categories | Ecwid API Documentation} * * @example * ```typescript * import { searchCategories, SearchCategoriesResponse } from '@lightspeed/ecom-headless'; * * const categories: SearchCategoriesResponse = await searchCategories(); * ``` */ declare const searchCategories: (params?: SearchCategoriesParams) => Promise; /** * Search categories by path using a delimiter-separated path string. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/categories/search-categories-by-path | Ecwid API Documentation} * * @example * ```typescript * import { searchCategoriesByPath, SearchCategoriesByPathResponse } from '@lightspeed/ecom-headless'; * * const categories: SearchCategoriesByPathResponse = await searchCategoriesByPath({ * path: "Electronics/Phones/Smartphones", * delimiter: "/" * }); * ``` */ declare const searchCategoriesByPath: (params: SearchCategoriesByPathParams) => Promise; /** * Search for products in a store. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/search-products | Ecwid API Documentation} * * @example * ```typescript * import { searchProducts, SearchProductsResponse } from '@lightspeed/ecom-headless'; * * const products: SearchProductsResponse = await searchProducts({ keyword: 'laptop' }); * ``` */ declare const searchProducts: (params?: SearchProductsParams) => Promise; /** * Get a product from a store. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/get-product | Ecwid API Documentation} * * @example * ```typescript * import { getProduct, GetProductResponse } from '@lightspeed/ecom-headless'; * * const product: GetProductResponse = await getProduct({ productId: 123 }); * ``` */ declare const getProduct: (params: GetProductParams) => Promise; /** * Download a product file from a store. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/product-files/download-product-file | Ecwid API Documentation} * * @example * ```typescript * import { downloadProductFile, DownloadProductFileResponse } from '@lightspeed/ecom-headless'; * * const file: DownloadProductFileResponse = await downloadProductFile({ productId: 123, fileId: 456 }); * ``` */ declare const downloadProductFile: (params: DownloadProductFileParams) => Promise; /** * Search for product variations in a store. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/product-variations/search-product-variations | Ecwid API Documentation} * * @example * ```typescript * import { searchProductVariations, SearchProductVariationsResponse } from '@lightspeed/ecom-headless'; * * const variations: SearchProductVariationsResponse = await searchProductVariations({ productId: 123 }); * ``` */ declare const searchProductVariations: (params: SearchProductVariationsParams) => Promise; /** * Get a product variation from a store. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/product-variations/get-product-variation | Ecwid API Documentation} * * @example * ```typescript * import { getProductVariation, GetProductVariationResponse } from '@lightspeed/ecom-headless'; * * const variation: GetProductVariationResponse = await getProductVariation({ * productId: 123, * combinationId: 456 * }); * ``` */ declare const getProductVariation: (params: GetProductVariationParams) => Promise; /** * Search for product types in a store. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/product-types-and-attributes/search-product-types | Ecwid API Documentation} * * @example * ```typescript * import { searchProductTypes, SearchProductTypesResponse } from '@lightspeed/ecom-headless'; * * const productTypes: SearchProductTypesResponse = await searchProductTypes(); * ``` */ declare const searchProductTypes: () => Promise; /** * Get a product type from a store. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/product-types-and-attributes/get-product-type | Ecwid API Documentation} * * @example * ```typescript * import { getProductType, GetProductTypeResponse } from '@lightspeed/ecom-headless'; * * const productType: GetProductTypeResponse = await getProductType({ classId: 0 }); * ``` */ declare const getProductType: (params: GetProductTypeParams) => Promise; /** * Search for product brands in a store. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/products/search-product-brands | Ecwid API Documentation} * * @example * ```typescript * import { searchProductBrands, SearchProductBrandsResponse } from '@lightspeed/ecom-headless'; * * const brands: SearchProductBrandsResponse = await searchProductBrands({ limit: 10 }); * ``` */ declare const searchProductBrands: (params?: SearchProductBrandsParams) => Promise; /** * Get basic information about an Ecwid store: settings, store location, email, etc. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/store-profile/get-store-profile | Ecwid API Documentation} * * @example * ```typescript * import { getStoreProfile, GetStoreProfileResponse } from '@lightspeed/ecom-headless'; * * const profile: GetStoreProfileResponse = await getStoreProfile(); * ``` */ declare const getStoreProfile: (params?: GetStoreProfileParams) => Promise; /** * Get product reviews from a store. * Returns published reviews when accessed with a public token. * * @see {@link https://docs.ecwid.com/api-reference/rest-api/reviews/get-reviews | Ecwid API Documentation} * * @param params - Query parameters with optional offset and limit for pagination * @returns Promise resolving to GetReviewsResponse containing paginated reviews * @throws Error if API client is not initialized or request fails * * @example * ```typescript * import { getReviews } from '@lightspeed/ecom-headless'; * * const response = await getReviews({ limit: 3 }); * response.items.forEach(review => { * console.log(`${review.rating}⭐ - ${review.review}`); * }); * ``` */ declare const getReviews: (params?: GetReviewsParams) => Promise; export { downloadProductFile, getApiConfig, getProduct, getProductType, getProductVariation, getReviews, getStoreProfile, initStorefrontApi, searchCategories, searchCategoriesByPath, searchProductBrands, searchProductTypes, searchProductVariations, searchProducts };