UNPKG

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.

36 lines (35 loc) 1.33 kB
import * as Options from '../options'; import { BaseService } from '../infrastructure'; import { Asset, AssetUpdateCreate } from '../interfaces'; /** * A service for manipulating a Shopify shop's theme asset. */ export declare class Assets extends BaseService { constructor(shopDomain: string, accessToken: string); /** * Retrieves a single asset for a theme * @param id Id of the theme. * @param key he path to the asset within a theme. * @param options Options for filtering the result. */ get(id: number, key: string, options?: Options.FieldOptions): Promise<Asset>; /** * Creates or updates an asset for a theme. * You can include the `src` or `source_key` property to create the asset from an existing file. * @param id Id of the assets being updated. * @param assets The updated asset. */ update(id: number, asset: AssetUpdateCreate): Promise<Asset>; /** * Retrieves a list of assets for a theme * @param id Id of the theme. * @param options Options for filtering the results. */ list(id: number, options?: Options.FieldOptions): Promise<Asset[]>; /** * Deletes the assets with the given id. * @param id Id of the asset being deleted. */ delete(id: number): Promise<undefined>; } export default Assets;