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.
49 lines (48 loc) • 1.72 kB
TypeScript
import * as Options from '../options';
import { BaseService } from '../infrastructure';
import { Product, ProductUpdateCreate } from '../interfaces';
export declare class Products extends BaseService {
constructor(shopDomain: string, accessToken: string);
/**
* Gets a count of all of the shop's Products.
* @param options Options for filtering the results.
* @see https://help.shopify.com/api/reference/product#count
*/
count(options?: Options.ProductCountOptions): Promise<number>;
/**
* Gets a list of up to 250 of the shop's Products.
* @param options Options for filtering the results.
*/
list(options?: Options.ProductListOptions): Promise<Product[]>;
/**
* Gets the Product with the given id.
* @param id The Product's id.
* @param options Options for filtering the results.
*/
get(id: number, options?: Options.ProductGetOptions): Promise<Product>;
/**
* Creates an Product.
* @param product The Product being created.
* @param options Options for creating the Product.
*/
create(product: ProductUpdateCreate): Promise<Product>;
/**
* Updates an Product with the given id.
* @param id The Product's id.
* @param product The updated Product.
*/
update(id: number, product: ProductUpdateCreate): Promise<Product>;
/**
* Deletes an Product with the given id.
* @param id The Product's id.
*/
delete(id: number): Promise<{
id: number;
}>;
/**
* Gets a list of all of the shop's Products.
* @param options Options for filtering the results.
*/
listAll(options?: Options.ProductListOptions): Promise<any[]>;
}
export default Products;