import { Cart } from './cart'; import { Customer } from './customer'; import { CategoryTree } from './category-tree'; import { Db } from './db'; import { Auth } from './auth'; import { Address } from './address'; import { Order } from './order'; export interface EcomClientOptions { endpoint: string; imageBaseURL?: string; debug?: boolean; fetch?: any; } export declare class EcomClient { endpoint: string; _token: string | undefined; imageBaseURL: string; categoryTree: CategoryTree | undefined; customer: Customer | null; cart: Cart | null; auth: Auth | undefined; db: Db; fetch: any; dbPromise: any; debug: boolean; constructor(opts: EcomClientOptions); static version(): string; static initApp(opts: EcomClientOptions): Promise; /** * Get the Firebase config based on the current URL * * @param {string} hostname e.g. test.example.com * @return {object} firebase config object */ static getFirebaseConfig(hostname: string): Promise; /** * Returns system info including Database, Google and App configuration. * @returns {Object} */ getSystemInfo(): Promise; setDebugMode(mode: boolean): void; setJWT(token: string): void; setImageBaseURL(url: string): void; getImageBaseURL(): string; get(url: string): Promise; post(url: string, body: object | null, noAuth?: boolean): Promise; put(url: string, body: object | null): Promise; patch(url: string, body: object | null): Promise; delete(url: string): Promise; do(url: string, method: string, body: object | null, noAuth?: boolean): Promise; getCategoryTree(): CategoryTree; createCart(): Promise; getCart(): Promise; getCustomer(user: any): Promise; placeGuestOrder(contactName: string, email: string, cartId: string, billing: Address, shipping: Address): Promise; } export default EcomClient;