ibembed
Version:
Instabook Embed JavaScript SDK
33 lines (32 loc) • 853 B
TypeScript
export interface EmbedParams {
[key: string]: any;
}
export interface EmbedOption {
id: string;
version?: string;
businessID: string;
fitContent?: boolean;
showLoader?: boolean;
locale?: string;
appearance?: string;
customCSS?: string | string[];
embedParams?: EmbedParams;
}
export declare enum EventType {
IFRAME_LOAD = "iframe:load",
EMBED_IFRAME_READY = "iframe:ready",
IFRAME_ERROR = "iframe:error",
IFRAME_RESIZE = "iframe:resize"
}
export interface IframeResizeType {
height: number;
}
export interface EventDataMap {
[EventType.EMBED_IFRAME_READY]?: any;
[EventType.IFRAME_ERROR]?: any;
[EventType.IFRAME_LOAD]?: any;
[EventType.IFRAME_RESIZE]?: IframeResizeType;
}
export type EventCallbacks = {
[K in keyof EventDataMap]?: ((data: EventDataMap[K]) => void)[];
};