connect-react-native
Advanced tools
Comparing version 2.3.9 to 2.4.0
@@ -7,2 +7,3 @@ "use strict"; | ||
var _exportNames = { | ||
DapiConfigurations: true, | ||
DapiConnection: true, | ||
@@ -12,3 +13,3 @@ DapiPair: true, | ||
}; | ||
exports.default = exports.DapiAccount = exports.DapiPair = exports.DapiConnection = void 0; | ||
exports.default = exports.DapiAccount = exports.DapiPair = exports.DapiConnection = exports.DapiConfigurations = void 0; | ||
@@ -35,2 +36,16 @@ var _nativeInterface = _interopRequireDefault(require("./internal/nativeInterface")); | ||
class DapiConfigurations { | ||
constructor(countries, environment = _types.DapiEnvironment.production) { | ||
_defineProperty(this, "environment", void 0); | ||
_defineProperty(this, "countries", void 0); | ||
this.environment = environment; | ||
this.countries = countries; | ||
} | ||
} | ||
exports.DapiConfigurations = DapiConfigurations; | ||
class DapiConnection { | ||
@@ -37,0 +52,0 @@ get clientUserID() { |
@@ -21,3 +21,9 @@ "use strict"; | ||
if (!DapiConnectManager) { | ||
throw new Error("DapiConnect-ReactNative: NativeModule.DapiConnectManager is null. To fix this issue try these steps:\n\u2022 Run `react-native link DapiConnect-ReactNative` in the project root.\n\u2022 Rebuild and re-run the app.\n\u2022 If you are using CocoaPods on iOS, run `pod install` in the `ios` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n\u2022 Check that the library was linked correctly when you used the link command by running through the manual installation instructions in the README.\n* If you are getting this error while unit testing you need to mock the native module. Follow the guide in the README.\nIf none of these fix the issue, please open an issue on the Github repository: https://github.com/dapi-co/DapiConnect-ReactNative"); | ||
throw new Error(`DapiConnect-ReactNative: NativeModule.DapiConnectManager is null. To fix this issue try these steps: | ||
• Run \`react-native link DapiConnect-ReactNative\` in the project root. | ||
• Rebuild and re-run the app. | ||
• If you are using CocoaPods on iOS, run \`pod install\` in the \`ios\` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods. | ||
• Check that the library was linked correctly when you used the link command by running through the manual installation instructions in the README. | ||
* If you are getting this error while unit testing you need to mock the native module. Follow the guide in the README. | ||
If none of these fix the issue, please open an issue on the Github repository: https://github.com/dapi-co/DapiConnect-ReactNative`); | ||
} | ||
@@ -24,0 +30,0 @@ /** |
@@ -6,3 +6,11 @@ "use strict"; | ||
}); | ||
exports.BeneficiaryType = exports.DapiEndpoint = void 0; | ||
exports.BeneficiaryType = exports.DapiEndpoint = exports.DapiEnvironment = void 0; | ||
let DapiEnvironment; | ||
exports.DapiEnvironment = DapiEnvironment; | ||
(function (DapiEnvironment) { | ||
DapiEnvironment[DapiEnvironment["sandbox"] = 0] = "sandbox"; | ||
DapiEnvironment[DapiEnvironment["production"] = 1] = "production"; | ||
})(DapiEnvironment || (exports.DapiEnvironment = DapiEnvironment = {})); | ||
let DapiEndpoint; | ||
@@ -9,0 +17,0 @@ exports.DapiEndpoint = DapiEndpoint; |
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
import NativeInterface from './internal/nativeInterface'; | ||
import { DapiEnvironment } from './internal/types'; | ||
export class DapiConfigurations { | ||
constructor(countries, environment = DapiEnvironment.production) { | ||
_defineProperty(this, "environment", void 0); | ||
_defineProperty(this, "countries", void 0); | ||
this.environment = environment; | ||
this.countries = countries; | ||
} | ||
} | ||
export class DapiConnection { | ||
@@ -5,0 +17,0 @@ get clientUserID() { |
@@ -13,3 +13,9 @@ /** | ||
if (!DapiConnectManager) { | ||
throw new Error("DapiConnect-ReactNative: NativeModule.DapiConnectManager is null. To fix this issue try these steps:\n\u2022 Run `react-native link DapiConnect-ReactNative` in the project root.\n\u2022 Rebuild and re-run the app.\n\u2022 If you are using CocoaPods on iOS, run `pod install` in the `ios` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n\u2022 Check that the library was linked correctly when you used the link command by running through the manual installation instructions in the README.\n* If you are getting this error while unit testing you need to mock the native module. Follow the guide in the README.\nIf none of these fix the issue, please open an issue on the Github repository: https://github.com/dapi-co/DapiConnect-ReactNative"); | ||
throw new Error(`DapiConnect-ReactNative: NativeModule.DapiConnectManager is null. To fix this issue try these steps: | ||
• Run \`react-native link DapiConnect-ReactNative\` in the project root. | ||
• Rebuild and re-run the app. | ||
• If you are using CocoaPods on iOS, run \`pod install\` in the \`ios\` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods. | ||
• Check that the library was linked correctly when you used the link command by running through the manual installation instructions in the README. | ||
* If you are getting this error while unit testing you need to mock the native module. Follow the guide in the README. | ||
If none of these fix the issue, please open an issue on the Github repository: https://github.com/dapi-co/DapiConnect-ReactNative`); | ||
} | ||
@@ -16,0 +22,0 @@ /** |
@@ -0,1 +1,8 @@ | ||
export let DapiEnvironment; | ||
(function (DapiEnvironment) { | ||
DapiEnvironment[DapiEnvironment["sandbox"] = 0] = "sandbox"; | ||
DapiEnvironment[DapiEnvironment["production"] = 1] = "production"; | ||
})(DapiEnvironment || (DapiEnvironment = {})); | ||
export let DapiEndpoint; | ||
@@ -2,0 +9,0 @@ |
@@ -1,2 +0,7 @@ | ||
import { IDapiConfigurations, IAccount, IBeneficiary, IDapiConnection, IPair, IAccountResponse, IIdentityResponse, ITransactionResponse, IAccountsMetadataResponse } from './internal/types'; | ||
import { IDapiConfigurations, IAccount, IBeneficiary, IDapiConnection, IPair, IAccountResponse, IIdentityResponse, ITransactionResponse, IAccountsMetadataResponse, DapiEnvironment } from './internal/types'; | ||
export declare class DapiConfigurations implements IDapiConfigurations { | ||
environment?: DapiEnvironment; | ||
countries?: string[]; | ||
constructor(countries: string[], environment?: DapiEnvironment); | ||
} | ||
export declare class DapiConnection implements IDapiConnection { | ||
@@ -3,0 +8,0 @@ private _clientUserID; |
@@ -6,3 +6,12 @@ export interface IDapiConfigurations { | ||
endPointExtraBody?: Map<DapiEndpoint, Map<string, any>>; | ||
environment?: DapiEnvironment; | ||
/** | ||
* Country codes of supported countries. (ISO 3166-2 format) | ||
*/ | ||
countries?: string[]; | ||
} | ||
export declare enum DapiEnvironment { | ||
sandbox = 0, | ||
production = 1 | ||
} | ||
export declare enum DapiEndpoint { | ||
@@ -16,3 +25,3 @@ getIdentity = 0, | ||
} | ||
interface IDapiQueryParameter { | ||
export interface IDapiQueryParameter { | ||
name: string; | ||
@@ -19,0 +28,0 @@ value: string; |
{ | ||
"name": "connect-react-native", | ||
"version": "2.3.9", | ||
"version": "2.4.0", | ||
"description": "Financial APIs to connect users' bank accounts", | ||
@@ -63,2 +63,3 @@ "react-native": "src/index.ts", | ||
"react-native": "0.60.0-rc.2", | ||
"react-native-builder-bob": "^0.18.1", | ||
"react-test-renderer": "16.8.6", | ||
@@ -65,0 +66,0 @@ "rimraf": "^2.6.3", |
@@ -12,4 +12,15 @@ import NativeInterface from './internal/nativeInterface'; | ||
IAccountsMetadataResponse, | ||
DapiEnvironment, | ||
} from './internal/types'; | ||
export class DapiConfigurations implements IDapiConfigurations { | ||
environment?: DapiEnvironment | ||
countries?: string[]; | ||
constructor(countries: string[], environment: DapiEnvironment = DapiEnvironment.production) { | ||
this.environment = environment; | ||
this.countries = countries; | ||
} | ||
} | ||
export class DapiConnection implements IDapiConnection { | ||
@@ -16,0 +27,0 @@ private _clientUserID: string; |
@@ -6,4 +6,14 @@ export interface IDapiConfigurations { | ||
endPointExtraBody?: Map<DapiEndpoint, Map<string, any>>; | ||
environment?: DapiEnvironment; | ||
/** | ||
* Country codes of supported countries. (ISO 3166-2 format) | ||
*/ | ||
countries?: string[]; | ||
} | ||
export enum DapiEnvironment { | ||
sandbox, | ||
production, | ||
} | ||
export enum DapiEndpoint { | ||
@@ -18,3 +28,3 @@ getIdentity, | ||
interface IDapiQueryParameter { | ||
export interface IDapiQueryParameter { | ||
name: string; | ||
@@ -21,0 +31,0 @@ value: string; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1808
195761
28
46