import { Dictionary } from 'lodash'; /** * Simple image type with an URL and thumbnail URL. */ export declare type Image = { url: string; thumb?: string; }; /** * Base resource type with identifiable ID and Name. */ export declare type Identifiable = { id: string; name: string; }; /** * Customer Group */ export declare type CustomerGroup = Identifiable & {}; /** * Commerce Object with a slug */ export declare type CommerceObject = Identifiable & { slug: string; }; /** * Product with descriptions, images, categories and variants. */ export declare type Product = CommerceObject & { shortDescription?: string; longDescription?: string; imageSetId?: string; categories: Category[]; variants: Variant[]; }; /** * Variant identified by SKU, with price, images and attributes. */ export declare type Variant = { id: string; sku: string; listPrice: string; salePrice: string; defaultImage?: Image; images: Image[]; attributes: Dictionary; }; /** * Category with images, products, children and a parent. */ export declare type Category = CommerceObject & { parent?: Category; image?: Image; children: Category[]; products: Product[]; showInMenu: boolean; }; /** * Promotion with description, code, an image and activity status. */ export declare type Promotion = Identifiable & { description: string; promoCode?: string; isActive: boolean; image?: Image; }; /** * Get Attribute method arguments. */ export declare type GetAttributeArgs = { name: string; }; /** * Common method arguments. */ export declare type CommonArgs = { locale?: string; language?: string; country?: string; currency?: string; segment?: string; }; /** * Common method arguments for fetching a commerce object. */ export declare type GetCommerceObjectArgs = CommonArgs & { id?: string; slug?: string; }; /** * Method arguments for fetching products. */ export declare type GetProductsArgs = CommonArgs & PaginationArgs & { keyword?: string; productIds?: string; category?: Category; }; /** * Method arguments for pagination. These are also returned with paginated results, and should be used when requesting future pages. * * If the pageNum is undefined, it will be 0. * If the cursor is undefined, the desired page number will still be fetched but this cursor will be used to fetch it faster. * If the cursorPage is undefined, cursor cannot be used and will be treated as undefined. * If pageSize is undefined, it will select a default value. * If pageCount is undefined, all items will be fetched. * * The following fields are only returned by the request: * Total may be undefined. It is always defined if the requested page is the last. */ export declare type PaginationArgs = { pageNum?: number; cursor?: string; cursorPage?: number; pageSize?: number; pageCount?: number; total?: number; };