@microsoft/fraud-protection
Version:
Microsoft Fraud Protection React Library
32 lines (28 loc) • 933 B
JavaScript
// main index.js
import { NativeModules } from 'react-native';
const moduleFraudProtection = NativeModules.RNFraudProtection;
export default RNFraudProtection = {
start : function(instanceId, baseUrl) {
moduleFraudProtection.start(instanceId, baseUrl);
},
stop : function() {
moduleFraudProtection.stop();
},
send : function(pageId, callback) {
if (typeof pageId === 'string') {
if (callback) {
moduleFraudProtection.sendWithCallback(pageId, callback);
} else {
moduleFraudProtection.send(pageId);
}
} else {
moduleFraudProtection.send(null);
}
},
getSessionId : function(callback) {
moduleFraudProtection.getSessionId(callback);
},
getAttributes : function(callback) {
moduleFraudProtection.getAttributes(callback);
}
};