UNPKG

@expresta/sdk-ts

Version:

A lightweight JS SDK for embedding Expresta's order button into websites using Typescript.

53 lines (52 loc) 1.09 kB
export declare type Product = { id: string; qty: number; }; declare type Config = { lang?: keyof typeof configMap; class?: "dark" | "light"; wrap: string | HTMLElement; account: string; public_key: string; utm_source?: string; utm_medium?: string; utm_campaign?: string; utm_content?: string; products: Product[]; product_id?: string; document_url?: string; page_range?: string; preview_image_url?: string; product_name?: string; }; export declare const configMap: { sk: { domain: string; buttonText: string; }; cz: { domain: string; buttonText: string; }; at: { domain: string; buttonText: string; }; de: { domain: string; buttonText: string; }; en: { domain: string; buttonText: string; }; hu: { domain: string; buttonText: string; }; }; export declare const OrderButton: { init(config: Config): void; renderButton(wrap: HTMLElement, config: Config): void; }; export {};