inventora-shopify-admin-api
Version:
Shopify Admin API is a NodeJS library built to help developers easily authenticate and make calls against the Shopify API. It was inspired by and borrows heavily from ShopifySharp.
44 lines (43 loc) • 1.86 kB
TypeScript
import * as Options from '../options';
import { BaseService } from '../infrastructure';
import { InventoryLevel } from '../interfaces';
/**
* A service for manipulating Shopify's InventoryLevels API.
*/
export declare class InventoryLevels extends BaseService {
constructor(shopDomain: string, accessToken: string);
/**
* Gets a list of up to 250 of the shop's inventory levels.
* @param options Options for filtering the result.
*/
list(options?: Options.InventoryLevelListOptions): Promise<InventoryLevel[]>;
/**
* Adjusts the inventory level of an inventory item at a single location.
* @param options Options for adjusting an inventory level.
*/
adjust(inventoryItemId: number, locationId: number, availableAdjustment: number): Promise<void>;
/**
* Deletes an inventory level of an inventory item at a location.
* @param inventoryItemId Id of the inventory item.
* @param locationId Id of the location being retrieved.
*/
delete(inventoryItemId: number, locationId: number): Promise<void>;
/**
* Connects an inventory item to a location by creating an inventory level at that location.
* @param inventoryItemId Id of the inventory item.
* @param locationId Id of the location being retrieved.
* @param options Options for connecting an inventory level.
*/
connect(inventoryItemId: number, locationId: number, options?: {
relocate_if_necessary?: boolean;
}): Promise<void>;
/**
* Sets the inventory level for an inventory item at a location.
* @param inventoryLevel Inventory level being set.
* @param options Options for adjusting an inventory level.
*/
set(inventoryLevel: InventoryLevel, options?: {
disconnect_if_necessary?: boolean;
}): Promise<void>;
}
export default InventoryLevels;