UNPKG

react-native-tink-sdk

Version:
47 lines 2.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.displayInsights = exports.updateConsent = exports.connectAccount = void 0; const react_native_1 = require("react-native"); const LINKING_ERROR = `The package 'react-native-tink-sdk' doesn't seem to be linked. Make sure: \n\n` + react_native_1.Platform.select({ ios: '- You have run pod install\n', default: '' }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n'; const ReactNativeTink = react_native_1.NativeModules.ReactNativeTink ? react_native_1.NativeModules.ReactNativeTink : new Proxy({}, { get() { throw new Error(LINKING_ERROR); }, }); /** * This is the method for connecting bank accounts for continuous access to Business Transactions using Tink Link SDK. * * @param clientId - client ID retrieved from Tink Console. * @param redirectUri - configured in Tink Console - the page to which the end-user is redirected, along with the response parameters, when completing the flow. * @param authorizationCode - the authorization code generated using API's. * @param market - The market code for which providers should be listed. * @param locale - Locale to be used for end-user facing text. * */ function connectAccount(clientId, redirectUri, authorizationCode, market, locale) { return ReactNativeTink.connectAccount(clientId, redirectUri, authorizationCode, market, locale); } exports.connectAccount = connectAccount; /** * This is the method for updating consent using Tink Link SDK. * * @param clientId - client ID retrieved from Tink Console. * @param redirectUri - configured in Tink Console - the page to which the end-user is redirected, along with the response parameters, when completing the flow. * @param authorizationCode - the authorization code generated using API's. * @param credentialsId - The credentials id is obtained either from provider-consents API call or actionable insights(updateCredentials/renewConsent) * */ function updateConsent({ clientId, redirectUri, authorizationCode, credentialID, }) { return ReactNativeTink.updateConsent(clientId, redirectUri, authorizationCode, credentialID); } exports.updateConsent = updateConsent; function displayInsights({ clientId, accessToken, userId, idHint, }) { return ReactNativeTink.displayInsights(clientId, accessToken, userId, idHint); } exports.displayInsights = displayInsights; //# sourceMappingURL=index.js.map