@qore-id/react-native-qoreid-sdk 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +1 -2
- package/android/build.gradle +6 -37
- package/android/gradle.properties +5 -5
- package/android/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/com/qoreidsdk/QoreidSdkModule.kt +24 -10
- package/android/src/main/java/com/qoreidsdk/QoreidSdkPackage.kt +9 -27
- package/ios/QoreidSdk.m +4 -13
- package/ios/QoreidSdk.swift +36 -38
- package/lib/commonjs/index.js +2 -2
- package/lib/commonjs/qoreIdSdk.js +23 -10
- package/lib/commonjs/qoreIdSdk.js.map +1 -1
- package/lib/module/index.js +5 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/{qoreIdSdk.mjs → qoreIdSdk.js} +25 -11
- package/lib/module/qoreIdSdk.js.map +1 -0
- package/lib/module/types.d.js +2 -0
- package/lib/module/{utils.mjs → utils.js} +3 -1
- package/lib/module/utils.js.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/qoreIdSdk.d.ts +6 -1
- package/lib/typescript/src/qoreIdSdk.d.ts.map +1 -1
- package/package.json +15 -19
- package/qore-id-react-native-qoreid-sdk.podspec +0 -1
- package/src/index.tsx +1 -0
- package/src/qoreIdSdk.tsx +32 -21
- package/src/types.d.ts +22 -3
- package/android/src/main/AndroidManifestNew.xml +0 -2
- package/android/src/newarch/QoreidSdkSpec.kt +0 -7
- package/android/src/oldarch/QoreidSdkSpec.kt +0 -11
- package/ios/QoreidSdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -4
- package/ios/QoreidSdk.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/QoreidSdk.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +0 -5
- package/ios/QoreidSdk.xcodeproj/project.xcworkspace/xcuserdata/e.ugwuoke.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/QoreidSdk.xcodeproj/project.xcworkspace/xcuserdata/e.ugwuoke.xcuserdatad/WorkspaceSettings.xcsettings +0 -14
- package/ios/QoreidSdk.xcodeproj/xcuserdata/e.ugwuoke.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
- package/lib/commonjs/NativeQoreidSdk.js +0 -9
- package/lib/commonjs/NativeQoreidSdk.js.map +0 -1
- package/lib/module/NativeQoreidSdk.mjs +0 -3
- package/lib/module/NativeQoreidSdk.mjs.map +0 -1
- package/lib/module/index.mjs +0 -3
- package/lib/module/index.mjs.map +0 -1
- package/lib/module/qoreIdSdk.mjs.map +0 -1
- package/lib/module/types.d.mjs +0 -2
- package/lib/module/utils.mjs.map +0 -1
- package/lib/typescript/src/NativeQoreidSdk.d.ts +0 -7
- package/lib/typescript/src/NativeQoreidSdk.d.ts.map +0 -1
- package/src/NativeQoreidSdk.ts +0 -8
- /package/lib/module/{types.d.mjs.map → types.d.js.map} +0 -0
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2024 QoreID
|
|
4
4
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
5
|
of this software and associated documentation files (the "Software"), to deal
|
|
6
6
|
in the Software without restriction, including without limitation the rights
|
package/README.md
CHANGED
|
@@ -2,7 +2,6 @@ QoreID React Native SDK
|
|
|
2
2
|
|
|
3
3
|
Link to [documentation](https://docs.qoreid.com/docs/qoreid-react-native-sdk)
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
## Installation
|
|
7
6
|
|
|
8
7
|
```c npm
|
|
@@ -11,4 +10,4 @@ npm install --save @qore-id/react-native-qoreid-sdk
|
|
|
11
10
|
|
|
12
11
|
```c yarn
|
|
13
12
|
yarn add @qore-id/react-native-qoreid-sdk
|
|
14
|
-
```
|
|
13
|
+
```
|
package/android/build.gradle
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
buildscript {
|
|
2
2
|
// Buildscript is evaluated before everything else so we can't use getExtOrDefault
|
|
3
|
-
def kotlin_version = rootProject.ext.has("kotlinVersion") ? rootProject.ext.get("kotlinVersion") : project.properties["
|
|
3
|
+
def kotlin_version = rootProject.ext.has("kotlinVersion") ? rootProject.ext.get("kotlinVersion") : project.properties["RNQoreIDSdk_kotlinVersion"]
|
|
4
4
|
|
|
5
5
|
repositories {
|
|
6
6
|
google()
|
|
@@ -31,11 +31,11 @@ if (isNewArchitectureEnabled()) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
def getExtOrDefault(name) {
|
|
34
|
-
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["
|
|
34
|
+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["RNQoreIDSdk_" + name]
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
def getExtOrIntegerDefault(name) {
|
|
38
|
-
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["
|
|
38
|
+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["RNQoreIDSdk_" + name]).toInteger()
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
def supportsNamespace() {
|
|
@@ -63,15 +63,10 @@ android {
|
|
|
63
63
|
defaultConfig {
|
|
64
64
|
minSdkVersion getExtOrIntegerDefault("minSdkVersion")
|
|
65
65
|
targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
|
|
66
|
-
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
|
67
66
|
buildConfigField "String", "s", "\"react_native_android_sdk\""
|
|
68
67
|
multiDexEnabled true
|
|
69
68
|
}
|
|
70
69
|
|
|
71
|
-
buildFeatures {
|
|
72
|
-
buildConfig true
|
|
73
|
-
}
|
|
74
|
-
|
|
75
70
|
buildTypes {
|
|
76
71
|
release {
|
|
77
72
|
minifyEnabled false
|
|
@@ -86,29 +81,8 @@ android {
|
|
|
86
81
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
87
82
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
88
83
|
}
|
|
89
|
-
|
|
90
|
-
sourceSets {
|
|
91
|
-
main {
|
|
92
|
-
if (isNewArchitectureEnabled()) {
|
|
93
|
-
java.srcDirs += [
|
|
94
|
-
"src/newarch",
|
|
95
|
-
// This is needed to build Kotlin project with NewArch enabled
|
|
96
|
-
"${project.buildDir}/generated/source/codegen/java"
|
|
97
|
-
]
|
|
98
|
-
} else {
|
|
99
|
-
java.srcDirs += ["src/oldarch"]
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
repositories {
|
|
106
|
-
mavenCentral()
|
|
107
|
-
google()
|
|
108
84
|
}
|
|
109
85
|
|
|
110
|
-
def kotlin_version = getExtOrDefault("kotlinVersion")
|
|
111
|
-
|
|
112
86
|
repositories {
|
|
113
87
|
mavenCentral()
|
|
114
88
|
google()
|
|
@@ -117,8 +91,10 @@ repositories {
|
|
|
117
91
|
maven { url 'https://jitpack.io' }
|
|
118
92
|
}
|
|
119
93
|
|
|
94
|
+
def kotlin_version = getExtOrDefault("kotlinVersion")
|
|
95
|
+
|
|
120
96
|
dependencies {
|
|
121
|
-
implementation 'com.qoreid:qoreid-sdk
|
|
97
|
+
implementation 'com.qoreid:qoreid-sdk:+'
|
|
122
98
|
// For < 0.71, this will be from the local maven repo
|
|
123
99
|
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
|
|
124
100
|
//noinspection GradleDynamicVersion
|
|
@@ -126,10 +102,3 @@ dependencies {
|
|
|
126
102
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
127
103
|
}
|
|
128
104
|
|
|
129
|
-
if (isNewArchitectureEnabled()) {
|
|
130
|
-
react {
|
|
131
|
-
jsRootDir = file("../src/")
|
|
132
|
-
libraryName = "QoreidSdk"
|
|
133
|
-
codegenJavaPackageName = "com.qoreidsdk"
|
|
134
|
-
}
|
|
135
|
-
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
RNQoreIDSdk_kotlinVersion=1.7.0
|
|
2
|
+
RNQoreIDSdk_minSdkVersion=21
|
|
3
|
+
RNQoreIDSdk_targetSdkVersion=31
|
|
4
|
+
RNQoreIDSdk_compileSdkVersion=31
|
|
5
|
+
RNQoreIDSdk_ndkversion=21.4.7075529
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
package com.qoreidsdk
|
|
2
2
|
|
|
3
|
+
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
3
4
|
import android.app.Activity
|
|
4
5
|
import android.content.Intent
|
|
5
6
|
import android.os.Build
|
|
@@ -9,7 +10,6 @@ import com.facebook.react.bridge.Arguments
|
|
|
9
10
|
import com.facebook.react.bridge.BaseActivityEventListener
|
|
10
11
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
11
12
|
import com.facebook.react.bridge.ReactMethod
|
|
12
|
-
import com.facebook.react.bridge.Promise
|
|
13
13
|
import com.facebook.react.bridge.ReadableMap
|
|
14
14
|
import com.facebook.react.bridge.WritableMap
|
|
15
15
|
import com.facebook.react.modules.core.DeviceEventManagerModule
|
|
@@ -23,9 +23,14 @@ import com.qoreid.sdk.core.models.ApplicantData
|
|
|
23
23
|
import com.qoreid.sdk.core.models.ErrorResult
|
|
24
24
|
import com.qoreid.sdk.core.models.QoreIDResult
|
|
25
25
|
import com.qoreid.sdk.core.models.SuccessResult
|
|
26
|
+
import com.qoreid.sdk.core.models.VerificationExtraData
|
|
26
27
|
|
|
27
|
-
class QoreidSdkModule
|
|
28
|
-
|
|
28
|
+
class QoreidSdkModule(context: ReactApplicationContext) :
|
|
29
|
+
ReactContextBaseJavaModule(context) {
|
|
30
|
+
|
|
31
|
+
override fun getName(): String {
|
|
32
|
+
return NAME
|
|
33
|
+
}
|
|
29
34
|
|
|
30
35
|
private var qoreIdResult: QoreIDResult? = null
|
|
31
36
|
|
|
@@ -55,10 +60,6 @@ class QoreidSdkModule internal constructor(context: ReactApplicationContext) :
|
|
|
55
60
|
}
|
|
56
61
|
}
|
|
57
62
|
|
|
58
|
-
override fun getName(): String {
|
|
59
|
-
return NAME
|
|
60
|
-
}
|
|
61
|
-
|
|
62
63
|
init {
|
|
63
64
|
context.addActivityEventListener(activityEventListener)
|
|
64
65
|
|
|
@@ -78,7 +79,7 @@ class QoreidSdkModule internal constructor(context: ReactApplicationContext) :
|
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
@ReactMethod
|
|
81
|
-
|
|
82
|
+
fun launchQoreidSdk(readableData: ReadableMap) {
|
|
82
83
|
val data = readableData.toHashMap()
|
|
83
84
|
|
|
84
85
|
if (currentActivity == null) {
|
|
@@ -109,12 +110,24 @@ class QoreidSdkModule internal constructor(context: ReactApplicationContext) :
|
|
|
109
110
|
)
|
|
110
111
|
val flowId = config?.get("flowId") as? Double
|
|
111
112
|
|
|
113
|
+
val _extraData = data?.get("extraData") as? HashMap<*, *>?
|
|
114
|
+
var extraData: VerificationExtraData? = null
|
|
115
|
+
|
|
116
|
+
if (!_extraData.isNullOrEmpty()) {
|
|
117
|
+
extraData = VerificationExtraData(
|
|
118
|
+
_extraData.get("organisationId") as String,
|
|
119
|
+
_extraData.get("organisationName") as String,
|
|
120
|
+
_extraData?.get("requestSource") as String,
|
|
121
|
+
_extraData?.get("internalReferenceId") as String
|
|
122
|
+
)
|
|
123
|
+
}
|
|
124
|
+
|
|
112
125
|
val qoreIDParams =
|
|
113
126
|
if (flowId?.toLong() != 0L) {
|
|
114
127
|
QoreIDParams()
|
|
115
128
|
.clientId(config?.get("clientId") as String)
|
|
116
129
|
.customerReference(config?.get("customerReference") as String)
|
|
117
|
-
.inputData(applicantData, addressData)
|
|
130
|
+
.inputData(applicantData, addressData, null, extraData)
|
|
118
131
|
.ocrAcceptedDocuments(data?.get("acceptedDocuments") as List<String>)
|
|
119
132
|
.workflow(flowId!!.toLong())
|
|
120
133
|
.workflowDefaultIdentity(
|
|
@@ -125,7 +138,7 @@ class QoreidSdkModule internal constructor(context: ReactApplicationContext) :
|
|
|
125
138
|
QoreIDParams()
|
|
126
139
|
.clientId(config?.get("clientId") as String)
|
|
127
140
|
.customerReference(config?.get("customerReference") as String)
|
|
128
|
-
.inputData(applicantData, addressData)
|
|
141
|
+
.inputData(applicantData, addressData, null, extraData)
|
|
129
142
|
.ocrAcceptedDocuments(data?.get("acceptedDocuments") as List<String>)
|
|
130
143
|
.collection(config?.get("productCode") as String)
|
|
131
144
|
}
|
|
@@ -174,6 +187,7 @@ class QoreidSdkModule internal constructor(context: ReactApplicationContext) :
|
|
|
174
187
|
.emit(eventName, params)
|
|
175
188
|
}
|
|
176
189
|
|
|
190
|
+
|
|
177
191
|
companion object {
|
|
178
192
|
const val NAME = "QoreidSdk"
|
|
179
193
|
|
|
@@ -1,35 +1,17 @@
|
|
|
1
1
|
package com.qoreidsdk
|
|
2
2
|
|
|
3
|
-
import com.facebook.react.
|
|
4
|
-
import com.facebook.react.bridge.ReactApplicationContext
|
|
3
|
+
import com.facebook.react.ReactPackage
|
|
5
4
|
import com.facebook.react.bridge.NativeModule
|
|
6
|
-
import com.facebook.react.
|
|
7
|
-
import com.facebook.react.
|
|
8
|
-
|
|
5
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
|
+
import com.facebook.react.uimanager.ViewManager
|
|
7
|
+
|
|
9
8
|
|
|
10
|
-
class QoreidSdkPackage :
|
|
11
|
-
override fun
|
|
12
|
-
return
|
|
13
|
-
QoreidSdkModule(reactContext)
|
|
14
|
-
} else {
|
|
15
|
-
null
|
|
16
|
-
}
|
|
9
|
+
class QoreidSdkPackage : ReactPackage {
|
|
10
|
+
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
|
|
11
|
+
return listOf(QoreidSdkModule(reactContext))
|
|
17
12
|
}
|
|
18
13
|
|
|
19
|
-
override fun
|
|
20
|
-
return
|
|
21
|
-
val moduleInfos: MutableMap<String, ReactModuleInfo> = HashMap()
|
|
22
|
-
val isTurboModule: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
|
|
23
|
-
moduleInfos[QoreidSdkModule.NAME] = ReactModuleInfo(
|
|
24
|
-
QoreidSdkModule.NAME,
|
|
25
|
-
QoreidSdkModule.NAME,
|
|
26
|
-
false, // canOverrideExistingModule
|
|
27
|
-
false, // needsEagerInit
|
|
28
|
-
true, // hasConstants
|
|
29
|
-
false, // isCxxModule
|
|
30
|
-
isTurboModule // isTurboModule
|
|
31
|
-
)
|
|
32
|
-
moduleInfos
|
|
33
|
-
}
|
|
14
|
+
override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
|
|
15
|
+
return emptyList()
|
|
34
16
|
}
|
|
35
17
|
}
|
package/ios/QoreidSdk.m
CHANGED
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
#import <React/RCTBridgeModule.h>
|
|
2
2
|
#import <UIKit/UIKit.h>
|
|
3
3
|
|
|
4
|
+
@interface RCT_EXTERN_MODULE (QoreidSdk, NSObject)
|
|
4
5
|
|
|
6
|
+
RCT_EXTERN_METHOD(launchQoreidSdk : (NSDictionary *)data)
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
RCT_EXTERN_METHOD (launchQoreidSdk: (NSDictionary *) data)
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
// Don't compile this code when we build for the old architecture.
|
|
12
|
-
#ifdef RCT_NEW_ARCH_ENABLED
|
|
13
|
-
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
|
14
|
-
(const facebook::react::ObjCTurboModule::InitParams &)params
|
|
15
|
-
{
|
|
16
|
-
return std::make_shared<facebook::react::NativeQoreidSdkSpecJSI>(params);
|
|
8
|
+
+ (BOOL)requiresMainQueueSetup {
|
|
9
|
+
return NO;
|
|
17
10
|
}
|
|
18
|
-
#endif
|
|
19
11
|
|
|
20
12
|
@end
|
|
21
|
-
|
package/ios/QoreidSdk.swift
CHANGED
|
@@ -14,15 +14,15 @@ import QoreIDSDK
|
|
|
14
14
|
|
|
15
15
|
@objc(QoreidSdk)
|
|
16
16
|
class QoreidSdk: RCTEventEmitter {
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
@objc func launchQoreidSdk(_ data: NSDictionary) -> Void {
|
|
19
19
|
let config = data["config"] as? NSDictionary
|
|
20
20
|
let _applicant = data["applicantData"] as? NSDictionary
|
|
21
21
|
let _identity = data["identityData"] as? NSDictionary
|
|
22
22
|
let _address = data["addressData"] as? NSDictionary
|
|
23
23
|
let ocrs = data["acceptedDocuments"] as? NSArray
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
let _extraData = data["extraData"] as? NSDictionary
|
|
25
|
+
|
|
26
26
|
let applicant = ApplicantData(
|
|
27
27
|
firstname:_applicant?["firstName"] as? String,
|
|
28
28
|
lastname:_applicant?["lastName"] as? String,
|
|
@@ -31,7 +31,7 @@ class QoreidSdk: RCTEventEmitter {
|
|
|
31
31
|
dob: _applicant?["dob"] as? String,
|
|
32
32
|
email: _applicant?["email"] as? String
|
|
33
33
|
)
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
let addressData = AddressData(
|
|
36
36
|
address: _address?["address"] as? String,
|
|
37
37
|
city: _address?["city"] as? String,
|
|
@@ -41,19 +41,26 @@ class QoreidSdk: RCTEventEmitter {
|
|
|
41
41
|
subCounty: _address?["region"] as? String,
|
|
42
42
|
ccc: _address?["ccc"] as? String ?? ""
|
|
43
43
|
)
|
|
44
|
-
|
|
44
|
+
|
|
45
45
|
let identityData = IdentityData(
|
|
46
46
|
idType: _identity?["idType"] as? String,
|
|
47
47
|
idNumber: _identity?["idNumber"] as? String
|
|
48
48
|
)
|
|
49
|
-
|
|
49
|
+
|
|
50
|
+
let extraData = VerificationExtraData(
|
|
51
|
+
organisationId: _extraData?["organisationId"] as? String,
|
|
52
|
+
organisationName: _extraData?["organisationName"] as? String,
|
|
53
|
+
requestSource: _extraData?["requestSource"] as? String,
|
|
54
|
+
internalReferenceId: _extraData?["internalReferenceId"] as? String
|
|
55
|
+
)
|
|
56
|
+
|
|
50
57
|
var param:QoreIDParam?
|
|
51
|
-
|
|
58
|
+
|
|
52
59
|
if (config!["flowId"] as! Int != 0) {
|
|
53
60
|
param = QoreIDParam()
|
|
54
61
|
.clientId(clientId: config?["clientId"] as? String)
|
|
55
62
|
.customerReference(config?["customerReference"] as? String)
|
|
56
|
-
.inputData(InputData(applicant: applicant,address: addressData, identity: identityData))
|
|
63
|
+
.inputData(InputData(applicant: applicant,address: addressData, identity: identityData, extraData: extraData))
|
|
57
64
|
.ocrAcceptedDocuments(ocrs as? Array<String>)
|
|
58
65
|
.workFlow(config!["flowId"] as! Int)
|
|
59
66
|
.workFlowRequiredIdentity(config?["defaultIdType"] as? String ?? "")
|
|
@@ -62,12 +69,12 @@ class QoreidSdk: RCTEventEmitter {
|
|
|
62
69
|
param = QoreIDParam()
|
|
63
70
|
.clientId(clientId: config?["clientId"] as? String)
|
|
64
71
|
.customerReference(config?["customerReference"] as? String)
|
|
65
|
-
.inputData(InputData(applicant: applicant,address: addressData, identity: identityData))
|
|
72
|
+
.inputData(InputData(applicant: applicant,address: addressData, identity: identityData, extraData: extraData))
|
|
66
73
|
.ocrAcceptedDocuments(ocrs as? Array<String>)
|
|
67
74
|
.collection((config?["productCode"] as? String)!)
|
|
68
75
|
.build()
|
|
69
76
|
}
|
|
70
|
-
|
|
77
|
+
|
|
71
78
|
if let params = param {
|
|
72
79
|
DispatchQueue.main.async {
|
|
73
80
|
let vc = ViewController()
|
|
@@ -75,73 +82,64 @@ class QoreidSdk: RCTEventEmitter {
|
|
|
75
82
|
vc.onQoreIdResult = { [weak self] result in
|
|
76
83
|
self?.onQoreIdResultReceived(result: result)
|
|
77
84
|
}
|
|
78
|
-
self.controller()
|
|
85
|
+
self.controller().pushViewController(vc, animated: false)
|
|
79
86
|
}
|
|
80
87
|
}
|
|
81
88
|
}
|
|
82
|
-
|
|
89
|
+
|
|
83
90
|
func onQoreIdResultReceived(result: QoreIDResult?) {
|
|
84
91
|
if let result = result {
|
|
85
92
|
if let errorResult = result as? ErrorResult {
|
|
86
93
|
self.sendEvent(withName: "onResult", body:["code": String(describing: errorResult.code), "data": self.parseData(errorResult.data), "message": errorResult.message, "event": "ERROR_RESULT"])
|
|
87
|
-
self.controller()
|
|
94
|
+
self.controller().popViewController(animated: false)
|
|
88
95
|
} else if let successResult = result as? SuccessResult {
|
|
89
96
|
self.sendEvent(withName: "onResult", body:["data": self.parseData( successResult.data), "message": successResult.message!, "event": "SUCCESS_RESULT"])
|
|
90
|
-
self.controller()
|
|
97
|
+
self.controller().popViewController(animated: false)
|
|
91
98
|
} else if let pendingResult = result as? PendingResult {
|
|
92
99
|
self.sendEvent(withName: "onResult", body:["data": pendingResult.data?.verification?.id! ?? 0, "message": pendingResult.message!, "event": "SESSION_RESULT"])
|
|
93
100
|
}
|
|
94
|
-
}
|
|
101
|
+
}
|
|
95
102
|
}
|
|
96
103
|
|
|
97
104
|
func parseData(_ resultData: QoreIDSDK.ResultData?) -> [String: Any] {
|
|
98
105
|
var data: [String: Any] = [:]
|
|
99
|
-
|
|
106
|
+
|
|
100
107
|
if let resultData = resultData {
|
|
101
108
|
data["customerReference"] = resultData.customerReference ?? ""
|
|
102
|
-
|
|
109
|
+
|
|
103
110
|
data["flowId"] = String(resultData.flowId ?? 0)
|
|
104
|
-
|
|
111
|
+
|
|
105
112
|
var verificationData: [String: Any] = [:]
|
|
106
|
-
|
|
113
|
+
|
|
107
114
|
verificationData["id"] = resultData.verification?.id
|
|
108
|
-
|
|
115
|
+
|
|
109
116
|
verificationData["status"] = [
|
|
110
117
|
"status": resultData.verification?.status?.status ?? "",
|
|
111
118
|
"state": resultData.verification?.status?.state ?? ""
|
|
112
119
|
]
|
|
113
|
-
|
|
120
|
+
|
|
114
121
|
data["verification"] = verificationData
|
|
115
|
-
|
|
122
|
+
|
|
116
123
|
data["productCode"] = resultData.productCode
|
|
117
|
-
|
|
124
|
+
|
|
118
125
|
} else {
|
|
119
126
|
data = [:]
|
|
120
127
|
}
|
|
121
128
|
|
|
122
129
|
return data
|
|
123
130
|
}
|
|
124
|
-
|
|
131
|
+
|
|
125
132
|
override func supportedEvents() -> [String] {
|
|
126
133
|
return ["onResult"]
|
|
127
134
|
}
|
|
128
|
-
|
|
135
|
+
|
|
129
136
|
@objc override static func requiresMainQueueSetup() -> Bool {
|
|
130
137
|
return false
|
|
131
138
|
}
|
|
132
|
-
|
|
133
|
-
private func controller() -> UINavigationController
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
let scenes = UIApplication.shared.connectedScenes
|
|
137
|
-
let windowScene = scenes.first { $0.activationState == .foregroundActive } as? UIWindowScene
|
|
138
|
-
let window = windowScene?.windows.first { $0.isKeyWindow }
|
|
139
|
-
return (window?.rootViewController as? UINavigationController)
|
|
140
|
-
} else {
|
|
141
|
-
// iOS 12 and earlier
|
|
142
|
-
let window = UIApplication.shared.keyWindow
|
|
143
|
-
return (window?.rootViewController as! UINavigationController)
|
|
144
|
-
}
|
|
139
|
+
|
|
140
|
+
private func controller() -> UINavigationController {
|
|
141
|
+
let rootViewController = UIApplication.shared.keyWindow?.rootViewController
|
|
142
|
+
return rootViewController as! UINavigationController
|
|
145
143
|
}
|
|
146
144
|
}
|
|
147
145
|
|
package/lib/commonjs/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _utils = require("./utils");
|
|
6
|
+
var _utils = require("./utils.js");
|
|
7
7
|
Object.keys(_utils).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
9
|
if (key in exports && exports[key] === _utils[key]) return;
|
|
@@ -14,7 +14,7 @@ Object.keys(_utils).forEach(function (key) {
|
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
-
var _qoreIdSdk = require("./qoreIdSdk");
|
|
17
|
+
var _qoreIdSdk = require("./qoreIdSdk.js");
|
|
18
18
|
Object.keys(_qoreIdSdk).forEach(function (key) {
|
|
19
19
|
if (key === "default" || key === "__esModule") return;
|
|
20
20
|
if (key in exports && exports[key] === _qoreIdSdk[key]) return;
|
|
@@ -4,16 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.QoreIdSdk = void 0;
|
|
7
|
+
exports.useQoreIdSdk = useQoreIdSdk;
|
|
7
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _react = require("react");
|
|
8
10
|
const LINKING_ERROR = `The package '@qoreid/react-native-qoreid-sdk' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({
|
|
9
11
|
ios: "- You have run 'pod install'\n",
|
|
10
12
|
default: ''
|
|
11
13
|
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const isTurboModuleEnabled = global.__turboModuleProxy != null;
|
|
15
|
-
const QoreidRnUpgradeModule = isTurboModuleEnabled ? require('./NativeQoreidSdk').default : _reactNative.NativeModules.QoreidSdk;
|
|
16
|
-
const QoreidRnSDK = QoreidRnUpgradeModule ? QoreidRnUpgradeModule : new Proxy({}, {
|
|
14
|
+
const QoreidRNModule = _reactNative.NativeModules.QoreidSdk;
|
|
15
|
+
const ReactNativeQoreidSdkModule = QoreidRNModule ?? new Proxy({}, {
|
|
17
16
|
get() {
|
|
18
17
|
throw new Error(LINKING_ERROR);
|
|
19
18
|
}
|
|
@@ -24,14 +23,14 @@ const QoreIdSdk = exports.QoreIdSdk = {
|
|
|
24
23
|
* @param initialData - data to launch Qore ID SDK
|
|
25
24
|
* @requires QoreIdSdk native module installed
|
|
26
25
|
*/
|
|
27
|
-
launch(initialData
|
|
26
|
+
launch(initialData) {
|
|
28
27
|
const payload = {
|
|
29
28
|
config: {
|
|
30
29
|
flowId: initialData.flowId || 0,
|
|
31
30
|
customerReference: initialData.customerReference,
|
|
32
31
|
productCode: initialData.productCode,
|
|
33
32
|
clientId: initialData.clientId,
|
|
34
|
-
defaultIdType: initialData?.defaultIdType
|
|
33
|
+
defaultIdType: initialData?.defaultIdType ?? ''
|
|
35
34
|
},
|
|
36
35
|
applicantData: {
|
|
37
36
|
...initialData.applicantData
|
|
@@ -42,20 +41,34 @@ const QoreIdSdk = exports.QoreIdSdk = {
|
|
|
42
41
|
acceptedDocuments: initialData.ocrAcceptedDocuments,
|
|
43
42
|
identityData: {
|
|
44
43
|
...initialData.identityData
|
|
45
|
-
}
|
|
44
|
+
},
|
|
45
|
+
extraData: initialData.extraData
|
|
46
46
|
};
|
|
47
|
-
|
|
47
|
+
ReactNativeQoreidSdkModule.launchQoreidSdk(payload);
|
|
48
48
|
},
|
|
49
49
|
/**
|
|
50
50
|
* QoreIdSdk events listener. It takes callbacks to handle success and error events
|
|
51
51
|
* @param callback(data: OnResultType) Handles various events from QoreID SDK
|
|
52
52
|
*/
|
|
53
53
|
events(callback) {
|
|
54
|
-
const eventEmitter = _reactNative.Platform.OS === 'android' ? new _reactNative.NativeEventEmitter() : new _reactNative.NativeEventEmitter(
|
|
54
|
+
const eventEmitter = _reactNative.Platform.OS === 'android' ? new _reactNative.NativeEventEmitter() : new _reactNative.NativeEventEmitter(ReactNativeQoreidSdkModule);
|
|
55
55
|
let eventListener = eventEmitter?.addListener('onResult', callback);
|
|
56
56
|
return () => {
|
|
57
57
|
eventListener.remove();
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
+
function useQoreIdSdk({
|
|
62
|
+
onResult
|
|
63
|
+
}) {
|
|
64
|
+
(0, _react.useEffect)(() => {
|
|
65
|
+
const unsubscribed = QoreIdSdk.events(onResult);
|
|
66
|
+
return () => {
|
|
67
|
+
unsubscribed();
|
|
68
|
+
};
|
|
69
|
+
}, [onResult]);
|
|
70
|
+
return {
|
|
71
|
+
launchQoreId: QoreIdSdk.launch
|
|
72
|
+
};
|
|
73
|
+
}
|
|
61
74
|
//# sourceMappingURL=qoreIdSdk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","LINKING_ERROR","Platform","select","ios","default","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_react","LINKING_ERROR","Platform","select","ios","default","QoreidRNModule","NativeModules","QoreidSdk","ReactNativeQoreidSdkModule","Proxy","get","Error","QoreIdSdk","exports","launch","initialData","payload","config","flowId","customerReference","productCode","clientId","defaultIdType","applicantData","addressData","acceptedDocuments","ocrAcceptedDocuments","identityData","extraData","launchQoreidSdk","events","callback","eventEmitter","OS","NativeEventEmitter","eventListener","addListener","remove","useQoreIdSdk","onResult","useEffect","unsubscribed","launchQoreId"],"sourceRoot":"../../src","sources":["qoreIdSdk.tsx"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAEA,MAAME,aAAa,GACjB,0FAA0F,GAC1FC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,cAAc,GAAGC,0BAAa,CAACC,SAAS;AAE9C,MAAMC,0BAA0B,GAC9BH,cAAc,IACd,IAAII,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACX,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAEI,MAAMY,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG;EACvB;AACF;AACA;AACA;AACA;EACEE,MAAMA,CAACC,WAAuB,EAAE;IAC9B,MAAMC,OAAO,GAAG;MACdC,MAAM,EAAE;QACNC,MAAM,EAAEH,WAAW,CAACG,MAAM,IAAI,CAAC;QAC/BC,iBAAiB,EAAEJ,WAAW,CAACI,iBAAiB;QAChDC,WAAW,EAAEL,WAAW,CAACK,WAAW;QACpCC,QAAQ,EAAEN,WAAW,CAACM,QAAQ;QAC9BC,aAAa,EAAEP,WAAW,EAAEO,aAAa,IAAI;MAC/C,CAAC;MACDC,aAAa,EAAE;QACb,GAAGR,WAAW,CAACQ;MACjB,CAAC;MACDC,WAAW,EAAE;QACX,GAAGT,WAAW,CAACS;MACjB,CAAC;MACDC,iBAAiB,EAAEV,WAAW,CAACW,oBAAoB;MACnDC,YAAY,EAAE;QAAE,GAAGZ,WAAW,CAACY;MAAa,CAAC;MAC7CC,SAAS,EAAEb,WAAW,CAACa;IACzB,CAAC;IACDpB,0BAA0B,CAACqB,eAAe,CAACb,OAAO,CAAC;EACrD,CAAC;EAED;AACF;AACA;AACA;EACEc,MAAMA,CAACC,QAAkC,EAAE;IACzC,MAAMC,YAAY,GAChB/B,qBAAQ,CAACgC,EAAE,KAAK,SAAS,GACrB,IAAIC,+BAAkB,CAAC,CAAC,GACxB,IAAIA,+BAAkB,CAAC1B,0BAA0B,CAAC;IACxD,IAAI2B,aAAa,GAAGH,YAAY,EAAEI,WAAW,CAAC,UAAU,EAAEL,QAAQ,CAAC;IAEnE,OAAO,MAAM;MACXI,aAAa,CAACE,MAAM,CAAC,CAAC;IACxB,CAAC;EACH;AACF,CAAC;AAEM,SAASC,YAAYA,CAAC;EAC3BC;AAGF,CAAC,EAAE;EACD,IAAAC,gBAAS,EAAC,MAAM;IACd,MAAMC,YAAY,GAAG7B,SAAS,CAACkB,MAAM,CAACS,QAAQ,CAAC;IAC/C,OAAO,MAAM;MACXE,YAAY,CAAC,CAAC;IAChB,CAAC;EACH,CAAC,EAAE,CAACF,QAAQ,CAAC,CAAC;EAEd,OAAO;IAAEG,YAAY,EAAE9B,SAAS,CAACE;EAAO,CAAC;AAC3C","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,cAAc,YAAS;AACvB,cAAc,gBAAa","ignoreList":[]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
import { NativeEventEmitter, NativeModules, Platform } from 'react-native';
|
|
4
|
+
import { useEffect } from 'react';
|
|
2
5
|
const LINKING_ERROR = `The package '@qoreid/react-native-qoreid-sdk' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
|
|
3
6
|
ios: "- You have run 'pod install'\n",
|
|
4
7
|
default: ''
|
|
5
8
|
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const isTurboModuleEnabled = global.__turboModuleProxy != null;
|
|
9
|
-
const QoreidRnUpgradeModule = isTurboModuleEnabled ? require('./NativeQoreidSdk').default : NativeModules.QoreidSdk;
|
|
10
|
-
const QoreidRnSDK = QoreidRnUpgradeModule ? QoreidRnUpgradeModule : new Proxy({}, {
|
|
9
|
+
const QoreidRNModule = NativeModules.QoreidSdk;
|
|
10
|
+
const ReactNativeQoreidSdkModule = QoreidRNModule ?? new Proxy({}, {
|
|
11
11
|
get() {
|
|
12
12
|
throw new Error(LINKING_ERROR);
|
|
13
13
|
}
|
|
@@ -18,14 +18,14 @@ export const QoreIdSdk = {
|
|
|
18
18
|
* @param initialData - data to launch Qore ID SDK
|
|
19
19
|
* @requires QoreIdSdk native module installed
|
|
20
20
|
*/
|
|
21
|
-
launch(initialData
|
|
21
|
+
launch(initialData) {
|
|
22
22
|
const payload = {
|
|
23
23
|
config: {
|
|
24
24
|
flowId: initialData.flowId || 0,
|
|
25
25
|
customerReference: initialData.customerReference,
|
|
26
26
|
productCode: initialData.productCode,
|
|
27
27
|
clientId: initialData.clientId,
|
|
28
|
-
defaultIdType: initialData?.defaultIdType
|
|
28
|
+
defaultIdType: initialData?.defaultIdType ?? ''
|
|
29
29
|
},
|
|
30
30
|
applicantData: {
|
|
31
31
|
...initialData.applicantData
|
|
@@ -36,20 +36,34 @@ export const QoreIdSdk = {
|
|
|
36
36
|
acceptedDocuments: initialData.ocrAcceptedDocuments,
|
|
37
37
|
identityData: {
|
|
38
38
|
...initialData.identityData
|
|
39
|
-
}
|
|
39
|
+
},
|
|
40
|
+
extraData: initialData.extraData
|
|
40
41
|
};
|
|
41
|
-
|
|
42
|
+
ReactNativeQoreidSdkModule.launchQoreidSdk(payload);
|
|
42
43
|
},
|
|
43
44
|
/**
|
|
44
45
|
* QoreIdSdk events listener. It takes callbacks to handle success and error events
|
|
45
46
|
* @param callback(data: OnResultType) Handles various events from QoreID SDK
|
|
46
47
|
*/
|
|
47
48
|
events(callback) {
|
|
48
|
-
const eventEmitter = Platform.OS === 'android' ? new NativeEventEmitter() : new NativeEventEmitter(
|
|
49
|
+
const eventEmitter = Platform.OS === 'android' ? new NativeEventEmitter() : new NativeEventEmitter(ReactNativeQoreidSdkModule);
|
|
49
50
|
let eventListener = eventEmitter?.addListener('onResult', callback);
|
|
50
51
|
return () => {
|
|
51
52
|
eventListener.remove();
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
55
|
};
|
|
55
|
-
|
|
56
|
+
export function useQoreIdSdk({
|
|
57
|
+
onResult
|
|
58
|
+
}) {
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
const unsubscribed = QoreIdSdk.events(onResult);
|
|
61
|
+
return () => {
|
|
62
|
+
unsubscribed();
|
|
63
|
+
};
|
|
64
|
+
}, [onResult]);
|
|
65
|
+
return {
|
|
66
|
+
launchQoreId: QoreIdSdk.launch
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=qoreIdSdk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeEventEmitter","NativeModules","Platform","useEffect","LINKING_ERROR","select","ios","default","QoreidRNModule","QoreidSdk","ReactNativeQoreidSdkModule","Proxy","get","Error","QoreIdSdk","launch","initialData","payload","config","flowId","customerReference","productCode","clientId","defaultIdType","applicantData","addressData","acceptedDocuments","ocrAcceptedDocuments","identityData","extraData","launchQoreidSdk","events","callback","eventEmitter","OS","eventListener","addListener","remove","useQoreIdSdk","onResult","unsubscribed","launchQoreId"],"sourceRoot":"../../src","sources":["qoreIdSdk.tsx"],"mappings":";;AAAA,SAASA,kBAAkB,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAE1E,SAASC,SAAS,QAAQ,OAAO;AAEjC,MAAMC,aAAa,GACjB,0FAA0F,GAC1FF,QAAQ,CAACG,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,cAAc,GAAGP,aAAa,CAACQ,SAAS;AAE9C,MAAMC,0BAA0B,GAC9BF,cAAc,IACd,IAAIG,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACT,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAEH,OAAO,MAAMU,SAAS,GAAG;EACvB;AACF;AACA;AACA;AACA;EACEC,MAAMA,CAACC,WAAuB,EAAE;IAC9B,MAAMC,OAAO,GAAG;MACdC,MAAM,EAAE;QACNC,MAAM,EAAEH,WAAW,CAACG,MAAM,IAAI,CAAC;QAC/BC,iBAAiB,EAAEJ,WAAW,CAACI,iBAAiB;QAChDC,WAAW,EAAEL,WAAW,CAACK,WAAW;QACpCC,QAAQ,EAAEN,WAAW,CAACM,QAAQ;QAC9BC,aAAa,EAAEP,WAAW,EAAEO,aAAa,IAAI;MAC/C,CAAC;MACDC,aAAa,EAAE;QACb,GAAGR,WAAW,CAACQ;MACjB,CAAC;MACDC,WAAW,EAAE;QACX,GAAGT,WAAW,CAACS;MACjB,CAAC;MACDC,iBAAiB,EAAEV,WAAW,CAACW,oBAAoB;MACnDC,YAAY,EAAE;QAAE,GAAGZ,WAAW,CAACY;MAAa,CAAC;MAC7CC,SAAS,EAAEb,WAAW,CAACa;IACzB,CAAC;IACDnB,0BAA0B,CAACoB,eAAe,CAACb,OAAO,CAAC;EACrD,CAAC;EAED;AACF;AACA;AACA;EACEc,MAAMA,CAACC,QAAkC,EAAE;IACzC,MAAMC,YAAY,GAChB/B,QAAQ,CAACgC,EAAE,KAAK,SAAS,GACrB,IAAIlC,kBAAkB,CAAC,CAAC,GACxB,IAAIA,kBAAkB,CAACU,0BAA0B,CAAC;IACxD,IAAIyB,aAAa,GAAGF,YAAY,EAAEG,WAAW,CAAC,UAAU,EAAEJ,QAAQ,CAAC;IAEnE,OAAO,MAAM;MACXG,aAAa,CAACE,MAAM,CAAC,CAAC;IACxB,CAAC;EACH;AACF,CAAC;AAED,OAAO,SAASC,YAAYA,CAAC;EAC3BC;AAGF,CAAC,EAAE;EACDpC,SAAS,CAAC,MAAM;IACd,MAAMqC,YAAY,GAAG1B,SAAS,CAACiB,MAAM,CAACQ,QAAQ,CAAC;IAC/C,OAAO,MAAM;MACXC,YAAY,CAAC,CAAC;IAChB,CAAC;EACH,CAAC,EAAE,CAACD,QAAQ,CAAC,CAAC;EAEd,OAAO;IAAEE,YAAY,EAAE3B,SAAS,CAACC;EAAO,CAAC;AAC3C","ignoreList":[]}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
const acceptedDocuments = {
|
|
2
4
|
Nigeria: ['DRIVERS_LICENSE_NGA', 'VOTERS_CARD_NGA', 'NIN_SLIP_NGA', 'PASSPORT_NGA'],
|
|
3
5
|
Ghana: ['DRIVERS_LICENSE_GHA', 'NHIS_CARD_GHA', 'ECOWAS_CARD_GHA', 'SOCIAL_SECURITY_GHA', 'VOTERS_CARD_GHA', 'PASSPORT_GHA', 'GHANA_CARD_GHA'],
|
|
@@ -10,4 +12,4 @@ export const utils = {
|
|
|
10
12
|
productCodes,
|
|
11
13
|
acceptedDocuments
|
|
12
14
|
};
|
|
13
|
-
//# sourceMappingURL=utils.
|
|
15
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["acceptedDocuments","Nigeria","Ghana","Kenya","productCodes","utils"],"sourceRoot":"../../src","sources":["utils.ts"],"mappings":";;AAAA,MAAMA,iBAAiB,GAAG;EACxBC,OAAO,EAAE,CACP,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,cAAc,CACf;EACDC,KAAK,EAAE,CACL,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,gBAAgB,CACjB;EACDC,KAAK,EAAE,CACL,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc;AAElB,CAAC;AAED,MAAMC,YAAY,GAAG,CACnB,YAAY,EACZ,KAAK,EACL,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,WAAW,EACX,aAAa,EACb,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,uBAAuB,EACvB,mCAAmC,EACnC,uBAAuB,EACvB,+BAA+B,EAC/B,+BAA+B,EAC/B,wBAAwB,EACxB,oBAAoB,EACpB,UAAU,EACV,qBAAqB,EACrB,uBAAuB,EACvB,UAAU,EACV,cAAc,EACd,0BAA0B,EAC1B,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,eAAe,EACf,KAAK,EACL,WAAW,EACX,OAAO,EACP,KAAK,EACL,aAAa,EACb,aAAa,EACb,UAAU,EACV,KAAK;AACL;AACA,UAAU,EACV,aAAa,EACb,KAAK,EACL,aAAa,CACd;AAED,OAAO,MAAMC,KAAK,GAAG;EACnBD,YAAY;EACZJ;AACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -5,11 +5,16 @@ export declare const QoreIdSdk: {
|
|
|
5
5
|
* @param initialData - data to launch Qore ID SDK
|
|
6
6
|
* @requires QoreIdSdk native module installed
|
|
7
7
|
*/
|
|
8
|
-
launch(initialData: QoreIdData
|
|
8
|
+
launch(initialData: QoreIdData): void;
|
|
9
9
|
/**
|
|
10
10
|
* QoreIdSdk events listener. It takes callbacks to handle success and error events
|
|
11
11
|
* @param callback(data: OnResultType) Handles various events from QoreID SDK
|
|
12
12
|
*/
|
|
13
13
|
events(callback: (data: OnResult) => void): () => void;
|
|
14
14
|
};
|
|
15
|
+
export declare function useQoreIdSdk({ onResult, }: {
|
|
16
|
+
onResult: (data: OnResult) => void;
|
|
17
|
+
}): {
|
|
18
|
+
launchQoreId: (initialData: QoreIdData) => void;
|
|
19
|
+
};
|
|
15
20
|
//# sourceMappingURL=qoreIdSdk.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qoreIdSdk.d.ts","sourceRoot":"","sources":["../../../src/qoreIdSdk.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"qoreIdSdk.d.ts","sourceRoot":"","sources":["../../../src/qoreIdSdk.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAsBpD,eAAO,MAAM,SAAS;IACpB;;;;OAIG;wBACiB,UAAU;IAsB9B;;;OAGG;qBACc,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI;CAW1C,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CACpC;gCA3CqB,UAAU;EAoD/B"}
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qore-id/react-native-qoreid-sdk",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "QoreId React Native SDK",
|
|
5
5
|
"source": "./src/index.tsx",
|
|
6
6
|
"main": "./lib/commonjs/index.js",
|
|
7
|
-
"module": "./lib/module/index.
|
|
7
|
+
"module": "./lib/module/index.js",
|
|
8
8
|
"types": "./lib/typescript/src/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
11
|
"types": "./lib/typescript/src/index.d.ts",
|
|
12
|
-
"import": "./lib/module/index.
|
|
12
|
+
"import": "./lib/module/index.js",
|
|
13
13
|
"require": "./lib/commonjs/index.js"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"ios",
|
|
21
21
|
"cpp",
|
|
22
22
|
"*.podspec",
|
|
23
|
+
"react-native.config.json",
|
|
23
24
|
"!ios/build",
|
|
24
25
|
"!android/build",
|
|
25
26
|
"!android/gradle",
|
|
@@ -32,9 +33,9 @@
|
|
|
32
33
|
"!**/.*"
|
|
33
34
|
],
|
|
34
35
|
"scripts": {
|
|
35
|
-
"example": "
|
|
36
|
+
"example": "yarn workspace @qore-id/react-native-qoreid-sdk-example",
|
|
36
37
|
"test": "jest",
|
|
37
|
-
"typecheck": "tsc
|
|
38
|
+
"typecheck": "tsc",
|
|
38
39
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
39
40
|
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
40
41
|
"prepare": "bob build",
|
|
@@ -49,8 +50,7 @@
|
|
|
49
50
|
"type": "git",
|
|
50
51
|
"url": "git+https://.git"
|
|
51
52
|
},
|
|
52
|
-
"
|
|
53
|
-
"author": "Emmanuel <e.ugwuoke@verifyme.ng> (https://)",
|
|
53
|
+
"author": "Emmannuel <e.ugwuoke@verifyme.ng> (https://)",
|
|
54
54
|
"license": "MIT",
|
|
55
55
|
"bugs": {
|
|
56
56
|
"url": "https:///issues"
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@commitlint/config-conventional": "^17.0.2",
|
|
64
64
|
"@evilmartians/lefthook": "^1.5.0",
|
|
65
|
+
"@react-native-community/cli": "15.0.0",
|
|
65
66
|
"@react-native/eslint-config": "^0.73.1",
|
|
66
67
|
"@release-it/conventional-changelog": "^5.0.0",
|
|
67
68
|
"@types/jest": "^29.5.5",
|
|
@@ -73,9 +74,9 @@
|
|
|
73
74
|
"eslint-plugin-prettier": "^5.0.1",
|
|
74
75
|
"jest": "^29.7.0",
|
|
75
76
|
"prettier": "^3.0.3",
|
|
76
|
-
"react": "18.
|
|
77
|
-
"react-native": "0.
|
|
78
|
-
"react-native-builder-bob": "^0.
|
|
77
|
+
"react": "18.3.1",
|
|
78
|
+
"react-native": "0.76.1",
|
|
79
|
+
"react-native-builder-bob": "^0.30.3",
|
|
79
80
|
"release-it": "^15.0.0",
|
|
80
81
|
"turbo": "^1.10.7",
|
|
81
82
|
"typescript": "^5.2.2"
|
|
@@ -158,7 +159,7 @@
|
|
|
158
159
|
[
|
|
159
160
|
"commonjs",
|
|
160
161
|
{
|
|
161
|
-
"esm":
|
|
162
|
+
"esm": true
|
|
162
163
|
}
|
|
163
164
|
],
|
|
164
165
|
[
|
|
@@ -175,14 +176,9 @@
|
|
|
175
176
|
]
|
|
176
177
|
]
|
|
177
178
|
},
|
|
178
|
-
"codegenConfig": {
|
|
179
|
-
"name": "QoreidSdkSpec",
|
|
180
|
-
"type": "modules",
|
|
181
|
-
"jsSrcsDir": "src"
|
|
182
|
-
},
|
|
183
179
|
"create-react-native-library": {
|
|
184
|
-
"type": "module-
|
|
185
|
-
"languages": "kotlin-
|
|
186
|
-
"version": "0.
|
|
180
|
+
"type": "module-legacy",
|
|
181
|
+
"languages": "kotlin-swift",
|
|
182
|
+
"version": "0.42.2"
|
|
187
183
|
}
|
|
188
184
|
}
|
|
@@ -15,7 +15,6 @@ Pod::Spec.new do |s|
|
|
|
15
15
|
s.source = { :git => "https://.git", :tag => "#{s.version}" }
|
|
16
16
|
|
|
17
17
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
18
|
-
# s.dependency "React-Core"
|
|
19
18
|
s.dependency 'QoreIDSDK'
|
|
20
19
|
|
|
21
20
|
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
package/src/index.tsx
CHANGED
package/src/qoreIdSdk.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NativeEventEmitter, NativeModules, Platform } from 'react-native';
|
|
2
2
|
import type { OnResult, QoreIdData } from './types';
|
|
3
|
+
import { useEffect } from 'react';
|
|
3
4
|
|
|
4
5
|
const LINKING_ERROR =
|
|
5
6
|
`The package '@qoreid/react-native-qoreid-sdk' doesn't seem to be linked. Make sure: \n\n` +
|
|
@@ -7,23 +8,18 @@ const LINKING_ERROR =
|
|
|
7
8
|
'- You rebuilt the app after installing the package\n' +
|
|
8
9
|
'- You are not using Expo Go\n';
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
const isTurboModuleEnabled = global.__turboModuleProxy != null;
|
|
11
|
+
const QoreidRNModule = NativeModules.QoreidSdk;
|
|
12
12
|
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
throw new Error(LINKING_ERROR);
|
|
24
|
-
},
|
|
25
|
-
}
|
|
26
|
-
);
|
|
13
|
+
const ReactNativeQoreidSdkModule =
|
|
14
|
+
QoreidRNModule ??
|
|
15
|
+
new Proxy(
|
|
16
|
+
{},
|
|
17
|
+
{
|
|
18
|
+
get() {
|
|
19
|
+
throw new Error(LINKING_ERROR);
|
|
20
|
+
},
|
|
21
|
+
}
|
|
22
|
+
);
|
|
27
23
|
|
|
28
24
|
export const QoreIdSdk = {
|
|
29
25
|
/**
|
|
@@ -31,14 +27,14 @@ export const QoreIdSdk = {
|
|
|
31
27
|
* @param initialData - data to launch Qore ID SDK
|
|
32
28
|
* @requires QoreIdSdk native module installed
|
|
33
29
|
*/
|
|
34
|
-
launch(initialData: QoreIdData
|
|
30
|
+
launch(initialData: QoreIdData) {
|
|
35
31
|
const payload = {
|
|
36
32
|
config: {
|
|
37
33
|
flowId: initialData.flowId || 0,
|
|
38
34
|
customerReference: initialData.customerReference,
|
|
39
35
|
productCode: initialData.productCode,
|
|
40
36
|
clientId: initialData.clientId,
|
|
41
|
-
defaultIdType: initialData?.defaultIdType
|
|
37
|
+
defaultIdType: initialData?.defaultIdType ?? '',
|
|
42
38
|
},
|
|
43
39
|
applicantData: {
|
|
44
40
|
...initialData.applicantData,
|
|
@@ -48,9 +44,9 @@ export const QoreIdSdk = {
|
|
|
48
44
|
},
|
|
49
45
|
acceptedDocuments: initialData.ocrAcceptedDocuments,
|
|
50
46
|
identityData: { ...initialData.identityData },
|
|
47
|
+
extraData: initialData.extraData,
|
|
51
48
|
};
|
|
52
|
-
|
|
53
|
-
QoreidRnSDK.launchQoreidSdk(payload);
|
|
49
|
+
ReactNativeQoreidSdkModule.launchQoreidSdk(payload);
|
|
54
50
|
},
|
|
55
51
|
|
|
56
52
|
/**
|
|
@@ -61,7 +57,7 @@ export const QoreIdSdk = {
|
|
|
61
57
|
const eventEmitter =
|
|
62
58
|
Platform.OS === 'android'
|
|
63
59
|
? new NativeEventEmitter()
|
|
64
|
-
: new NativeEventEmitter(
|
|
60
|
+
: new NativeEventEmitter(ReactNativeQoreidSdkModule);
|
|
65
61
|
let eventListener = eventEmitter?.addListener('onResult', callback);
|
|
66
62
|
|
|
67
63
|
return () => {
|
|
@@ -69,3 +65,18 @@ export const QoreIdSdk = {
|
|
|
69
65
|
};
|
|
70
66
|
},
|
|
71
67
|
};
|
|
68
|
+
|
|
69
|
+
export function useQoreIdSdk({
|
|
70
|
+
onResult,
|
|
71
|
+
}: {
|
|
72
|
+
onResult: (data: OnResult) => void;
|
|
73
|
+
}) {
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
const unsubscribed = QoreIdSdk.events(onResult);
|
|
76
|
+
return () => {
|
|
77
|
+
unsubscribed();
|
|
78
|
+
};
|
|
79
|
+
}, [onResult]);
|
|
80
|
+
|
|
81
|
+
return { launchQoreId: QoreIdSdk.launch };
|
|
82
|
+
}
|
package/src/types.d.ts
CHANGED
|
@@ -8,6 +8,13 @@ export interface QoreIdData {
|
|
|
8
8
|
addressData?: AddressData;
|
|
9
9
|
ocrAcceptedDocuments: string[];
|
|
10
10
|
identityData?: IdentityData;
|
|
11
|
+
/** extra property is only usable for internal use only */
|
|
12
|
+
extraData?: {
|
|
13
|
+
organisationId: string;
|
|
14
|
+
organisationName: string;
|
|
15
|
+
requestSource: string;
|
|
16
|
+
internalReferenceId: string;
|
|
17
|
+
};
|
|
11
18
|
}
|
|
12
19
|
|
|
13
20
|
interface IConfig {
|
|
@@ -45,11 +52,23 @@ interface AddressData {
|
|
|
45
52
|
|
|
46
53
|
export interface OnResult {
|
|
47
54
|
code: string;
|
|
48
|
-
data: string;
|
|
55
|
+
data: Record<string, unknown> | string | number | null;
|
|
56
|
+
event: 'SESSION_RESULT' | 'SUCCESS_RESULT' | 'ERROR_RESULT';
|
|
49
57
|
message: string;
|
|
50
58
|
}
|
|
51
59
|
|
|
52
60
|
export type QoreIdSdk = {
|
|
53
|
-
launchQoreId: (initialData:
|
|
54
|
-
events: (OnResult: (data:
|
|
61
|
+
launchQoreId: (initialData: QoreIdData) => void;
|
|
62
|
+
events: (OnResult: (data: OnResult) => void) => void;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export function useQoreIdSdk({
|
|
66
|
+
onResult,
|
|
67
|
+
}: {
|
|
68
|
+
onResult: (data: OnResult) => void;
|
|
69
|
+
}): {
|
|
70
|
+
launchQoreId: (
|
|
71
|
+
initialData: QoreIdData,
|
|
72
|
+
_callback?: (data: OnResult) => void
|
|
73
|
+
) => void;
|
|
55
74
|
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
package com.qoreidsdk
|
|
2
|
-
|
|
3
|
-
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
|
-
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
5
|
-
import com.facebook.react.bridge.Promise
|
|
6
|
-
import com.facebook.react.bridge.ReadableMap
|
|
7
|
-
|
|
8
|
-
abstract class QoreidSdkSpec internal constructor(context: ReactApplicationContext) :
|
|
9
|
-
ReactContextBaseJavaModule(context) {
|
|
10
|
-
abstract fun launchQoreidSdk(readableData: ReadableMap)
|
|
11
|
-
}
|
|
Binary file
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
-
<plist version="1.0">
|
|
4
|
-
<dict>
|
|
5
|
-
<key>BuildLocationStyle</key>
|
|
6
|
-
<string>UseAppPreferences</string>
|
|
7
|
-
<key>CustomBuildLocationType</key>
|
|
8
|
-
<string>RelativeToDerivedData</string>
|
|
9
|
-
<key>DerivedDataLocationStyle</key>
|
|
10
|
-
<string>Default</string>
|
|
11
|
-
<key>ShowSharedSchemesAutomaticallyEnabled</key>
|
|
12
|
-
<true/>
|
|
13
|
-
</dict>
|
|
14
|
-
</plist>
|
package/ios/QoreidSdk.xcodeproj/xcuserdata/e.ugwuoke.xcuserdatad/xcschemes/xcschememanagement.plist
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
-
<plist version="1.0">
|
|
4
|
-
<dict>
|
|
5
|
-
<key>SchemeUserState</key>
|
|
6
|
-
<dict>
|
|
7
|
-
<key>QoreidSdk.xcscheme_^#shared#^_</key>
|
|
8
|
-
<dict>
|
|
9
|
-
<key>orderHint</key>
|
|
10
|
-
<integer>0</integer>
|
|
11
|
-
</dict>
|
|
12
|
-
</dict>
|
|
13
|
-
</dict>
|
|
14
|
-
</plist>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _default = exports.default = _reactNative.TurboModuleRegistry.getEnforcing('QoreidSdk');
|
|
9
|
-
//# sourceMappingURL=NativeQoreidSdk.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeQoreidSdk.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAMpCC,gCAAmB,CAACC,YAAY,CAAO,WAAW,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeQoreidSdk.ts"],"mappings":"AACA,SAASA,mBAAmB,QAAQ,cAAc;AAMlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,WAAW,CAAC","ignoreList":[]}
|
package/lib/module/index.mjs
DELETED
package/lib/module/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,cAAc,aAAS;AACvB,cAAc,iBAAa","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["NativeEventEmitter","NativeModules","Platform","LINKING_ERROR","select","ios","default","isTurboModuleEnabled","global","__turboModuleProxy","QoreidRnUpgradeModule","require","QoreidSdk","QoreidRnSDK","Proxy","get","Error","QoreIdSdk","launch","initialData","_callback","payload","config","flowId","customerReference","productCode","clientId","defaultIdType","applicantData","addressData","acceptedDocuments","ocrAcceptedDocuments","identityData","launchQoreidSdk","events","callback","eventEmitter","OS","eventListener","addListener","remove"],"sourceRoot":"../../src","sources":["qoreIdSdk.tsx"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAG1E,MAAMC,aAAa,GACjB,0FAA0F,GAC1FD,QAAQ,CAACE,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;;AAEjC;AACA,MAAMC,oBAAoB,GAAGC,MAAM,CAACC,kBAAkB,IAAI,IAAI;AAE9D,MAAMC,qBAAqB,GAAGH,oBAAoB,GAC9CI,OAAO,CAAC,mBAAmB,CAAC,CAACL,OAAO,GACpCL,aAAa,CAACW,SAAS;AAE3B,MAAMC,WAAW,GAAGH,qBAAqB,GACrCA,qBAAqB,GACrB,IAAII,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACb,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAEL,OAAO,MAAMc,SAAS,GAAG;EACvB;AACF;AACA;AACA;AACA;EACEC,MAAMA,CAACC,WAAuB,EAAEC,SAAoC,EAAE;IACpE,MAAMC,OAAO,GAAG;MACdC,MAAM,EAAE;QACNC,MAAM,EAAEJ,WAAW,CAACI,MAAM,IAAI,CAAC;QAC/BC,iBAAiB,EAAEL,WAAW,CAACK,iBAAiB;QAChDC,WAAW,EAAEN,WAAW,CAACM,WAAW;QACpCC,QAAQ,EAAEP,WAAW,CAACO,QAAQ;QAC9BC,aAAa,EAAER,WAAW,EAAEQ,aAAa,IAAI;MAC/C,CAAC;MACDC,aAAa,EAAE;QACb,GAAGT,WAAW,CAACS;MACjB,CAAC;MACDC,WAAW,EAAE;QACX,GAAGV,WAAW,CAACU;MACjB,CAAC;MACDC,iBAAiB,EAAEX,WAAW,CAACY,oBAAoB;MACnDC,YAAY,EAAE;QAAE,GAAGb,WAAW,CAACa;MAAa;IAC9C,CAAC;IAEDnB,WAAW,CAACoB,eAAe,CAACZ,OAAO,CAAC;EACtC,CAAC;EAED;AACF;AACA;AACA;EACEa,MAAMA,CAACC,QAAkC,EAAE;IACzC,MAAMC,YAAY,GAChBlC,QAAQ,CAACmC,EAAE,KAAK,SAAS,GACrB,IAAIrC,kBAAkB,CAAC,CAAC,GACxB,IAAIA,kBAAkB,CAACC,aAAa,CAACW,SAAS,CAAC;IACrD,IAAI0B,aAAa,GAAGF,YAAY,EAAEG,WAAW,CAAC,UAAU,EAAEJ,QAAQ,CAAC;IAEnE,OAAO,MAAM;MACXG,aAAa,CAACE,MAAM,CAAC,CAAC;IACxB,CAAC;EACH;AACF,CAAC","ignoreList":[]}
|
package/lib/module/types.d.mjs
DELETED
package/lib/module/utils.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["acceptedDocuments","Nigeria","Ghana","Kenya","productCodes","utils"],"sourceRoot":"../../src","sources":["utils.ts"],"mappings":"AAAA,MAAMA,iBAAiB,GAAG;EACxBC,OAAO,EAAE,CACP,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,cAAc,CACf;EACDC,KAAK,EAAE,CACL,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,gBAAgB,CACjB;EACDC,KAAK,EAAE,CACL,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc;AAElB,CAAC;AAED,MAAMC,YAAY,GAAG,CACnB,YAAY,EACZ,KAAK,EACL,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,WAAW,EACX,aAAa,EACb,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,uBAAuB,EACvB,mCAAmC,EACnC,uBAAuB,EACvB,+BAA+B,EAC/B,+BAA+B,EAC/B,wBAAwB,EACxB,oBAAoB,EACpB,UAAU,EACV,qBAAqB,EACrB,uBAAuB,EACvB,UAAU,EACV,cAAc,EACd,0BAA0B,EAC1B,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,eAAe,EACf,KAAK,EACL,WAAW,EACX,OAAO,EACP,KAAK,EACL,aAAa,EACb,aAAa,EACb,UAAU,EACV,KAAK;AACL;AACA,UAAU,EACV,aAAa,EACb,KAAK,EACL,aAAa,CACd;AAED,OAAO,MAAMC,KAAK,GAAG;EACnBD,YAAY;EACZJ;AACF,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NativeQoreidSdk.d.ts","sourceRoot":"","sources":["../../../src/NativeQoreidSdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;;AAED,wBAAmE"}
|
package/src/NativeQoreidSdk.ts
DELETED
|
File without changes
|