UNPKG

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.

45 lines (44 loc) 1.76 kB
import * as Options from '../options'; import { BaseService } from '../infrastructure'; import { CustomCollection } from '../interfaces'; export declare class CustomCollections extends BaseService { constructor(shopDomain: string, accessToken: string); /** * Get a count of all custom collections that contain a given product * @param options Options for filtering the results. * @see https://help.shopify.com/api/reference/customcollection#count */ count(options?: { title?: string; product_id?: number; } & Options.DateOptions & Options.PublishedOptions): Promise<number>; /** * Get a list of all custom collections that contain a given product * @param options Options for filtering the results. */ list(options?: Options.CollectionListOptions): Promise<CustomCollection[]>; /** * Get a single custom collection * @param id The collection's id. * @param options Options for filtering the results. */ get(id: number, options?: Options.FieldOptions): Promise<CustomCollection>; /** * Creates a custom collection. * @param collection The collection being created. * @param options Options for creating the collection. */ create(collection: Partial<CustomCollection>): Promise<CustomCollection>; /** * Updates a custom collection with the given id. * @param id The collection's id. * @param collection The updated collection. */ update(id: number, collection: Partial<CustomCollection>): Promise<CustomCollection>; /** * Deletes a custom collection with the given id. * @param id The collection's id. */ delete(id: number): Promise<void>; } export default CustomCollections;