knotapi-js
Version:
Provide a seamless way for end users to link their merchant accounts to your web app.
38 lines (37 loc) • 1.21 kB
TypeScript
import "./index.css";
declare type CommonConfig = {
sessionId?: string;
primaryColor?: string;
textColor?: string;
companyName?: string;
environment: 'production' | 'sandbox' | 'development';
product: 'card_switcher' | 'transaction_link';
clientId: string;
onSuccess?: (product: string, merchant: string) => void;
onError?: (product: string, errorCode: string, message: string, payload: any) => void;
onEvent?: (product: string, event: string, merchant: string, merchantId: string, payload?: Record<string, unknown>, taskId?: string) => void;
onExit?: (product: string) => void;
merchantIds?: number[];
useCategories?: boolean;
entryPoint?: string;
logo?: string;
useSelection?: boolean;
useSearch?: boolean;
useSingleFlow?: boolean;
platform?: string;
mode?: 'headless' | 'ui';
slug?: string;
customerName?: string;
cardName?: string;
logoId?: number;
};
declare class KnotapiJS {
constructor();
private startKnotProduct;
open: (config: CommonConfig) => void;
private sendDataToIframe;
private getUrlForEvent;
private callIdentifyUser;
private callTrackEvent;
}
export default KnotapiJS;