/** * @see: https://shopify.dev/custom-storefronts/cart */ export class ProductClient { constructor({ apiToken, apiVersion, domain }: { apiToken: any; apiVersion: any; domain: any; }); apiToken: any; apiVersion: any; domain: any; endpoint: string; options: { method: string; mode: string; headers: { 'X-Shopify-Storefront-Access-Token': any; 'Content-Type': string; }; }; client: GraphQLClient; /** * * @param * @returns */ storefront({ query, variables }: { query: any; variables: any; }): Promise>; /** * Fetch a /json/ hosted file * @param {jsonPath} path a valid /json/**.* path * @returns a json object */ json({ path }: jsonPath): Promise<{ error: any; data: any; } | { error: any; data: any; }>; /** * Get a product's live sellingPlans by handle * @param {string} handle - can pass any valid cart param here: e.g — buyerIdentity, attributes etc.. * @returns a new full cart instance */ getByHandle({ handle }?: string): Promise<{ error: any; product: any; } | { error: any; product: any; }>; /** * Fetch a list of all products with some basic meta (great for building collection filters) * @returns products-list.json */ getList(): Promise<{ error: any; productsList: any; } | { error: any; productsList: any; }>; /** * Fetch a index of all products (used by fuse search index) * @returns products-index.json */ getIndex(): Promise<{ error: any; productsIndex: any; } | { error: any; productsIndex: any; }>; /** * Fetch a set of uniq product properties * @returns products-uniq.json */ getUniq(): Promise<{ error: any; productsUniq: any; } | { error: any; productsUniq: any; }>; /** * Fetch a list of all product handles * @returns products.json */ getHandles(): Promise<{ error: any; productHandles: any; } | { error: any; productHandles: any; }>; /** * Get a product's live sellingPlans by handle * @param {twoDigitCountryCode} country - US, MX.. * @param {string} handle - can pass any valid cart param here: e.g — buyerIdentity, attributes etc.. * @returns a new full cart instance */ getSellingPlans({ country, handle }?: twoDigitCountryCode): Promise<{ error: any; product: any; } | { error: any; product: any; }>; /** * Get a variant selling plans in a given countries context * @param {twoDigitCountryCode} country - US, MX.. * @param {String} handle - the target product's handle * @param {String} selectedOptions - the target variant's selectedOptions * @returns a full variant with prices in a target country */ getVariantSellingPlans({ country, currency, handle, selectedOptions }?: twoDigitCountryCode): Promise<{ error: any; variant: any; } | { error: any; variant: any; }>; /** * Get a product's live inventory by handle * @param {twoDigitCountryCode} country - US, MX.. * @param {String} handle - can pass any valid cart param here: e.g — buyerIdentity, attributes etc.. * @param {Boolean} withQuantity - if true we return the quantities available too * @returns live inventory for a product */ getInventory({ country, handle, withQuantity }?: twoDigitCountryCode): Promise<{ error: any; product: any; } | { error: any; product: any; }>; /** * Get a product and variants price in a given countries context * @param {twoDigitCountryCode} country - US, MX.. * @param {String} handle - the target product's handle * @returns product and variants prices in that country */ getLocalizedProduct({ country, handle }?: twoDigitCountryCode): Promise<{ error: any; product: any; } | { error: any; product: any; }>; /** * Get a variant price in a given countries context * @param {twoDigitCountryCode} country - US, MX.. * @param {String} locale - country locale * @param {String} handle - the target product's handle * @param {String} selectedOptions - the target variant's selectedOptions * @returns a full variant with prices in a target country */ getLocalizedVariant({ country, handle, selectedOptions }?: twoDigitCountryCode): Promise<{ error: any; variant: any; } | { error: any; variant: any; }>; /** * Get a product's recommendations via shopify * @param {String} productId - product legacyResourceId * @param {Integer|String} limit - how many recommendations to get * @returns a new full cart instance */ getRecommendations({ productId, limit }?: string): Promise<{ error: any; recommendations: any; } | { error: any; recommendations: any[]; }>; /** * Get a product's metafield by handle * @param {twoDigitCountryCode} country - US, MX.. * @param {String} handle - the product handle * @param {String} key - the metafield key * @param {String} namespace - the metafield namespace * @returns a metafield key and value */ getMetafield({ country, handle, key, namespace }?: twoDigitCountryCode): Promise<{ error: any; metafield: any; } | { error: any; metafield: any; }>; /** * Get a product variant metafield * @param {twoDigitCountryCode} country - US, MX.. * @param {String} handle - the product handle * @param {[Object]} selectedOptions - the selectedOptions of the target variant * @param {String} key - the metafield key * @param {String} namespace - the metafield namespace * @returns a metafield key and value */ getVariantMetafield({ country, handle, key, namespace, selectedOptions }?: twoDigitCountryCode): Promise<{ error: any; metafield: any; } | { error: any; metafield: any; }>; /** * Search shopify admin api for products * @param {String} term - product term to search * @param {number} limit - optional limit 10 max * @returns a list of products */ searchProducts({ term, limit }: string): Promise<{ error: any; results: any; } | { error: any; results: any; }>; } import { GraphQLClient } from "graphql-request"; //# sourceMappingURL=client.d.ts.map