ikea-availability-checker
Version:
ikea product in-store availability checker and product search
25 lines (24 loc) • 986 B
TypeScript
import { AxiosRequestConfig } from "axios";
import { ItemStockInfo } from "./lib/ingka";
import { Store } from "./lib/stores";
export * as errors from './lib/ingkaErrors';
export * as stores from './lib/stores';
/**
* Asynchronously requests the availability of a specific product in one
* specific store and returns an object with the information.
*
* @example
* // request the stock info for "Billy (white)" from Braunschweig germany
* const stockInfo = await checker.availability('117', '00263850')
*/
export declare function availability(
/** buCode ikea store identification number */
buCode: string,
/** ikea product identification number */
productId: string,
/** axios requrest options */
options?: AxiosRequestConfig): Promise<ItemStockInfo | undefined>;
/**
* Query one or multiple stores for one or multiple product ids.
*/
export declare function availabilities(stores: Store[], productIds: string[], options?: AxiosRequestConfig): Promise<Array<ItemStockInfo>>;