Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6dfc27c
Add module fhp
cristipaval Aug 11, 2025
a3df5c1
Add lefthook.yml
cristipaval Aug 12, 2025
bfe8385
Resolve Mobile-Expensify submodule to main's version during merge
cristipaval Aug 13, 2025
5879aa8
Run prettier
cristipaval Aug 13, 2025
8e7ab27
Remove sample app
cristipaval Aug 13, 2025
3704406
Remove empty file
cristipaval Aug 13, 2025
effdca6
make eslint and prettier ignore the Group-IB FP module
cristipaval Aug 13, 2025
984ce83
Make spellcheck ignore Group-IB FP module
cristipaval Aug 13, 2025
1d1bf16
Delete lefthook files
cristipaval Aug 13, 2025
0376222
Merge remote-tracking branch 'origin/main' into cristi_integrate-grou…
cristipaval Aug 13, 2025
f006a61
Cleanup group-ib-fp module
cristipaval Aug 13, 2025
668f0c2
Rename group-ib-fp module
cristipaval Aug 13, 2025
fc4982e
Install group-ib-fp module
cristipaval Aug 13, 2025
bd00a05
Fix cspell.json
cristipaval Aug 13, 2025
08a7518
Add group-ib-fp in settings.gradle for android standalone builds
cristipaval Aug 13, 2025
cd93d29
Add gibsdk word in cspell.json
cristipaval Aug 13, 2025
1f2fe39
Merge remote-tracking branch 'origin/main' into cristi_integrate-grou…
cristipaval Aug 14, 2025
aa765ae
Merge remote-tracking branch 'origin/main' into cristi_integrate-grou…
cristipaval Aug 14, 2025
2e9d219
Merge remote-tracking branch 'origin/main' into cristi_integrate-grou…
cristipaval Aug 14, 2025
3260202
Add Group IB Fraud Protection web snippet for web and desktop Apps
cristipaval Aug 15, 2025
360fc47
Add a wrapper for Group IB FP snippet
cristipaval Aug 15, 2025
4c026c2
Init Group IB when the App loads
cristipaval Aug 15, 2025
93246cc
Simplify Group IB FP initialization
cristipaval Aug 15, 2025
80f7af7
Improve fp instance management
cristipaval Aug 15, 2025
58b5aff
Merge remote-tracking branch 'origin/main' into cristi_integrate-grou…
cristipaval Aug 18, 2025
8a239cd
Merge branch 'cristi_integrate-group-ib-fp' into cristi_send-groupIBF…
cristipaval Aug 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ help/_scripts/**
modules/ExpensifyNitroUtils/nitrogen/**
Mobile-Expensify/**
vendor
modules/group-ib-fp/**
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ src/libs/SearchParser/autocompleteParser.js

# Disable prettier in the submodule
Mobile-Expensify
modules/group-ib-fp
5 changes: 5 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ project(':react-native-plaid-link-sdk').projectDir = new File(rootProject.projec
include ':app'
includeBuild('../node_modules/@react-native/gradle-plugin')

include ':gibsdk'
project(':gibsdk').projectDir = new File(rootProject.projectDir, '../node_modules/group-ib-fp/android/gibsdk')
include ':package'
project(':package').projectDir = new File(rootProject.projectDir, '../node_modules/group-ib-fp/android/package')

if(settings.extensions.patchedArtifacts.buildFromSource) {
includeBuild('../node_modules/react-native') {
dependencySubstitution {
Expand Down
3 changes: 3 additions & 0 deletions config/webpack/webpack.common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ const getCommonConfiguration = ({file = '.env', platform = 'web'}: Environment):
// These files are copied over as per instructions here
// https://github.com/wojtekmaj/react-pdf#copying-cmaps
{from: 'node_modules/pdfjs-dist/cmaps/', to: 'cmaps/'},

// Group‑IB web SDK injection file
{from: 'web/snippets/gib.js', to: 'gib.js'},
],
}),
new EnvironmentPlugin({JEST_WORKER_ID: ''}),
Expand Down
4 changes: 3 additions & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@
"genkey",
"GEOLOCATION",
"getprop",
"gibsdk",
"glcode",
"gödecke",
"googleusercontent",
Expand Down Expand Up @@ -781,7 +782,8 @@
"tests/unit/currencyList.json",
"tests/unit/ValidationUtilsTest.ts",
"src/CONST/index.ts",
"src/libs/SearchParser/*"
"src/libs/SearchParser/*",
"modules/group-ib-fp"
],
"ignoreRegExpList": ["@assets/.*"],
"useGitignore": true
Expand Down
70 changes: 70 additions & 0 deletions modules/group-ib-fp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# group-ib-fp

React Native module with Group-IB FP

## Installation

```sh
npm install group-ib-fp
```

# Android

Add to the project `android/settings.gradle` file:
```groovy
include ':gibsdk'
include ':package'

project(':gibsdk').projectDir = new File(rootProject.projectDir, '../node_modules/group-ib-fp/android/gibsdk')
project(':package').projectDir = new File(rootProject.projectDir, '../node_modules/group-ib-fp/android/package')
```

## Usage

```js
import { FP, Capability, Format, AndroidCapability } from 'group-ib-fp';

// ...

const fp = FP.getInstance();
fp.enableDebugLogs();
fp.changeBehaviorExtendedData(true);
fp.setCustomerId("gib-i-test", (error: any) => {
console.log(error);
});

fp.setTargetURL("https://fhp-de-back.group-ib.com/api/fl", (error: any) => {
console.log(error);
});

fp.enableCapability(Capability.Swizzle, (error: any, isRun: Boolean) => {
if (error) {
console.log(error);
}
console.log("Capability run status " + isRun);
});

fp.enableCapability(Capability.Behavior, (error: any, isRun: Boolean) => {
if (error) {
console.log(error);
}
console.log("Capability run status " + isRun);
});

fp.enableCapability(Capability.Motion, (error: any, isRun: Boolean) => {
if (error) {
console.log(error);
}
console.log("Capability run status " + isRun);
});

fp.run((error: any) => {
console.log(error);
});


fp.getCookies((cookies: any) => {
console.log(cookies); // Dictionary with cookies
});

```
140 changes: 140 additions & 0 deletions modules/group-ib-fp/android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
buildscript {
repositories {
google()
mavenCentral()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
}
}

def isNewArchitectureEnabled() {
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
}

apply plugin: 'com.android.library'

if (isNewArchitectureEnabled()) {
apply plugin: 'com.facebook.react'
}

def getExtOrDefault(name) {
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['ModuleFhpIos_' + name]
}

def getExtOrIntegerDefault(name) {
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['ModuleFhpIos_' + name]).toInteger()
}

android {
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')

defaultConfig {
minSdkVersion getExtOrIntegerDefault('minSdkVersion')
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
}
buildTypes {
release {
minifyEnabled false
}
}

lintOptions {
disable 'GradleCompatible'
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

}

repositories {
mavenCentral()
google()

def found = false
def defaultDir = null
def androidSourcesName = 'React Native sources'

if (rootProject.ext.has('reactNativeAndroidRoot')) {
defaultDir = rootProject.ext.get('reactNativeAndroidRoot')
} else {
defaultDir = new File(
projectDir,
'/../../../node_modules/react-native/android'
)
}

if (defaultDir.exists()) {
maven {
url defaultDir.toString()
name androidSourcesName
}

logger.info(":${project.name}:reactNativeAndroidRoot ${defaultDir.canonicalPath}")
found = true
} else {
def parentDir = rootProject.projectDir

1.upto(5, {
if (found) return true
parentDir = parentDir.parentFile

def androidSourcesDir = new File(
parentDir,
'node_modules/react-native'
)

def androidPrebuiltBinaryDir = new File(
parentDir,
'node_modules/react-native/android'
)

if (androidPrebuiltBinaryDir.exists()) {
maven {
url androidPrebuiltBinaryDir.toString()
name androidSourcesName
}

logger.info(":${project.name}:reactNativeAndroidRoot ${androidPrebuiltBinaryDir.canonicalPath}")
found = true
} else if (androidSourcesDir.exists()) {
maven {
url androidSourcesDir.toString()
name androidSourcesName
}

logger.info(":${project.name}:reactNativeAndroidRoot ${androidSourcesDir.canonicalPath}")
found = true
}
})
}

if (!found) {
throw new GradleException(
"${project.name}: unable to locate React Native android sources. " +
"Ensure you have you installed React Native as a dependency in your project and try again."
)
}
}

dependencies {
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+"
implementation(project(':gibsdk'))
implementation(project(':package'))
// From node_modules
}

if (isNewArchitectureEnabled()) {
react {
jsRootDir = file("../src/")
libraryName = "ModuleFhpIos"
codegenJavaPackageName = "com.group_ib.react"
}
}
1 change: 1 addition & 0 deletions modules/group-ib-fp/android/fhp.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// empty config
2 changes: 2 additions & 0 deletions modules/group-ib-fp/android/gibsdk/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
configurations.maybeCreate("default")
artifacts.add("default", file('gibsdk-androidx-2.0.1335201224.aar'))
Binary file not shown.
5 changes: 5 additions & 0 deletions modules/group-ib-fp/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ModuleFhpIos_kotlinVersion=1.7.0
ModuleFhpIos_minSdkVersion=21
ModuleFhpIos_targetSdkVersion=31
ModuleFhpIos_compileSdkVersion=31
ModuleFhpIos_ndkversion=21.4.7075529
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading