UNPKG

haravan-client

Version:
49 lines (48 loc) 1.28 kB
import { PartialDeep } from './type'; import { IVariant } from './variant'; export declare type HaravanProductOption = { name: string; position: number; product_id: number; }; export declare type HaravanProductImage = { id: number; product_id: number; src: string; variant_ids: [string]; }; export interface IHaravanProduct { body_html: string; body_plain: string; created_at: string; handle: string; id: number; images: HaravanProductImage[]; product_type: string; published_at: string; published_scope: string; tags: string; template_suffix: string; title: string; updated_at: string; variants: IVariant[]; vendor: string; options: HaravanProductOption[]; only_hide_from_list: boolean; not_allow_promotion: boolean; } export declare function getHaravanProducts(param: { accessToken: string; query?: string; delay?: number; }): Promise<IHaravanProduct[]>; export declare function getHaravanProduct(param: { accessToken: string; id: string; delay?: number; }): Promise<IHaravanProduct>; export declare function postHaravanProduct(param: { accessToken: string; product: PartialDeep<IHaravanProduct>; delay?: number; }): Promise<IHaravanProduct>;