UNPKG

@expresta/sdk-ts

Version:

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

48 lines (47 loc) 934 B
type Product = { id: string; qty: number; }; 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[]; }; 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 {};