UNPKG

react-native-knotapi

Version:

Provide a seamless way for end users to link their merchant accounts to your mobile app.

54 lines 1.69 kB
declare const Knotapi: any; type Config = { sessionId: string; clientId: string; merchantIds?: number[]; domainUrls?: string[]; environment: 'production' | 'sandbox' | 'development'; product?: 'card_switcher' | 'transactions_link' | 'link'; useCategories?: boolean; useSearch?: boolean; entryPoint?: string; customerConfig?: CustomerConfiguration; }; type CustomerConfiguration = { cardName?: string; customerName?: string; logoId?: string; }; export type KnotError = { errorCode: string; errorDescription: string; product?: 'card_switcher' | 'transaction_link' | 'link'; }; export type KnotEvent = { event: string; merchantName: string; merchantId?: string; metaData?: Record<string, unknown>; product?: 'card_switcher' | 'transaction_link' | 'link'; taskId?: string; environment: 'production' | 'sandbox' | 'development'; }; export type KnotSuccess = { merchant: string; product?: 'card_switcher' | 'transaction_link' | 'link'; }; export type KnotExit = { product?: 'card_switcher' | 'transaction_link' | 'link'; }; export declare const Knot: { open: (params: Config) => void; openWithoutDelay: (params: Config) => void; close: () => void; getSdkVersion: () => string | undefined; }; type KnotCallbacks = { 'knot:onSuccess': KnotSuccess; 'knot:onError': KnotError; 'knot:onEvent': KnotEvent; 'knot:onExit': KnotExit; }; export declare const addKnotListener: <T extends keyof KnotCallbacks>(eventName: T, callback: (event: KnotCallbacks[T]) => void) => import("react-native").EmitterSubscription; export default Knotapi; //# sourceMappingURL=index.d.ts.map