react-native-smallcase-gateway 6.0.0 → 7.0.0
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/android/build.gradle +1 -1
- package/android/src/main/java/com/reactnativesmallcasegateway/SmallcaseGatewayModule.kt +24 -4
- package/ios/SmallcaseGateway.m +60 -38
- package/lib/commonjs/SmallcaseGateway.js +16 -0
- package/lib/commonjs/SmallcaseGateway.js.map +1 -1
- package/lib/module/SmallcaseGateway.js +16 -0
- package/lib/module/SmallcaseGateway.js.map +1 -1
- package/package.json +1 -3
- package/react-native-smallcase-gateway.podspec +2 -2
- package/src/SmallcaseGateway.js +16 -0
- package/CHANGELOG.md +0 -591
package/android/build.gradle
CHANGED
|
@@ -149,7 +149,7 @@ def kotlin_version = getExtOrDefault('kotlinVersion')
|
|
|
149
149
|
dependencies {
|
|
150
150
|
//noinspection GradleDynamicVersion
|
|
151
151
|
implementation 'com.facebook.react:react-native:+' // From node_modules
|
|
152
|
-
implementation 'com.smallcase.gateway:sdk:
|
|
152
|
+
implementation 'com.smallcase.gateway:sdk:6.0.0'
|
|
153
153
|
implementation 'com.smallcase.loans:sdk:4.0.0'
|
|
154
154
|
implementation "androidx.core:core-ktx:1.3.1"
|
|
155
155
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
@@ -161,9 +161,8 @@ class SmallcaseGatewayModule(reactContext: ReactApplicationContext) : ReactConte
|
|
|
161
161
|
fun launchSmallplug(targetEndpoint: String, params: String, promise: Promise) {
|
|
162
162
|
|
|
163
163
|
SmallcaseGatewaySdk.launchSmallPlug(currentActivity!!, SmallplugData(targetEndpoint, params), object : SmallPlugResponseListener {
|
|
164
|
-
|
|
164
|
+
override fun onFailure(errorCode: Int, errorMessage: String) {
|
|
165
165
|
val err = createErrorJSON(errorCode, errorMessage, null)
|
|
166
|
-
|
|
167
166
|
promise.reject("error", err)
|
|
168
167
|
}
|
|
169
168
|
|
|
@@ -469,15 +468,36 @@ class SmallcaseGatewayModule(reactContext: ReactApplicationContext) : ReactConte
|
|
|
469
468
|
writableMap.putBoolean("success", result.success)
|
|
470
469
|
writableMap.putString("smallcaseAuthToken", result.smallcaseAuthToken)
|
|
471
470
|
|
|
471
|
+
val dataMap = Arguments.createMap()
|
|
472
|
+
userInfoToWritableMap(result.userInfo)?.let {
|
|
473
|
+
dataMap.putMap("userInfo", it)
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
if (dataMap.keySetIterator().hasNextKey()) {
|
|
477
|
+
writableMap.putMap("data", dataMap)
|
|
478
|
+
}
|
|
479
|
+
|
|
472
480
|
return writableMap
|
|
473
481
|
}
|
|
474
482
|
|
|
475
|
-
private fun
|
|
483
|
+
private fun userInfoToWritableMap(userInfo: UserInfo?): WritableMap? {
|
|
484
|
+
if (userInfo == null) return null
|
|
485
|
+
|
|
486
|
+
val map = Arguments.createMap()
|
|
487
|
+
map.putString("number", userInfo.number)
|
|
488
|
+
map.putString("countryCode", userInfo.countryCode)
|
|
489
|
+
return map
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
private fun createErrorJSON(errorCode: Int?, errorMessage: String?, data: Any?): WritableMap {
|
|
476
493
|
val errObj = Arguments.createMap()
|
|
477
494
|
|
|
478
495
|
errorCode?.let { errObj.putInt("errorCode", it) }
|
|
479
496
|
errorMessage?.let { errObj.putString("errorMessage", it) }
|
|
480
|
-
|
|
497
|
+
when (data) {
|
|
498
|
+
is String -> errObj.putString("data", data)
|
|
499
|
+
is WritableMap -> errObj.putMap("data", data)
|
|
500
|
+
}
|
|
481
501
|
|
|
482
502
|
return errObj
|
|
483
503
|
}
|
package/ios/SmallcaseGateway.m
CHANGED
|
@@ -333,40 +333,51 @@ RCT_REMAP_METHOD(launchSmallplug,
|
|
|
333
333
|
|
|
334
334
|
[SCGateway.shared launchSmallPlugWithPresentingController:[[[UIApplication sharedApplication] keyWindow] rootViewController] smallplugData:smallplugData completion:^(id smallplugResponse, NSError * error) {
|
|
335
335
|
|
|
336
|
-
NSMutableDictionary *responseDict = [[NSMutableDictionary alloc] init];
|
|
337
|
-
|
|
338
336
|
if (error != nil) {
|
|
339
337
|
NSLog(@"%@", error.domain);
|
|
340
338
|
double delayInSeconds = 0.5;
|
|
341
339
|
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
|
|
342
340
|
dispatch_after(popTime, dispatch_get_main_queue(), ^(void) {
|
|
343
|
-
NSMutableDictionary *
|
|
344
|
-
[
|
|
345
|
-
[
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
resolve(responseDict);
|
|
349
|
-
return;
|
|
341
|
+
NSMutableDictionary *errorDict = [[NSMutableDictionary alloc] init];
|
|
342
|
+
[errorDict setValue:[NSNumber numberWithInteger:error.code] forKey:@"errorCode"];
|
|
343
|
+
[errorDict setValue:error.domain forKey:@"errorMessage"];
|
|
344
|
+
|
|
345
|
+
reject(@"error", error.domain, error);
|
|
350
346
|
});
|
|
351
347
|
} else {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
[responseDict setValue:[NSNumber numberWithBool:
|
|
357
|
-
|
|
348
|
+
if ([smallplugResponse isKindOfClass:[SmallPlugResult class]]) {
|
|
349
|
+
SmallPlugResult *result = (SmallPlugResult *)smallplugResponse;
|
|
350
|
+
|
|
351
|
+
NSMutableDictionary *responseDict = [[NSMutableDictionary alloc] init];
|
|
352
|
+
[responseDict setValue:[NSNumber numberWithBool:true] forKey:@"success"];
|
|
353
|
+
|
|
354
|
+
if (result.smallcaseAuthToken) {
|
|
355
|
+
[responseDict setValue:result.smallcaseAuthToken forKey:@"smallcaseAuthToken"];
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
// Add userInfo inside data object if available
|
|
359
|
+
if (result.userInfo) {
|
|
360
|
+
NSMutableDictionary *dataDict = [[NSMutableDictionary alloc] init];
|
|
361
|
+
NSMutableDictionary *userInfoDict = [[NSMutableDictionary alloc] init];
|
|
362
|
+
|
|
363
|
+
if (result.userInfo.number) {
|
|
364
|
+
[userInfoDict setValue:result.userInfo.number forKey:@"number"];
|
|
365
|
+
}
|
|
366
|
+
if (result.userInfo.countryCode) {
|
|
367
|
+
[userInfoDict setValue:result.userInfo.countryCode forKey:@"countryCode"];
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
[dataDict setValue:userInfoDict forKey:@"userInfo"];
|
|
371
|
+
[responseDict setValue:dataDict forKey:@"data"];
|
|
372
|
+
}
|
|
358
373
|
|
|
359
374
|
double delayInSeconds = 0.5;
|
|
360
375
|
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
|
|
361
376
|
dispatch_after(popTime, dispatch_get_main_queue(), ^(void) {
|
|
362
|
-
|
|
363
377
|
resolve(responseDict);
|
|
364
|
-
return;
|
|
365
|
-
|
|
366
378
|
});
|
|
367
379
|
}
|
|
368
380
|
}
|
|
369
|
-
|
|
370
381
|
}];
|
|
371
382
|
});
|
|
372
383
|
}
|
|
@@ -405,40 +416,51 @@ RCT_REMAP_METHOD(launchSmallplugWithBranding,
|
|
|
405
416
|
|
|
406
417
|
[SCGateway.shared launchSmallPlugWithPresentingController:[[[UIApplication sharedApplication] keyWindow] rootViewController] smallplugData:smallplugData smallplugUiConfig:smallplugUiConfig completion:^(id smallplugResponse, NSError * error) {
|
|
407
418
|
|
|
408
|
-
NSMutableDictionary *responseDict = [[NSMutableDictionary alloc] init];
|
|
409
|
-
|
|
410
419
|
if (error != nil) {
|
|
411
420
|
NSLog(@"%@", error.domain);
|
|
412
421
|
double delayInSeconds = 0.5;
|
|
413
422
|
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
|
|
414
423
|
dispatch_after(popTime, dispatch_get_main_queue(), ^(void) {
|
|
415
|
-
NSMutableDictionary *
|
|
416
|
-
[
|
|
417
|
-
[
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
resolve(responseDict);
|
|
421
|
-
return;
|
|
424
|
+
NSMutableDictionary *errorDict = [[NSMutableDictionary alloc] init];
|
|
425
|
+
[errorDict setValue:[NSNumber numberWithInteger:error.code] forKey:@"errorCode"];
|
|
426
|
+
[errorDict setValue:error.domain forKey:@"errorMessage"];
|
|
427
|
+
|
|
428
|
+
reject(@"error", error.domain, error);
|
|
422
429
|
});
|
|
423
430
|
} else {
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
[responseDict setValue:[NSNumber numberWithBool:
|
|
429
|
-
|
|
431
|
+
if ([smallplugResponse isKindOfClass:[SmallPlugResult class]]) {
|
|
432
|
+
SmallPlugResult *result = (SmallPlugResult *)smallplugResponse;
|
|
433
|
+
|
|
434
|
+
NSMutableDictionary *responseDict = [[NSMutableDictionary alloc] init];
|
|
435
|
+
[responseDict setValue:[NSNumber numberWithBool:true] forKey:@"success"];
|
|
436
|
+
|
|
437
|
+
if (result.smallcaseAuthToken) {
|
|
438
|
+
[responseDict setValue:result.smallcaseAuthToken forKey:@"smallcaseAuthToken"];
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
// Add userInfo inside data object if available
|
|
442
|
+
if (result.userInfo) {
|
|
443
|
+
NSMutableDictionary *dataDict = [[NSMutableDictionary alloc] init];
|
|
444
|
+
NSMutableDictionary *userInfoDict = [[NSMutableDictionary alloc] init];
|
|
445
|
+
|
|
446
|
+
if (result.userInfo.number) {
|
|
447
|
+
[userInfoDict setValue:result.userInfo.number forKey:@"number"];
|
|
448
|
+
}
|
|
449
|
+
if (result.userInfo.countryCode) {
|
|
450
|
+
[userInfoDict setValue:result.userInfo.countryCode forKey:@"countryCode"];
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
[dataDict setValue:userInfoDict forKey:@"userInfo"];
|
|
454
|
+
[responseDict setValue:dataDict forKey:@"data"];
|
|
455
|
+
}
|
|
430
456
|
|
|
431
457
|
double delayInSeconds = 0.5;
|
|
432
458
|
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
|
|
433
459
|
dispatch_after(popTime, dispatch_get_main_queue(), ^(void) {
|
|
434
|
-
|
|
435
460
|
resolve(responseDict);
|
|
436
|
-
return;
|
|
437
|
-
|
|
438
461
|
});
|
|
439
462
|
}
|
|
440
463
|
}
|
|
441
|
-
|
|
442
464
|
}];
|
|
443
465
|
});
|
|
444
466
|
}
|
|
@@ -39,6 +39,16 @@ const {
|
|
|
39
39
|
* @property {String} backIconColor - color of the back icon
|
|
40
40
|
* @property {Number} backIconOpacity - opacity of the back icon
|
|
41
41
|
*
|
|
42
|
+
* @typedef {Object} UserInfo
|
|
43
|
+
* @property {string} phoneNumber - user's phone number
|
|
44
|
+
* @property {string} phoneCountryCode - user's phone country code
|
|
45
|
+
*
|
|
46
|
+
* @typedef {Object} SmallplugRes
|
|
47
|
+
* @property {true} success
|
|
48
|
+
* @property {string} smallcaseAuthToken
|
|
49
|
+
* @property {Object} data
|
|
50
|
+
* @property {UserInfo} [data.userInfo]
|
|
51
|
+
*
|
|
42
52
|
*/
|
|
43
53
|
|
|
44
54
|
let defaultBrokerList = [];
|
|
@@ -106,9 +116,12 @@ const triggerMfTransaction = async transactionId => {
|
|
|
106
116
|
|
|
107
117
|
/**
|
|
108
118
|
* launches smallcases module
|
|
119
|
+
* On success, resolves with SmallplugRes.
|
|
120
|
+
* On failure, rejects with an error object containing `errorCode`, `errorMessage`, and an optional `data` object with `userInfo`.
|
|
109
121
|
*
|
|
110
122
|
* @param {string} targetEndpoint
|
|
111
123
|
* @param {string} params
|
|
124
|
+
* @returns {Promise<SmallplugRes>}
|
|
112
125
|
*/
|
|
113
126
|
const launchSmallplug = async (targetEndpoint, params) => {
|
|
114
127
|
const safeEndpoint = typeof targetEndpoint === 'string' ? targetEndpoint : '';
|
|
@@ -118,6 +131,8 @@ const launchSmallplug = async (targetEndpoint, params) => {
|
|
|
118
131
|
|
|
119
132
|
/**
|
|
120
133
|
* launches smallcases module
|
|
134
|
+
* On success, resolves with SmallplugRes.
|
|
135
|
+
* On failure, rejects with an error object containing `errorCode`, `errorMessage`, and an optional `data` object with `userInfo`.
|
|
121
136
|
*
|
|
122
137
|
* @param {string} targetEndpoint
|
|
123
138
|
* @param {string} params
|
|
@@ -125,6 +140,7 @@ const launchSmallplug = async (targetEndpoint, params) => {
|
|
|
125
140
|
* @param {number} headerOpacity
|
|
126
141
|
* @param {string} backIconColor
|
|
127
142
|
* @param {number} backIconOpacity
|
|
143
|
+
* @returns {Promise<SmallplugRes>}
|
|
128
144
|
*/
|
|
129
145
|
const launchSmallplugWithBranding = async (targetEndpoint, params, headerColor, headerOpacity, backIconColor, backIconOpacity) => {
|
|
130
146
|
const safeEndpoint = typeof targetEndpoint === 'string' ? targetEndpoint : '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_constants","_util","_package","SmallcaseGateway","SmallcaseGatewayNative","NativeModules","defaultBrokerList","setConfigEnvironment","envConfig","safeConfig","safeObject","setHybridSdkVersion","version","brokerList","gatewayName","isLeprechaun","isAmoEnabled","environmentName","safeIsLeprechaun","Boolean","safeIsAmoEnabled","safeBrokerList","Array","isArray","safeGatewayName","safeEnvName","ENV","PROD","init","sdkToken","safeToken","triggerTransaction","transactionId","utmParams","safeUtm","safeId","length","triggerMfTransaction","console","warn","safeTransactionId","launchSmallplug","targetEndpoint","params","safeEndpoint","safeParams","launchSmallplugWithBranding","headerColor","headerOpacity","backIconColor","backIconOpacity","safeHeaderColor","platformSpecificColorHex","safeHeaderOpacity","safeBackIconColor","safeBackIconOpacity","logoutUser","showOrders","triggerLeadGen","userDetails","triggerLeadGenWithStatus","triggerLeadGenWithLoginCta","showLoginCta","safeShowLoginCta","archiveSmallcase","iscid","safeIscid","getSdkVersion","_default","exports","default"],"sources":["SmallcaseGateway.js"],"sourcesContent":["import { NativeModules, Platform } from 'react-native';\nimport { ENV } from './constants';\nimport { safeObject, platformSpecificColorHex } from './util';\nimport { version } from '../package.json';\nconst { SmallcaseGateway: SmallcaseGatewayNative } = NativeModules;\n\n/**\n *\n * @typedef {Object} envConfig\n * @property {string} gatewayName - unique name on consumer\n * @property {boolean} isLeprechaun - leprechaun mode toggle\n * @property {boolean} isAmoEnabled - support AMO (subject to broker support)\n * @property {Array<string>} brokerList - list of broker names\n * @property {'production' | 'staging' | 'development'} environmentName - environment name\n *\n * @typedef {Object} transactionRes\n * @property {string} data - response data\n * @property {boolean} success - success flag\n * @property {Number} [errorCode] - error code\n * @property {string} transaction - transaction name\n *\n * @typedef {Object} userDetails\n * @property {String} name - name of user\n * @property {String} email - email of user\n * @property {String} contact - contact of user\n * @property {String} pinCode - pin-code of user\n *\n * @typedef {Object} SmallplugUiConfig\n * @property {String} headerColor - color of the header background\n * @property {Number} headerOpacity - opacity of the header background\n * @property {String} backIconColor - color of the back icon\n * @property {Number} backIconOpacity - opacity of the back icon\n *\n */\n\nlet defaultBrokerList = [];\n\n/**\n * configure the sdk with\n * @param {envConfig} envConfig\n */\nconst setConfigEnvironment = async (envConfig) => {\n const safeConfig = safeObject(envConfig);\n\n await SmallcaseGatewayNative.setHybridSdkVersion(version);\n\n const {\n brokerList,\n gatewayName,\n isLeprechaun,\n isAmoEnabled,\n environmentName,\n } = safeConfig;\n\n const safeIsLeprechaun = Boolean(isLeprechaun);\n const safeIsAmoEnabled = Boolean(isAmoEnabled);\n const safeBrokerList = Array.isArray(brokerList) ? brokerList : [];\n const safeGatewayName = typeof gatewayName === 'string' ? gatewayName : '';\n const safeEnvName =\n typeof environmentName === 'string' ? environmentName : ENV.PROD;\n\n defaultBrokerList = safeBrokerList;\n\n await SmallcaseGatewayNative.setConfigEnvironment(\n safeEnvName,\n safeGatewayName,\n safeIsLeprechaun,\n safeIsAmoEnabled,\n safeBrokerList\n );\n};\n\n/**\n * initialize sdk with a session\n *\n * note: this must be called after `setConfigEnvironment()`\n * @param {string} sdkToken\n */\nconst init = async (sdkToken) => {\n const safeToken = typeof sdkToken === 'string' ? sdkToken : '';\n return SmallcaseGatewayNative.init(safeToken);\n};\n\n/**\n * triggers a transaction with a transaction id\n *\n * @param {string} transactionId\n * @param {Object} [utmParams]\n * @param {Array<string>} [brokerList]\n * @returns {Promise<transactionRes>}\n */\nconst triggerTransaction = async (transactionId, utmParams, brokerList) => {\n const safeUtm = safeObject(utmParams);\n const safeId = typeof transactionId === 'string' ? transactionId : '';\n\n const safeBrokerList =\n Array.isArray(brokerList) && brokerList.length\n ? brokerList\n : defaultBrokerList;\n\n return SmallcaseGatewayNative.triggerTransaction(\n safeId,\n safeUtm,\n safeBrokerList\n );\n};\n\n/**\n * triggers a transaction with a transaction id\n * @deprecated triggerMfTransaction will be removed soon. Please use triggerTransaction.\n * @param {string} transactionId\n * @returns {Promise<transactionRes>}\n */\nconst triggerMfTransaction = async (transactionId) => {\n console.warn(\n 'Calling deprecated function! triggerMfTransaction will be removed soon. Please use triggerTransaction.'\n );\n const safeTransactionId =\n typeof transactionId === 'string' ? transactionId : '';\n\n return SmallcaseGatewayNative.triggerMfTransaction(safeTransactionId);\n};\n\n/**\n * launches smallcases module\n *\n * @param {string} targetEndpoint\n * @param {string} params\n */\nconst launchSmallplug = async (targetEndpoint, params) => {\n const safeEndpoint = typeof targetEndpoint === 'string' ? targetEndpoint : '';\n const safeParams = typeof params === 'string' ? params : '';\n\n return SmallcaseGatewayNative.launchSmallplug(safeEndpoint, safeParams);\n};\n\n/**\n * launches smallcases module\n *\n * @param {string} targetEndpoint\n * @param {string} params\n * @param {string} headerColor\n * @param {number} headerOpacity\n * @param {string} backIconColor\n * @param {number} backIconOpacity\n */\nconst launchSmallplugWithBranding = async (\n targetEndpoint,\n params,\n headerColor,\n headerOpacity,\n backIconColor,\n backIconOpacity\n) => {\n const safeEndpoint = typeof targetEndpoint === 'string' ? targetEndpoint : '';\n const safeParams = typeof params === 'string' ? params : '';\n const safeHeaderColor =\n typeof headerColor === 'string'\n ? headerColor\n : platformSpecificColorHex('2F363F');\n const safeHeaderOpacity =\n typeof headerOpacity === 'number' ? headerOpacity : 1;\n const safeBackIconColor =\n typeof backIconColor === 'string'\n ? backIconColor\n : platformSpecificColorHex('FFFFFF');\n const safeBackIconOpacity =\n typeof backIconOpacity === 'number' ? backIconOpacity : 1;\n\nreturn SmallcaseGatewayNative.launchSmallplugWithBranding(\n safeEndpoint,\n safeParams,\n safeHeaderColor,\n safeHeaderOpacity,\n safeBackIconColor,\n safeBackIconOpacity\n );\n};\n\n/**\n * Logs the user out and removes the web session.\n *\n * This promise will be rejected if logout was unsuccessful\n *\n * @returns {Promise}\n */\nconst logoutUser = async () => {\n return SmallcaseGatewayNative.logoutUser();\n};\n\n/**\n * This will display a list of all the orders that a user recently placed.\n * This includes pending, successful, and failed orders.\n * @returns\n */\nconst showOrders = async () => {\n return SmallcaseGatewayNative.showOrders();\n};\n\n/**\n * triggers the lead gen flow\n *\n * @param {userDetails} [userDetails]\n * @param {Object} [utmParams]\n */\nconst triggerLeadGen = (userDetails, utmParams) => {\n const safeParams = safeObject(userDetails);\n const safeUtm = safeObject(utmParams);\n\n return SmallcaseGatewayNative.triggerLeadGen(safeParams, safeUtm);\n};\n\n/**\n * triggers the lead gen flow\n *\n * @param {userDetails} [userDetails]\n * * @returns {Promise}\n */\nconst triggerLeadGenWithStatus = async (userDetails) => {\n const safeParams = safeObject(userDetails);\n\n return SmallcaseGatewayNative.triggerLeadGenWithStatus(safeParams);\n};\n\n/**\n * triggers the lead gen flow with an option of \"login here\" cta\n *\n * @param {userDetails} [userDetails]\n * @param {Object} [utmParams]\n * @param {boolean} [showLoginCta]\n * @returns {Promise}\n */\nconst triggerLeadGenWithLoginCta = async (\n userDetails,\n utmParams,\n showLoginCta\n) => {\n const safeParams = safeObject(userDetails);\n const safeUtm = safeObject(utmParams);\n const safeShowLoginCta = Boolean(showLoginCta);\n\n return SmallcaseGatewayNative.triggerLeadGenWithLoginCta(\n safeParams,\n safeUtm,\n safeShowLoginCta\n );\n};\n\n/**\n * Marks a smallcase as archived\n *\n * @param {String} iscid\n */\nconst archiveSmallcase = async (iscid) => {\n const safeIscid = typeof iscid === 'string' ? iscid : '';\n\n return SmallcaseGatewayNative.archiveSmallcase(safeIscid);\n};\n\n/**\n * Returns the native android/ios and react-native sdk version\n * (internal-tracking)\n * @returns {Promise}\n */\nconst getSdkVersion = async () => {\n return SmallcaseGatewayNative.getSdkVersion(version);\n};\n\nconst SmallcaseGateway = {\n init,\n logoutUser,\n triggerLeadGen,\n triggerLeadGenWithStatus,\n triggerLeadGenWithLoginCta,\n archiveSmallcase,\n triggerTransaction,\n triggerMfTransaction,\n setConfigEnvironment,\n launchSmallplug,\n launchSmallplugWithBranding,\n getSdkVersion,\n showOrders,\n};\n\nexport default SmallcaseGateway;"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,MAAM;EAAEI,gBAAgB,EAAEC;AAAuB,CAAC,GAAGC,0BAAa;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAIC,iBAAiB,GAAG,EAAE;;AAE1B;AACA;AACA;AACA;AACA,MAAMC,oBAAoB,GAAG,MAAOC,SAAS,IAAK;EAChD,MAAMC,UAAU,GAAG,IAAAC,gBAAU,EAACF,SAAS,CAAC;EAExC,MAAMJ,sBAAsB,CAACO,mBAAmB,CAACC,gBAAO,CAAC;EAEzD,MAAM;IACJC,UAAU;IACVC,WAAW;IACXC,YAAY;IACZC,YAAY;IACZC;EACF,CAAC,GAAGR,UAAU;EAEd,MAAMS,gBAAgB,GAAGC,OAAO,CAACJ,YAAY,CAAC;EAC9C,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UAAU,EACVX,OAAO,EACP6B,gBACF,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,GAAG,MAAOC,KAAK,IAAK;EACxC,MAAMC,SAAS,GAAG,OAAOD,KAAK,KAAK,QAAQ,GAAGA,KAAK,GAAG,EAAE;EAExD,OAAO7D,sBAAsB,CAAC4D,gBAAgB,CAACE,SAAS,CAAC;AAC3D,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAMC,aAAa,GAAG,MAAAA,CAAA,KAAY;EAChC,OAAO/D,sBAAsB,CAAC+D,aAAa,CAACvD,gBAAO,CAAC;AACtD,CAAC;AAED,MAAMT,gBAAgB,GAAG;EACvByB,IAAI;EACJ4B,UAAU;EACVE,cAAc;EACdE,wBAAwB;EACxBC,0BAA0B;EAC1BG,gBAAgB;EAChBjC,kBAAkB;EAClBM,oBAAoB;EACpB9B,oBAAoB;EACpBkC,eAAe;EACfK,2BAA2B;EAC3BqB,aAAa;EACbV;AACF,CAAC;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEanE,gBAAgB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_constants","_util","_package","SmallcaseGateway","SmallcaseGatewayNative","NativeModules","defaultBrokerList","setConfigEnvironment","envConfig","safeConfig","safeObject","setHybridSdkVersion","version","brokerList","gatewayName","isLeprechaun","isAmoEnabled","environmentName","safeIsLeprechaun","Boolean","safeIsAmoEnabled","safeBrokerList","Array","isArray","safeGatewayName","safeEnvName","ENV","PROD","init","sdkToken","safeToken","triggerTransaction","transactionId","utmParams","safeUtm","safeId","length","triggerMfTransaction","console","warn","safeTransactionId","launchSmallplug","targetEndpoint","params","safeEndpoint","safeParams","launchSmallplugWithBranding","headerColor","headerOpacity","backIconColor","backIconOpacity","safeHeaderColor","platformSpecificColorHex","safeHeaderOpacity","safeBackIconColor","safeBackIconOpacity","logoutUser","showOrders","triggerLeadGen","userDetails","triggerLeadGenWithStatus","triggerLeadGenWithLoginCta","showLoginCta","safeShowLoginCta","archiveSmallcase","iscid","safeIscid","getSdkVersion","_default","exports","default"],"sources":["SmallcaseGateway.js"],"sourcesContent":["import { NativeModules, Platform } from 'react-native';\nimport { ENV } from './constants';\nimport { safeObject, platformSpecificColorHex } from './util';\nimport { version } from '../package.json';\nconst { SmallcaseGateway: SmallcaseGatewayNative } = NativeModules;\n\n/**\n *\n * @typedef {Object} envConfig\n * @property {string} gatewayName - unique name on consumer\n * @property {boolean} isLeprechaun - leprechaun mode toggle\n * @property {boolean} isAmoEnabled - support AMO (subject to broker support)\n * @property {Array<string>} brokerList - list of broker names\n * @property {'production' | 'staging' | 'development'} environmentName - environment name\n *\n * @typedef {Object} transactionRes\n * @property {string} data - response data\n * @property {boolean} success - success flag\n * @property {Number} [errorCode] - error code\n * @property {string} transaction - transaction name\n *\n * @typedef {Object} userDetails\n * @property {String} name - name of user\n * @property {String} email - email of user\n * @property {String} contact - contact of user\n * @property {String} pinCode - pin-code of user\n *\n * @typedef {Object} SmallplugUiConfig\n * @property {String} headerColor - color of the header background\n * @property {Number} headerOpacity - opacity of the header background\n * @property {String} backIconColor - color of the back icon\n * @property {Number} backIconOpacity - opacity of the back icon\n *\n * @typedef {Object} UserInfo\n * @property {string} phoneNumber - user's phone number\n * @property {string} phoneCountryCode - user's phone country code\n *\n * @typedef {Object} SmallplugRes\n * @property {true} success\n * @property {string} smallcaseAuthToken\n * @property {Object} data\n * @property {UserInfo} [data.userInfo]\n *\n */\n\nlet defaultBrokerList = [];\n\n/**\n * configure the sdk with\n * @param {envConfig} envConfig\n */\nconst setConfigEnvironment = async (envConfig) => {\n const safeConfig = safeObject(envConfig);\n\n await SmallcaseGatewayNative.setHybridSdkVersion(version);\n\n const {\n brokerList,\n gatewayName,\n isLeprechaun,\n isAmoEnabled,\n environmentName,\n } = safeConfig;\n\n const safeIsLeprechaun = Boolean(isLeprechaun);\n const safeIsAmoEnabled = Boolean(isAmoEnabled);\n const safeBrokerList = Array.isArray(brokerList) ? brokerList : [];\n const safeGatewayName = typeof gatewayName === 'string' ? gatewayName : '';\n const safeEnvName =\n typeof environmentName === 'string' ? environmentName : ENV.PROD;\n\n defaultBrokerList = safeBrokerList;\n\n await SmallcaseGatewayNative.setConfigEnvironment(\n safeEnvName,\n safeGatewayName,\n safeIsLeprechaun,\n safeIsAmoEnabled,\n safeBrokerList\n );\n};\n\n/**\n * initialize sdk with a session\n *\n * note: this must be called after `setConfigEnvironment()`\n * @param {string} sdkToken\n */\nconst init = async (sdkToken) => {\n const safeToken = typeof sdkToken === 'string' ? sdkToken : '';\n return SmallcaseGatewayNative.init(safeToken);\n};\n\n/**\n * triggers a transaction with a transaction id\n *\n * @param {string} transactionId\n * @param {Object} [utmParams]\n * @param {Array<string>} [brokerList]\n * @returns {Promise<transactionRes>}\n */\nconst triggerTransaction = async (transactionId, utmParams, brokerList) => {\n const safeUtm = safeObject(utmParams);\n const safeId = typeof transactionId === 'string' ? transactionId : '';\n\n const safeBrokerList =\n Array.isArray(brokerList) && brokerList.length\n ? brokerList\n : defaultBrokerList;\n\n return SmallcaseGatewayNative.triggerTransaction(\n safeId,\n safeUtm,\n safeBrokerList\n );\n};\n\n/**\n * triggers a transaction with a transaction id\n * @deprecated triggerMfTransaction will be removed soon. Please use triggerTransaction.\n * @param {string} transactionId\n * @returns {Promise<transactionRes>}\n */\nconst triggerMfTransaction = async (transactionId) => {\n console.warn(\n 'Calling deprecated function! triggerMfTransaction will be removed soon. Please use triggerTransaction.'\n );\n const safeTransactionId =\n typeof transactionId === 'string' ? transactionId : '';\n\n return SmallcaseGatewayNative.triggerMfTransaction(safeTransactionId);\n};\n\n/**\n * launches smallcases module\n * On success, resolves with SmallplugRes.\n * On failure, rejects with an error object containing `errorCode`, `errorMessage`, and an optional `data` object with `userInfo`.\n *\n * @param {string} targetEndpoint\n * @param {string} params\n * @returns {Promise<SmallplugRes>}\n */\nconst launchSmallplug = async (targetEndpoint, params) => {\n const safeEndpoint = typeof targetEndpoint === 'string' ? targetEndpoint : '';\n const safeParams = typeof params === 'string' ? params : '';\n\n return SmallcaseGatewayNative.launchSmallplug(safeEndpoint, safeParams);\n};\n\n/**\n * launches smallcases module\n * On success, resolves with SmallplugRes.\n * On failure, rejects with an error object containing `errorCode`, `errorMessage`, and an optional `data` object with `userInfo`.\n *\n * @param {string} targetEndpoint\n * @param {string} params\n * @param {string} headerColor\n * @param {number} headerOpacity\n * @param {string} backIconColor\n * @param {number} backIconOpacity\n * @returns {Promise<SmallplugRes>}\n */\nconst launchSmallplugWithBranding = async (\n targetEndpoint,\n params,\n headerColor,\n headerOpacity,\n backIconColor,\n backIconOpacity\n) => {\n const safeEndpoint = typeof targetEndpoint === 'string' ? targetEndpoint : '';\n const safeParams = typeof params === 'string' ? params : '';\n const safeHeaderColor =\n typeof headerColor === 'string'\n ? headerColor\n : platformSpecificColorHex('2F363F');\n const safeHeaderOpacity =\n typeof headerOpacity === 'number' ? headerOpacity : 1;\n const safeBackIconColor =\n typeof backIconColor === 'string'\n ? backIconColor\n : platformSpecificColorHex('FFFFFF');\n const safeBackIconOpacity =\n typeof backIconOpacity === 'number' ? backIconOpacity : 1;\n\nreturn SmallcaseGatewayNative.launchSmallplugWithBranding(\n safeEndpoint,\n safeParams,\n safeHeaderColor,\n safeHeaderOpacity,\n safeBackIconColor,\n safeBackIconOpacity\n );\n};\n\n/**\n * Logs the user out and removes the web session.\n *\n * This promise will be rejected if logout was unsuccessful\n *\n * @returns {Promise}\n */\nconst logoutUser = async () => {\n return SmallcaseGatewayNative.logoutUser();\n};\n\n/**\n * This will display a list of all the orders that a user recently placed.\n * This includes pending, successful, and failed orders.\n * @returns\n */\nconst showOrders = async () => {\n return SmallcaseGatewayNative.showOrders();\n};\n\n/**\n * triggers the lead gen flow\n *\n * @param {userDetails} [userDetails]\n * @param {Object} [utmParams]\n */\nconst triggerLeadGen = (userDetails, utmParams) => {\n const safeParams = safeObject(userDetails);\n const safeUtm = safeObject(utmParams);\n\n return SmallcaseGatewayNative.triggerLeadGen(safeParams, safeUtm);\n};\n\n/**\n * triggers the lead gen flow\n *\n * @param {userDetails} [userDetails]\n * * @returns {Promise}\n */\nconst triggerLeadGenWithStatus = async (userDetails) => {\n const safeParams = safeObject(userDetails);\n\n return SmallcaseGatewayNative.triggerLeadGenWithStatus(safeParams);\n};\n\n/**\n * triggers the lead gen flow with an option of \"login here\" cta\n *\n * @param {userDetails} [userDetails]\n * @param {Object} [utmParams]\n * @param {boolean} [showLoginCta]\n * @returns {Promise}\n */\nconst triggerLeadGenWithLoginCta = async (\n userDetails,\n utmParams,\n showLoginCta\n) => {\n const safeParams = safeObject(userDetails);\n const safeUtm = safeObject(utmParams);\n const safeShowLoginCta = Boolean(showLoginCta);\n\n return SmallcaseGatewayNative.triggerLeadGenWithLoginCta(\n safeParams,\n safeUtm,\n safeShowLoginCta\n );\n};\n\n/**\n * Marks a smallcase as archived\n *\n * @param {String} iscid\n */\nconst archiveSmallcase = async (iscid) => {\n const safeIscid = typeof iscid === 'string' ? iscid : '';\n\n return SmallcaseGatewayNative.archiveSmallcase(safeIscid);\n};\n\n/**\n * Returns the native android/ios and react-native sdk version\n * (internal-tracking)\n * @returns {Promise}\n */\nconst getSdkVersion = async () => {\n return SmallcaseGatewayNative.getSdkVersion(version);\n};\n\nconst SmallcaseGateway = {\n init,\n logoutUser,\n triggerLeadGen,\n triggerLeadGenWithStatus,\n triggerLeadGenWithLoginCta,\n archiveSmallcase,\n triggerTransaction,\n triggerMfTransaction,\n setConfigEnvironment,\n launchSmallplug,\n launchSmallplugWithBranding,\n getSdkVersion,\n showOrders,\n};\n\nexport default SmallcaseGateway;"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,MAAM;EAAEI,gBAAgB,EAAEC;AAAuB,CAAC,GAAGC,0BAAa;;AAElE;AACA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AA,CAAAC,OAAA,GAEanE,gBAAgB","ignoreList":[]}
|
|
@@ -33,6 +33,16 @@ const {
|
|
|
33
33
|
* @property {String} backIconColor - color of the back icon
|
|
34
34
|
* @property {Number} backIconOpacity - opacity of the back icon
|
|
35
35
|
*
|
|
36
|
+
* @typedef {Object} UserInfo
|
|
37
|
+
* @property {string} phoneNumber - user's phone number
|
|
38
|
+
* @property {string} phoneCountryCode - user's phone country code
|
|
39
|
+
*
|
|
40
|
+
* @typedef {Object} SmallplugRes
|
|
41
|
+
* @property {true} success
|
|
42
|
+
* @property {string} smallcaseAuthToken
|
|
43
|
+
* @property {Object} data
|
|
44
|
+
* @property {UserInfo} [data.userInfo]
|
|
45
|
+
*
|
|
36
46
|
*/
|
|
37
47
|
|
|
38
48
|
let defaultBrokerList = [];
|
|
@@ -100,9 +110,12 @@ const triggerMfTransaction = async transactionId => {
|
|
|
100
110
|
|
|
101
111
|
/**
|
|
102
112
|
* launches smallcases module
|
|
113
|
+
* On success, resolves with SmallplugRes.
|
|
114
|
+
* On failure, rejects with an error object containing `errorCode`, `errorMessage`, and an optional `data` object with `userInfo`.
|
|
103
115
|
*
|
|
104
116
|
* @param {string} targetEndpoint
|
|
105
117
|
* @param {string} params
|
|
118
|
+
* @returns {Promise<SmallplugRes>}
|
|
106
119
|
*/
|
|
107
120
|
const launchSmallplug = async (targetEndpoint, params) => {
|
|
108
121
|
const safeEndpoint = typeof targetEndpoint === 'string' ? targetEndpoint : '';
|
|
@@ -112,6 +125,8 @@ const launchSmallplug = async (targetEndpoint, params) => {
|
|
|
112
125
|
|
|
113
126
|
/**
|
|
114
127
|
* launches smallcases module
|
|
128
|
+
* On success, resolves with SmallplugRes.
|
|
129
|
+
* On failure, rejects with an error object containing `errorCode`, `errorMessage`, and an optional `data` object with `userInfo`.
|
|
115
130
|
*
|
|
116
131
|
* @param {string} targetEndpoint
|
|
117
132
|
* @param {string} params
|
|
@@ -119,6 +134,7 @@ const launchSmallplug = async (targetEndpoint, params) => {
|
|
|
119
134
|
* @param {number} headerOpacity
|
|
120
135
|
* @param {string} backIconColor
|
|
121
136
|
* @param {number} backIconOpacity
|
|
137
|
+
* @returns {Promise<SmallplugRes>}
|
|
122
138
|
*/
|
|
123
139
|
const launchSmallplugWithBranding = async (targetEndpoint, params, headerColor, headerOpacity, backIconColor, backIconOpacity) => {
|
|
124
140
|
const safeEndpoint = typeof targetEndpoint === 'string' ? targetEndpoint : '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeModules","Platform","ENV","safeObject","platformSpecificColorHex","version","SmallcaseGateway","SmallcaseGatewayNative","defaultBrokerList","setConfigEnvironment","envConfig","safeConfig","setHybridSdkVersion","brokerList","gatewayName","isLeprechaun","isAmoEnabled","environmentName","safeIsLeprechaun","Boolean","safeIsAmoEnabled","safeBrokerList","Array","isArray","safeGatewayName","safeEnvName","PROD","init","sdkToken","safeToken","triggerTransaction","transactionId","utmParams","safeUtm","safeId","length","triggerMfTransaction","console","warn","safeTransactionId","launchSmallplug","targetEndpoint","params","safeEndpoint","safeParams","launchSmallplugWithBranding","headerColor","headerOpacity","backIconColor","backIconOpacity","safeHeaderColor","safeHeaderOpacity","safeBackIconColor","safeBackIconOpacity","logoutUser","showOrders","triggerLeadGen","userDetails","triggerLeadGenWithStatus","triggerLeadGenWithLoginCta","showLoginCta","safeShowLoginCta","archiveSmallcase","iscid","safeIscid","getSdkVersion"],"sources":["SmallcaseGateway.js"],"sourcesContent":["import { NativeModules, Platform } from 'react-native';\nimport { ENV } from './constants';\nimport { safeObject, platformSpecificColorHex } from './util';\nimport { version } from '../package.json';\nconst { SmallcaseGateway: SmallcaseGatewayNative } = NativeModules;\n\n/**\n *\n * @typedef {Object} envConfig\n * @property {string} gatewayName - unique name on consumer\n * @property {boolean} isLeprechaun - leprechaun mode toggle\n * @property {boolean} isAmoEnabled - support AMO (subject to broker support)\n * @property {Array<string>} brokerList - list of broker names\n * @property {'production' | 'staging' | 'development'} environmentName - environment name\n *\n * @typedef {Object} transactionRes\n * @property {string} data - response data\n * @property {boolean} success - success flag\n * @property {Number} [errorCode] - error code\n * @property {string} transaction - transaction name\n *\n * @typedef {Object} userDetails\n * @property {String} name - name of user\n * @property {String} email - email of user\n * @property {String} contact - contact of user\n * @property {String} pinCode - pin-code of user\n *\n * @typedef {Object} SmallplugUiConfig\n * @property {String} headerColor - color of the header background\n * @property {Number} headerOpacity - opacity of the header background\n * @property {String} backIconColor - color of the back icon\n * @property {Number} backIconOpacity - opacity of the back icon\n *\n */\n\nlet defaultBrokerList = [];\n\n/**\n * configure the sdk with\n * @param {envConfig} envConfig\n */\nconst setConfigEnvironment = async (envConfig) => {\n const safeConfig = safeObject(envConfig);\n\n await SmallcaseGatewayNative.setHybridSdkVersion(version);\n\n const {\n brokerList,\n gatewayName,\n isLeprechaun,\n isAmoEnabled,\n environmentName,\n } = safeConfig;\n\n const safeIsLeprechaun = Boolean(isLeprechaun);\n const safeIsAmoEnabled = Boolean(isAmoEnabled);\n const safeBrokerList = Array.isArray(brokerList) ? brokerList : [];\n const safeGatewayName = typeof gatewayName === 'string' ? gatewayName : '';\n const safeEnvName =\n typeof environmentName === 'string' ? environmentName : ENV.PROD;\n\n defaultBrokerList = safeBrokerList;\n\n await SmallcaseGatewayNative.setConfigEnvironment(\n safeEnvName,\n safeGatewayName,\n safeIsLeprechaun,\n safeIsAmoEnabled,\n safeBrokerList\n );\n};\n\n/**\n * initialize sdk with a session\n *\n * note: this must be called after `setConfigEnvironment()`\n * @param {string} sdkToken\n */\nconst init = async (sdkToken) => {\n const safeToken = typeof sdkToken === 'string' ? sdkToken : '';\n return SmallcaseGatewayNative.init(safeToken);\n};\n\n/**\n * triggers a transaction with a transaction id\n *\n * @param {string} transactionId\n * @param {Object} [utmParams]\n * @param {Array<string>} [brokerList]\n * @returns {Promise<transactionRes>}\n */\nconst triggerTransaction = async (transactionId, utmParams, brokerList) => {\n const safeUtm = safeObject(utmParams);\n const safeId = typeof transactionId === 'string' ? transactionId : '';\n\n const safeBrokerList =\n Array.isArray(brokerList) && brokerList.length\n ? brokerList\n : defaultBrokerList;\n\n return SmallcaseGatewayNative.triggerTransaction(\n safeId,\n safeUtm,\n safeBrokerList\n );\n};\n\n/**\n * triggers a transaction with a transaction id\n * @deprecated triggerMfTransaction will be removed soon. Please use triggerTransaction.\n * @param {string} transactionId\n * @returns {Promise<transactionRes>}\n */\nconst triggerMfTransaction = async (transactionId) => {\n console.warn(\n 'Calling deprecated function! triggerMfTransaction will be removed soon. Please use triggerTransaction.'\n );\n const safeTransactionId =\n typeof transactionId === 'string' ? transactionId : '';\n\n return SmallcaseGatewayNative.triggerMfTransaction(safeTransactionId);\n};\n\n/**\n * launches smallcases module\n *\n * @param {string} targetEndpoint\n * @param {string} params\n */\nconst launchSmallplug = async (targetEndpoint, params) => {\n const safeEndpoint = typeof targetEndpoint === 'string' ? targetEndpoint : '';\n const safeParams = typeof params === 'string' ? params : '';\n\n return SmallcaseGatewayNative.launchSmallplug(safeEndpoint, safeParams);\n};\n\n/**\n * launches smallcases module\n *\n * @param {string} targetEndpoint\n * @param {string} params\n * @param {string} headerColor\n * @param {number} headerOpacity\n * @param {string} backIconColor\n * @param {number} backIconOpacity\n */\nconst launchSmallplugWithBranding = async (\n targetEndpoint,\n params,\n headerColor,\n headerOpacity,\n backIconColor,\n backIconOpacity\n) => {\n const safeEndpoint = typeof targetEndpoint === 'string' ? targetEndpoint : '';\n const safeParams = typeof params === 'string' ? params : '';\n const safeHeaderColor =\n typeof headerColor === 'string'\n ? headerColor\n : platformSpecificColorHex('2F363F');\n const safeHeaderOpacity =\n typeof headerOpacity === 'number' ? headerOpacity : 1;\n const safeBackIconColor =\n typeof backIconColor === 'string'\n ? backIconColor\n : platformSpecificColorHex('FFFFFF');\n const safeBackIconOpacity =\n typeof backIconOpacity === 'number' ? backIconOpacity : 1;\n\nreturn SmallcaseGatewayNative.launchSmallplugWithBranding(\n safeEndpoint,\n safeParams,\n safeHeaderColor,\n safeHeaderOpacity,\n safeBackIconColor,\n safeBackIconOpacity\n );\n};\n\n/**\n * Logs the user out and removes the web session.\n *\n * This promise will be rejected if logout was unsuccessful\n *\n * @returns {Promise}\n */\nconst logoutUser = async () => {\n return SmallcaseGatewayNative.logoutUser();\n};\n\n/**\n * This will display a list of all the orders that a user recently placed.\n * This includes pending, successful, and failed orders.\n * @returns\n */\nconst showOrders = async () => {\n return SmallcaseGatewayNative.showOrders();\n};\n\n/**\n * triggers the lead gen flow\n *\n * @param {userDetails} [userDetails]\n * @param {Object} [utmParams]\n */\nconst triggerLeadGen = (userDetails, utmParams) => {\n const safeParams = safeObject(userDetails);\n const safeUtm = safeObject(utmParams);\n\n return SmallcaseGatewayNative.triggerLeadGen(safeParams, safeUtm);\n};\n\n/**\n * triggers the lead gen flow\n *\n * @param {userDetails} [userDetails]\n * * @returns {Promise}\n */\nconst triggerLeadGenWithStatus = async (userDetails) => {\n const safeParams = safeObject(userDetails);\n\n return SmallcaseGatewayNative.triggerLeadGenWithStatus(safeParams);\n};\n\n/**\n * triggers the lead gen flow with an option of \"login here\" cta\n *\n * @param {userDetails} [userDetails]\n * @param {Object} [utmParams]\n * @param {boolean} [showLoginCta]\n * @returns {Promise}\n */\nconst triggerLeadGenWithLoginCta = async (\n userDetails,\n utmParams,\n showLoginCta\n) => {\n const safeParams = safeObject(userDetails);\n const safeUtm = safeObject(utmParams);\n const safeShowLoginCta = Boolean(showLoginCta);\n\n return SmallcaseGatewayNative.triggerLeadGenWithLoginCta(\n safeParams,\n safeUtm,\n safeShowLoginCta\n );\n};\n\n/**\n * Marks a smallcase as archived\n *\n * @param {String} iscid\n */\nconst archiveSmallcase = async (iscid) => {\n const safeIscid = typeof iscid === 'string' ? iscid : '';\n\n return SmallcaseGatewayNative.archiveSmallcase(safeIscid);\n};\n\n/**\n * Returns the native android/ios and react-native sdk version\n * (internal-tracking)\n * @returns {Promise}\n */\nconst getSdkVersion = async () => {\n return SmallcaseGatewayNative.getSdkVersion(version);\n};\n\nconst SmallcaseGateway = {\n init,\n logoutUser,\n triggerLeadGen,\n triggerLeadGenWithStatus,\n triggerLeadGenWithLoginCta,\n archiveSmallcase,\n triggerTransaction,\n triggerMfTransaction,\n setConfigEnvironment,\n launchSmallplug,\n launchSmallplugWithBranding,\n getSdkVersion,\n showOrders,\n};\n\nexport default SmallcaseGateway;"],"mappings":"AAAA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AACtD,SAASC,GAAG,QAAQ,aAAa;AACjC,SAASC,UAAU,EAAEC,wBAAwB,QAAQ,QAAQ;AAC7D,SAASC,OAAO,QAAQ,iBAAiB;AACzC,MAAM;EAAEC,gBAAgB,EAAEC;AAAuB,CAAC,GAAGP,aAAa;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAIQ,iBAAiB,GAAG,EAAE;;AAE1B;AACA;AACA;AACA;AACA,MAAMC,oBAAoB,GAAG,MAAOC,SAAS,IAAK;EAChD,MAAMC,UAAU,GAAGR,UAAU,CAACO,SAAS,CAAC;EAExC,MAAMH,sBAAsB,CAACK,mBAAmB,CAACP,OAAO,CAAC;EAEzD,MAAM;IACJQ,UAAU;IACVC,WAAW;IACXC,YAAY;IACZC,YAAY;IACZC;EACF,CAAC,GAAGN,UAAU;EAEd,MAAMO,gBAAgB,GAAGC,OAAO,CAACJ,YAAY,CAAC;EAC9C,MAAMK,gBAAgB,GAAGD,OAAO,CAACH,YAAY,CAAC;EAC9C,MAAMK,cAAc,GAAGC,KAAK,CAACC,OAAO,CAACV,UAAU,CAAC,GAAGA,UAAU,GAAG,EAAE;EAClE,MAAMW,eAAe,GAAG,OAAOV,WAAW,KAAK,QAAQ,GAAGA,WAAW,GAAG,EAAE;EAC1E,MAAMW,WAAW,GACf,OAAOR,eAAe,KAAK,QAAQ,GAAGA,eAAe,GAAGf,GAAG,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ChC,OAAO1D,sBAAsB,CAAC0D,aAAa,CAAC5D,OAAO,CAAC;AACtD,CAAC;AAED,MAAMC,gBAAgB,GAAG;EACvBqB,IAAI;EACJ2B,UAAU;EACVE,cAAc;EACdE,wBAAwB;EACxBC,0BAA0B;EAC1BG,gBAAgB;EAChBhC,kBAAkB;EAClBM,oBAAoB;EACpB3B,oBAAoB;EACpB+B,eAAe;EACfK,2BAA2B;EAC3BoB,aAAa;EACbV;AACF,CAAC;AAED,eAAejD,gBAAgB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["NativeModules","Platform","ENV","safeObject","platformSpecificColorHex","version","SmallcaseGateway","SmallcaseGatewayNative","defaultBrokerList","setConfigEnvironment","envConfig","safeConfig","setHybridSdkVersion","brokerList","gatewayName","isLeprechaun","isAmoEnabled","environmentName","safeIsLeprechaun","Boolean","safeIsAmoEnabled","safeBrokerList","Array","isArray","safeGatewayName","safeEnvName","PROD","init","sdkToken","safeToken","triggerTransaction","transactionId","utmParams","safeUtm","safeId","length","triggerMfTransaction","console","warn","safeTransactionId","launchSmallplug","targetEndpoint","params","safeEndpoint","safeParams","launchSmallplugWithBranding","headerColor","headerOpacity","backIconColor","backIconOpacity","safeHeaderColor","safeHeaderOpacity","safeBackIconColor","safeBackIconOpacity","logoutUser","showOrders","triggerLeadGen","userDetails","triggerLeadGenWithStatus","triggerLeadGenWithLoginCta","showLoginCta","safeShowLoginCta","archiveSmallcase","iscid","safeIscid","getSdkVersion"],"sources":["SmallcaseGateway.js"],"sourcesContent":["import { NativeModules, Platform } from 'react-native';\nimport { ENV } from './constants';\nimport { safeObject, platformSpecificColorHex } from './util';\nimport { version } from '../package.json';\nconst { SmallcaseGateway: SmallcaseGatewayNative } = NativeModules;\n\n/**\n *\n * @typedef {Object} envConfig\n * @property {string} gatewayName - unique name on consumer\n * @property {boolean} isLeprechaun - leprechaun mode toggle\n * @property {boolean} isAmoEnabled - support AMO (subject to broker support)\n * @property {Array<string>} brokerList - list of broker names\n * @property {'production' | 'staging' | 'development'} environmentName - environment name\n *\n * @typedef {Object} transactionRes\n * @property {string} data - response data\n * @property {boolean} success - success flag\n * @property {Number} [errorCode] - error code\n * @property {string} transaction - transaction name\n *\n * @typedef {Object} userDetails\n * @property {String} name - name of user\n * @property {String} email - email of user\n * @property {String} contact - contact of user\n * @property {String} pinCode - pin-code of user\n *\n * @typedef {Object} SmallplugUiConfig\n * @property {String} headerColor - color of the header background\n * @property {Number} headerOpacity - opacity of the header background\n * @property {String} backIconColor - color of the back icon\n * @property {Number} backIconOpacity - opacity of the back icon\n *\n * @typedef {Object} UserInfo\n * @property {string} phoneNumber - user's phone number\n * @property {string} phoneCountryCode - user's phone country code\n *\n * @typedef {Object} SmallplugRes\n * @property {true} success\n * @property {string} smallcaseAuthToken\n * @property {Object} data\n * @property {UserInfo} [data.userInfo]\n *\n */\n\nlet defaultBrokerList = [];\n\n/**\n * configure the sdk with\n * @param {envConfig} envConfig\n */\nconst setConfigEnvironment = async (envConfig) => {\n const safeConfig = safeObject(envConfig);\n\n await SmallcaseGatewayNative.setHybridSdkVersion(version);\n\n const {\n brokerList,\n gatewayName,\n isLeprechaun,\n isAmoEnabled,\n environmentName,\n } = safeConfig;\n\n const safeIsLeprechaun = Boolean(isLeprechaun);\n const safeIsAmoEnabled = Boolean(isAmoEnabled);\n const safeBrokerList = Array.isArray(brokerList) ? brokerList : [];\n const safeGatewayName = typeof gatewayName === 'string' ? gatewayName : '';\n const safeEnvName =\n typeof environmentName === 'string' ? environmentName : ENV.PROD;\n\n defaultBrokerList = safeBrokerList;\n\n await SmallcaseGatewayNative.setConfigEnvironment(\n safeEnvName,\n safeGatewayName,\n safeIsLeprechaun,\n safeIsAmoEnabled,\n safeBrokerList\n );\n};\n\n/**\n * initialize sdk with a session\n *\n * note: this must be called after `setConfigEnvironment()`\n * @param {string} sdkToken\n */\nconst init = async (sdkToken) => {\n const safeToken = typeof sdkToken === 'string' ? sdkToken : '';\n return SmallcaseGatewayNative.init(safeToken);\n};\n\n/**\n * triggers a transaction with a transaction id\n *\n * @param {string} transactionId\n * @param {Object} [utmParams]\n * @param {Array<string>} [brokerList]\n * @returns {Promise<transactionRes>}\n */\nconst triggerTransaction = async (transactionId, utmParams, brokerList) => {\n const safeUtm = safeObject(utmParams);\n const safeId = typeof transactionId === 'string' ? transactionId : '';\n\n const safeBrokerList =\n Array.isArray(brokerList) && brokerList.length\n ? brokerList\n : defaultBrokerList;\n\n return SmallcaseGatewayNative.triggerTransaction(\n safeId,\n safeUtm,\n safeBrokerList\n );\n};\n\n/**\n * triggers a transaction with a transaction id\n * @deprecated triggerMfTransaction will be removed soon. Please use triggerTransaction.\n * @param {string} transactionId\n * @returns {Promise<transactionRes>}\n */\nconst triggerMfTransaction = async (transactionId) => {\n console.warn(\n 'Calling deprecated function! triggerMfTransaction will be removed soon. Please use triggerTransaction.'\n );\n const safeTransactionId =\n typeof transactionId === 'string' ? transactionId : '';\n\n return SmallcaseGatewayNative.triggerMfTransaction(safeTransactionId);\n};\n\n/**\n * launches smallcases module\n * On success, resolves with SmallplugRes.\n * On failure, rejects with an error object containing `errorCode`, `errorMessage`, and an optional `data` object with `userInfo`.\n *\n * @param {string} targetEndpoint\n * @param {string} params\n * @returns {Promise<SmallplugRes>}\n */\nconst launchSmallplug = async (targetEndpoint, params) => {\n const safeEndpoint = typeof targetEndpoint === 'string' ? targetEndpoint : '';\n const safeParams = typeof params === 'string' ? params : '';\n\n return SmallcaseGatewayNative.launchSmallplug(safeEndpoint, safeParams);\n};\n\n/**\n * launches smallcases module\n * On success, resolves with SmallplugRes.\n * On failure, rejects with an error object containing `errorCode`, `errorMessage`, and an optional `data` object with `userInfo`.\n *\n * @param {string} targetEndpoint\n * @param {string} params\n * @param {string} headerColor\n * @param {number} headerOpacity\n * @param {string} backIconColor\n * @param {number} backIconOpacity\n * @returns {Promise<SmallplugRes>}\n */\nconst launchSmallplugWithBranding = async (\n targetEndpoint,\n params,\n headerColor,\n headerOpacity,\n backIconColor,\n backIconOpacity\n) => {\n const safeEndpoint = typeof targetEndpoint === 'string' ? targetEndpoint : '';\n const safeParams = typeof params === 'string' ? params : '';\n const safeHeaderColor =\n typeof headerColor === 'string'\n ? headerColor\n : platformSpecificColorHex('2F363F');\n const safeHeaderOpacity =\n typeof headerOpacity === 'number' ? headerOpacity : 1;\n const safeBackIconColor =\n typeof backIconColor === 'string'\n ? backIconColor\n : platformSpecificColorHex('FFFFFF');\n const safeBackIconOpacity =\n typeof backIconOpacity === 'number' ? backIconOpacity : 1;\n\nreturn SmallcaseGatewayNative.launchSmallplugWithBranding(\n safeEndpoint,\n safeParams,\n safeHeaderColor,\n safeHeaderOpacity,\n safeBackIconColor,\n safeBackIconOpacity\n );\n};\n\n/**\n * Logs the user out and removes the web session.\n *\n * This promise will be rejected if logout was unsuccessful\n *\n * @returns {Promise}\n */\nconst logoutUser = async () => {\n return SmallcaseGatewayNative.logoutUser();\n};\n\n/**\n * This will display a list of all the orders that a user recently placed.\n * This includes pending, successful, and failed orders.\n * @returns\n */\nconst showOrders = async () => {\n return SmallcaseGatewayNative.showOrders();\n};\n\n/**\n * triggers the lead gen flow\n *\n * @param {userDetails} [userDetails]\n * @param {Object} [utmParams]\n */\nconst triggerLeadGen = (userDetails, utmParams) => {\n const safeParams = safeObject(userDetails);\n const safeUtm = safeObject(utmParams);\n\n return SmallcaseGatewayNative.triggerLeadGen(safeParams, safeUtm);\n};\n\n/**\n * triggers the lead gen flow\n *\n * @param {userDetails} [userDetails]\n * * @returns {Promise}\n */\nconst triggerLeadGenWithStatus = async (userDetails) => {\n const safeParams = safeObject(userDetails);\n\n return SmallcaseGatewayNative.triggerLeadGenWithStatus(safeParams);\n};\n\n/**\n * triggers the lead gen flow with an option of \"login here\" cta\n *\n * @param {userDetails} [userDetails]\n * @param {Object} [utmParams]\n * @param {boolean} [showLoginCta]\n * @returns {Promise}\n */\nconst triggerLeadGenWithLoginCta = async (\n userDetails,\n utmParams,\n showLoginCta\n) => {\n const safeParams = safeObject(userDetails);\n const safeUtm = safeObject(utmParams);\n const safeShowLoginCta = Boolean(showLoginCta);\n\n return SmallcaseGatewayNative.triggerLeadGenWithLoginCta(\n safeParams,\n safeUtm,\n safeShowLoginCta\n );\n};\n\n/**\n * Marks a smallcase as archived\n *\n * @param {String} iscid\n */\nconst archiveSmallcase = async (iscid) => {\n const safeIscid = typeof iscid === 'string' ? iscid : '';\n\n return SmallcaseGatewayNative.archiveSmallcase(safeIscid);\n};\n\n/**\n * Returns the native android/ios and react-native sdk version\n * (internal-tracking)\n * @returns {Promise}\n */\nconst getSdkVersion = async () => {\n return SmallcaseGatewayNative.getSdkVersion(version);\n};\n\nconst SmallcaseGateway = {\n init,\n logoutUser,\n triggerLeadGen,\n triggerLeadGenWithStatus,\n triggerLeadGenWithLoginCta,\n archiveSmallcase,\n triggerTransaction,\n triggerMfTransaction,\n setConfigEnvironment,\n launchSmallplug,\n launchSmallplugWithBranding,\n getSdkVersion,\n showOrders,\n};\n\nexport default SmallcaseGateway;"],"mappings":"AAAA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AACtD,SAASC,GAAG,QAAQ,aAAa;AACjC,SAASC,UAAU,EAAEC,wBAAwB,QAAQ,QAAQ;AAC7D,SAASC,OAAO,QAAQ,iBAAiB;AACzC,MAAM;EAAEC,gBAAgB,EAAEC;AAAuB,CAAC,GAAGP,aAAa;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAIQ,iBAAiB,GAAG,EAAE;;AAE1B;AACA;AACA;AACA;AACA,MAAMC,oBAAoB,GAAG,MAAOC,SAAS,IAAK;EAChD,MAAMC,UAAU,GAAGR,UAAU,CAACO,SAAS,CAAC;EAExC,MAAMH,sBAAsB,CAACK,mBAAmB,CAACP,OAAO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OAAO,GAAG9B,UAAU,CAAC6B,SAAS,CAAC;EACrC,MAAM6B,gBAAgB,GAAG1C,OAAO,CAACyC,YAAY,CAAC;EAE9C,OAAOrD,sBAAsB,CAACoD,0BAA0B,CACtDf,UAAU,EACVX,OAAO,EACP4B,gBACF,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,GAAG,MAAOC,KAAK,IAAK;EACxC,MAAMC,SAAS,GAAG,OAAOD,KAAK,KAAK,QAAQ,GAAGA,KAAK,GAAG,EAAE;EAExD,OAAOxD,sBAAsB,CAACuD,gBAAgB,CAACE,SAAS,CAAC;AAC3D,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAMC,aAAa,GAAG,MAAAA,CAAA,KAAY;EAChC,OAAO1D,sBAAsB,CAAC0D,aAAa,CAAC5D,OAAO,CAAC;AACtD,CAAC;AAED,MAAMC,gBAAgB,GAAG;EACvBqB,IAAI;EACJ2B,UAAU;EACVE,cAAc;EACdE,wBAAwB;EACxBC,0BAA0B;EAC1BG,gBAAgB;EAChBhC,kBAAkB;EAClBM,oBAAoB;EACpB3B,oBAAoB;EACpB+B,eAAe;EACfK,2BAA2B;EAC3BoB,aAAa;EACbV;AACF,CAAC;AAED,eAAejD,gBAAgB","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-smallcase-gateway",
|
|
3
3
|
"title": "React Native Smallcase Gateway",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "7.0.0",
|
|
5
5
|
"description": "smallcase gateway bindings for react native",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"files": [
|
|
@@ -67,8 +67,6 @@
|
|
|
67
67
|
"jest": "^28.1.1",
|
|
68
68
|
"pod-install": "^0.1.0",
|
|
69
69
|
"prettier": "^2.0.5",
|
|
70
|
-
"react": "17.0.2",
|
|
71
|
-
"react-native": "0.68.2",
|
|
72
70
|
"react-native-builder-bob": "^0.18.3",
|
|
73
71
|
"release-it": "^15.0.0",
|
|
74
72
|
"standard-version": "^9.5.0",
|
package/src/SmallcaseGateway.js
CHANGED
|
@@ -31,6 +31,16 @@ const { SmallcaseGateway: SmallcaseGatewayNative } = NativeModules;
|
|
|
31
31
|
* @property {String} backIconColor - color of the back icon
|
|
32
32
|
* @property {Number} backIconOpacity - opacity of the back icon
|
|
33
33
|
*
|
|
34
|
+
* @typedef {Object} UserInfo
|
|
35
|
+
* @property {string} phoneNumber - user's phone number
|
|
36
|
+
* @property {string} phoneCountryCode - user's phone country code
|
|
37
|
+
*
|
|
38
|
+
* @typedef {Object} SmallplugRes
|
|
39
|
+
* @property {true} success
|
|
40
|
+
* @property {string} smallcaseAuthToken
|
|
41
|
+
* @property {Object} data
|
|
42
|
+
* @property {UserInfo} [data.userInfo]
|
|
43
|
+
*
|
|
34
44
|
*/
|
|
35
45
|
|
|
36
46
|
let defaultBrokerList = [];
|
|
@@ -123,9 +133,12 @@ const triggerMfTransaction = async (transactionId) => {
|
|
|
123
133
|
|
|
124
134
|
/**
|
|
125
135
|
* launches smallcases module
|
|
136
|
+
* On success, resolves with SmallplugRes.
|
|
137
|
+
* On failure, rejects with an error object containing `errorCode`, `errorMessage`, and an optional `data` object with `userInfo`.
|
|
126
138
|
*
|
|
127
139
|
* @param {string} targetEndpoint
|
|
128
140
|
* @param {string} params
|
|
141
|
+
* @returns {Promise<SmallplugRes>}
|
|
129
142
|
*/
|
|
130
143
|
const launchSmallplug = async (targetEndpoint, params) => {
|
|
131
144
|
const safeEndpoint = typeof targetEndpoint === 'string' ? targetEndpoint : '';
|
|
@@ -136,6 +149,8 @@ const launchSmallplug = async (targetEndpoint, params) => {
|
|
|
136
149
|
|
|
137
150
|
/**
|
|
138
151
|
* launches smallcases module
|
|
152
|
+
* On success, resolves with SmallplugRes.
|
|
153
|
+
* On failure, rejects with an error object containing `errorCode`, `errorMessage`, and an optional `data` object with `userInfo`.
|
|
139
154
|
*
|
|
140
155
|
* @param {string} targetEndpoint
|
|
141
156
|
* @param {string} params
|
|
@@ -143,6 +158,7 @@ const launchSmallplug = async (targetEndpoint, params) => {
|
|
|
143
158
|
* @param {number} headerOpacity
|
|
144
159
|
* @param {string} backIconColor
|
|
145
160
|
* @param {number} backIconOpacity
|
|
161
|
+
* @returns {Promise<SmallplugRes>}
|
|
146
162
|
*/
|
|
147
163
|
const launchSmallplugWithBranding = async (
|
|
148
164
|
targetEndpoint,
|
package/CHANGELOG.md
DELETED
|
@@ -1,591 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
|
-
|
|
5
|
-
## [6.0.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.2.0...v6.0.0) (2025-11-20)
|
|
6
|
-
|
|
7
|
-
### [5.0.2-rc.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.0.2-rc.2...v5.0.2-rc.3) (2025-07-22)
|
|
8
|
-
|
|
9
|
-
### [5.3.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.3.1...v5.3.2) (2025-11-13)
|
|
10
|
-
|
|
11
|
-
### [5.3.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.2.0...v5.3.1) (2025-10-28)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
### Bug Fixes
|
|
15
|
-
|
|
16
|
-
* update loans SDK dependency to beta version for compatibility ([453385c](https://github.com/smallcase/react-native-smallcase-gateway/commit/453385c736ad57a85f255227dc87ef716e15c49a))
|
|
17
|
-
|
|
18
|
-
### [5.0.2-rc.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.0.2-rc.2...v5.0.2-rc.3) (2025-07-22)
|
|
19
|
-
|
|
20
|
-
## [5.3.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.2.0...v5.3.0) (2025-10-01)
|
|
21
|
-
|
|
22
|
-
### [5.0.2-rc.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.0.2-rc.2...v5.0.2-rc.3) (2025-07-22)
|
|
23
|
-
|
|
24
|
-
## [5.2.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.0.2-rc.2...v5.2.0) (2025-08-14)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
### Features
|
|
28
|
-
|
|
29
|
-
* add smart investing app w/ react-native-0.79.4 ([#102](https://github.com/smallcase/react-native-smallcase-gateway/issues/102)) ([180018e](https://github.com/smallcase/react-native-smallcase-gateway/commit/180018ef04183128fc6e78011ae34755eb5f9323))
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
### Bug Fixes
|
|
33
|
-
|
|
34
|
-
* update iOS bundle identifier and clean up build config ([363f457](https://github.com/smallcase/react-native-smallcase-gateway/commit/363f4576103bd57a301ad84fe773296288969e8c))
|
|
35
|
-
|
|
36
|
-
## [6.0.0-rc.7](https://github.com/smallcase/react-native-smallcase-gateway/compare/v6.0.0-rc.6...v6.0.0-rc.7) (2025-07-09)
|
|
37
|
-
|
|
38
|
-
## [6.0.0-rc.6](https://github.com/smallcase/react-native-smallcase-gateway/compare/v6.0.0-rc.5...v6.0.0-rc.6) (2025-07-09)
|
|
39
|
-
|
|
40
|
-
## [6.0.0-rc.5](https://github.com/smallcase/react-native-smallcase-gateway/compare/v6.0.0-rc.4...v6.0.0-rc.5) (2025-07-09)
|
|
41
|
-
|
|
42
|
-
## [6.0.0-rc.4](https://github.com/smallcase/react-native-smallcase-gateway/compare/v6.0.0-rc.3...v6.0.0-rc.4) (2025-07-09)
|
|
43
|
-
|
|
44
|
-
## [6.0.0-rc.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v6.0.0-rc.2...v6.0.0-rc.3) (2025-07-09)
|
|
45
|
-
|
|
46
|
-
## [6.0.0-rc.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v6.0.0-rc.0...v6.0.0-rc.2) (2025-07-09)
|
|
47
|
-
|
|
48
|
-
## [6.0.0-rc.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.1.0-rc.3...v6.0.0-rc.0) (2025-07-09)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
### Features
|
|
52
|
-
|
|
53
|
-
* **release:** add 'release:major:rc' script for prerelease management ([5602fa6](https://github.com/smallcase/react-native-smallcase-gateway/commit/5602fa62bf7f0e24d27353b2b93ebdfaea11466d))
|
|
54
|
-
|
|
55
|
-
## [5.1.0-rc.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.1.0-rc.2...v5.1.0-rc.3) (2025-07-01)
|
|
56
|
-
|
|
57
|
-
## [5.1.0-rc.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.1.0-rc.1...v5.1.0-rc.2) (2025-07-01)
|
|
58
|
-
|
|
59
|
-
## [5.1.0-rc.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.0.1-native-SCGateway-webview-4.1.3-389-release...v5.1.0-rc.1) (2025-06-20)
|
|
60
|
-
|
|
61
|
-
### [5.0.1-native-SCGateway-webview-4.1.3-389-release](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.0.1-native-SCGateway-webview-4.1.3-388-release...v5.0.1-native-SCGateway-webview-4.1.3-389-release) (2025-06-18)
|
|
62
|
-
|
|
63
|
-
### [5.0.1-native-SCGateway-webview-4.1.3-388-release](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.0.1...v5.0.1-native-SCGateway-webview-4.1.3-388-release) (2025-06-16)
|
|
64
|
-
|
|
65
|
-
## [5.1.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.0.2-rc.2...v5.1.0) (2025-08-14)
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
### Features
|
|
69
|
-
|
|
70
|
-
* add smart investing app w/ react-native-0.79.4 ([#102](https://github.com/smallcase/react-native-smallcase-gateway/issues/102)) ([180018e](https://github.com/smallcase/react-native-smallcase-gateway/commit/180018ef04183128fc6e78011ae34755eb5f9323))
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
### Bug Fixes
|
|
74
|
-
|
|
75
|
-
* update iOS bundle identifier and clean up build config ([363f457](https://github.com/smallcase/react-native-smallcase-gateway/commit/363f4576103bd57a301ad84fe773296288969e8c))
|
|
76
|
-
|
|
77
|
-
## [6.0.0-rc.7](https://github.com/smallcase/react-native-smallcase-gateway/compare/v6.0.0-rc.6...v6.0.0-rc.7) (2025-07-09)
|
|
78
|
-
|
|
79
|
-
## [6.0.0-rc.6](https://github.com/smallcase/react-native-smallcase-gateway/compare/v6.0.0-rc.5...v6.0.0-rc.6) (2025-07-09)
|
|
80
|
-
|
|
81
|
-
## [6.0.0-rc.5](https://github.com/smallcase/react-native-smallcase-gateway/compare/v6.0.0-rc.4...v6.0.0-rc.5) (2025-07-09)
|
|
82
|
-
|
|
83
|
-
## [6.0.0-rc.4](https://github.com/smallcase/react-native-smallcase-gateway/compare/v6.0.0-rc.3...v6.0.0-rc.4) (2025-07-09)
|
|
84
|
-
|
|
85
|
-
## [6.0.0-rc.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v6.0.0-rc.2...v6.0.0-rc.3) (2025-07-09)
|
|
86
|
-
|
|
87
|
-
## [6.0.0-rc.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v6.0.0-rc.0...v6.0.0-rc.2) (2025-07-09)
|
|
88
|
-
|
|
89
|
-
## [6.0.0-rc.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.1.0-rc.3...v6.0.0-rc.0) (2025-07-09)
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
### Features
|
|
93
|
-
|
|
94
|
-
* **release:** add 'release:major:rc' script for prerelease management ([5602fa6](https://github.com/smallcase/react-native-smallcase-gateway/commit/5602fa62bf7f0e24d27353b2b93ebdfaea11466d))
|
|
95
|
-
|
|
96
|
-
## [5.1.0-rc.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.1.0-rc.2...v5.1.0-rc.3) (2025-07-01)
|
|
97
|
-
|
|
98
|
-
## [5.1.0-rc.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.1.0-rc.1...v5.1.0-rc.2) (2025-07-01)
|
|
99
|
-
|
|
100
|
-
## [5.1.0-rc.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.0.1-native-SCGateway-webview-4.1.3-389-release...v5.1.0-rc.1) (2025-06-20)
|
|
101
|
-
|
|
102
|
-
### [5.0.1-native-SCGateway-webview-4.1.3-389-release](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.0.1-native-SCGateway-webview-4.1.3-388-release...v5.0.1-native-SCGateway-webview-4.1.3-389-release) (2025-06-18)
|
|
103
|
-
|
|
104
|
-
### [5.0.1-native-SCGateway-webview-4.1.3-388-release](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.0.1...v5.0.1-native-SCGateway-webview-4.1.3-388-release) (2025-06-16)
|
|
105
|
-
|
|
106
|
-
## [6.0.0-rc.7](https://github.com/smallcase/react-native-smallcase-gateway/compare/v6.0.0-rc.6...v6.0.0-rc.7) (2025-07-09)
|
|
107
|
-
|
|
108
|
-
## [6.0.0-rc.6](https://github.com/smallcase/react-native-smallcase-gateway/compare/v6.0.0-rc.5...v6.0.0-rc.6) (2025-07-09)
|
|
109
|
-
|
|
110
|
-
## [6.0.0-rc.5](https://github.com/smallcase/react-native-smallcase-gateway/compare/v6.0.0-rc.4...v6.0.0-rc.5) (2025-07-09)
|
|
111
|
-
|
|
112
|
-
## [6.0.0-rc.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v6.0.0-rc.2...v6.0.0-rc.3) (2025-07-09)
|
|
113
|
-
|
|
114
|
-
## [6.0.0-rc.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v6.0.0-rc.0...v6.0.0-rc.2) (2025-07-09)
|
|
115
|
-
|
|
116
|
-
## [6.0.0-rc.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v6.0.0-rc.0...v6.0.0-rc.1) (2025-07-09)
|
|
117
|
-
|
|
118
|
-
## [6.0.0-rc.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.1.0-rc.3...v6.0.0-rc.0) (2025-07-09)
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
### Features
|
|
122
|
-
|
|
123
|
-
* **release:** add 'release:major:rc' script for prerelease management ([5602fa6](https://github.com/smallcase/react-native-smallcase-gateway/commit/5602fa62bf7f0e24d27353b2b93ebdfaea11466d))
|
|
124
|
-
|
|
125
|
-
## [5.1.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.1.0-rc.3...v5.1.0) (2025-07-07)
|
|
126
|
-
|
|
127
|
-
### [5.0.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.0.0...v5.0.1) (2025-05-05)
|
|
128
|
-
|
|
129
|
-
## [5.0.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v4.3.3...v5.0.0) (2025-01-21)
|
|
130
|
-
|
|
131
|
-
### [4.3.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v4.3.2...v4.3.3) (2024-12-11)
|
|
132
|
-
|
|
133
|
-
### [4.3.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v4.3.1...v4.3.2) (2024-11-20)
|
|
134
|
-
|
|
135
|
-
### [4.3.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v4.3.1-beta-2...v4.3.1) (2024-10-23)
|
|
136
|
-
|
|
137
|
-
## [4.3.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v4.2.0...v4.3.0) (2024-10-16)
|
|
138
|
-
|
|
139
|
-
### [4.2.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v4.2.0...v4.2.1) (2024-09-30)
|
|
140
|
-
|
|
141
|
-
### [3.1.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v3.1.3-internal-1...v3.1.3) (2024-06-19)
|
|
142
|
-
|
|
143
|
-
### [3.1.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v3.1.1...v3.1.2) (2024-05-14)
|
|
144
|
-
|
|
145
|
-
### [3.1.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v3.1.0...v3.1.1) (2024-05-14)
|
|
146
|
-
|
|
147
|
-
## [3.1.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v3.0.1...v3.1.0) (2024-04-26)
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
### Features
|
|
151
|
-
|
|
152
|
-
* **ios:** handle Onboarding intent on bridge ([1afb21a](https://github.com/smallcase/react-native-smallcase-gateway/commit/1afb21a7ee30870ffeebd23e86a486afcf41172c))
|
|
153
|
-
|
|
154
|
-
## [3.0.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v2.3.1...v3.0.0) (2024-01-19)
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
### Features
|
|
158
|
-
|
|
159
|
-
* loans ([1ac32dc](https://github.com/smallcase/react-native-smallcase-gateway/commit/1ac32dc1506b5511ab7924a73bfd2b31d471fe8a))
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
### Bug Fixes
|
|
163
|
-
|
|
164
|
-
* **native:** changed Bridge method responses to conform to ScLoanResponse ([6f1a2b6](https://github.com/smallcase/react-native-smallcase-gateway/commit/6f1a2b621f90b7677d37e6dd2150487f46e3d5a7))
|
|
165
|
-
|
|
166
|
-
### [2.3.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v2.3.0...v2.3.1) (2023-12-08)
|
|
167
|
-
|
|
168
|
-
## [2.3.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v2.2.2...v2.3.0) (2023-10-17)
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
### Features
|
|
172
|
-
|
|
173
|
-
* add service method to ScLoan ([3c25226](https://github.com/smallcase/react-native-smallcase-gateway/commit/3c252265aed8f8279491e139a212cced686da80d))
|
|
174
|
-
* ios loans servicing ([50e7cb2](https://github.com/smallcase/react-native-smallcase-gateway/commit/50e7cb2375fe0d35e227576c207b7552eeb3371a))
|
|
175
|
-
* loans servicing android ([ea3f211](https://github.com/smallcase/react-native-smallcase-gateway/commit/ea3f211f729af45cda2bfb95e53d7259102978dc))
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
### Bug Fixes
|
|
179
|
-
|
|
180
|
-
* update .m file for ios loans refactor changes ([11a2c21](https://github.com/smallcase/react-native-smallcase-gateway/commit/11a2c21990d164928c5f1088eb515d73db6bc09f))
|
|
181
|
-
|
|
182
|
-
### [2.2.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v2.2.1...v2.2.2) (2023-08-03)
|
|
183
|
-
|
|
184
|
-
### [2.2.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v2.1.1...v2.2.1) (2023-07-25)
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
### Features
|
|
188
|
-
|
|
189
|
-
* add artifactory creds in gradle.properties ([4da3731](https://github.com/smallcase/react-native-smallcase-gateway/commit/4da3731d6530d6b8981ba2808b12fafc90fa6b07))
|
|
190
|
-
* android bridge SetupResponse ([a9ef115](https://github.com/smallcase/react-native-smallcase-gateway/commit/a9ef11535640cf13c86cc5a188f649e9afb2bbf6))
|
|
191
|
-
* las internal android ([0d7da50](https://github.com/smallcase/react-native-smallcase-gateway/commit/0d7da503b69f93ce2fe7652c9f219491b41dfc6a))
|
|
192
|
-
* **las:** withdraw servicing method ([3eb4b89](https://github.com/smallcase/react-native-smallcase-gateway/commit/3eb4b8976bc03d05165c54f726749816a98d6b75))
|
|
193
|
-
* **Loans:** added repayment Loans Servicing method ([702eb0b](https://github.com/smallcase/react-native-smallcase-gateway/commit/702eb0b0140679a333183144fd8d0a6a77932024))
|
|
194
|
-
* ScLoan environment ([fc6c1be](https://github.com/smallcase/react-native-smallcase-gateway/commit/fc6c1be22c6e479667af816a250d40ef014c2012))
|
|
195
|
-
* ScLoan withdraw flow ([04b26da](https://github.com/smallcase/react-native-smallcase-gateway/commit/04b26da5de347ff1e954b8779b46540070c36c0b))
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
### Bug Fixes
|
|
199
|
-
|
|
200
|
-
* android bridge loans params ([51e8430](https://github.com/smallcase/react-native-smallcase-gateway/commit/51e84308152a37935cfd23ffc3dd677a24deaa96))
|
|
201
|
-
* android bridge setup response to json ([c1a0bd6](https://github.com/smallcase/react-native-smallcase-gateway/commit/c1a0bd675e4d706b6471fa436e34bd85202ebb43))
|
|
202
|
-
* android bridge setupLoans - scGatewayConfig ([0068c83](https://github.com/smallcase/react-native-smallcase-gateway/commit/0068c834813efe664b56f639c13d39c6c3643a90))
|
|
203
|
-
* android bridge setupLoans versionCode key ([a0d71d3](https://github.com/smallcase/react-native-smallcase-gateway/commit/a0d71d3bb1daf02c88882821483d8c54b91d8a75))
|
|
204
|
-
* bug fixes for WITHDRAW intent ([8e76670](https://github.com/smallcase/react-native-smallcase-gateway/commit/8e76670db5bf78294ce6063be3b774f7c295c06e))
|
|
205
|
-
* environment mismatch ([fdb16dc](https://github.com/smallcase/react-native-smallcase-gateway/commit/fdb16dc83a7e4dd9d2d3b65fb153159f3ee971b9))
|
|
206
|
-
* export ScLoan ([33a1d75](https://github.com/smallcase/react-native-smallcase-gateway/commit/33a1d7504d01dc06b56d1e2c92aa543b28afd046))
|
|
207
|
-
* interaction updation race condition ([390c377](https://github.com/smallcase/react-native-smallcase-gateway/commit/390c377abd2bbca0b0a26c6737f49b390295ccd0))
|
|
208
|
-
* iOS nil error data with SCLoan error ([5f8f589](https://github.com/smallcase/react-native-smallcase-gateway/commit/5f8f589d053a37703aec8b81bd6e9b06a9edaea0))
|
|
209
|
-
* loans internal SDK version number ([6b35d6c](https://github.com/smallcase/react-native-smallcase-gateway/commit/6b35d6c484d90b4340e1ade8e03197bb698baae7))
|
|
210
|
-
* loans setup being called on platform, inc. in js ([6cf7c46](https://github.com/smallcase/react-native-smallcase-gateway/commit/6cf7c462dc2ff2afbc9280698d68a7c40518d58d))
|
|
211
|
-
* **loans:** response parse error in loans setup ([67350f8](https://github.com/smallcase/react-native-smallcase-gateway/commit/67350f821d0af43b290bff72f49188853638c401))
|
|
212
|
-
* refactoring SDK contracts ([c0602ce](https://github.com/smallcase/react-native-smallcase-gateway/commit/c0602ce1ee2b31c4eccbbb43f9a76934f183b8dd))
|
|
213
|
-
* ScGatewayConfig to ScLoanConfig ([ef3a90b](https://github.com/smallcase/react-native-smallcase-gateway/commit/ef3a90bc52ed1206102d1cc3d99996dfc4f5a944))
|
|
214
|
-
* ScLoanConfig to ScLoanInfo for flow methods ([31741c2](https://github.com/smallcase/react-native-smallcase-gateway/commit/31741c2e8dd9f1e654fcf4b7debfe7d7cf7d8852))
|
|
215
|
-
* setup loans environment mismatch ([906e27c](https://github.com/smallcase/react-native-smallcase-gateway/commit/906e27c5343ae2dfb17682af7cdb075c9ddfcde4))
|
|
216
|
-
* unknown envrionment reference ([576c840](https://github.com/smallcase/react-native-smallcase-gateway/commit/576c840355f88f931bd57d4c002f6ffacc35be6d))
|
|
217
|
-
|
|
218
|
-
## [2.2.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v2.1.1...v2.2.0) (2023-07-13)
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
### Features
|
|
222
|
-
|
|
223
|
-
* add artifactory creds in gradle.properties ([4da3731](https://github.com/smallcase/react-native-smallcase-gateway/commit/4da3731d6530d6b8981ba2808b12fafc90fa6b07))
|
|
224
|
-
* android bridge SetupResponse ([a9ef115](https://github.com/smallcase/react-native-smallcase-gateway/commit/a9ef11535640cf13c86cc5a188f649e9afb2bbf6))
|
|
225
|
-
* las internal android ([0d7da50](https://github.com/smallcase/react-native-smallcase-gateway/commit/0d7da503b69f93ce2fe7652c9f219491b41dfc6a))
|
|
226
|
-
* **las:** withdraw servicing method ([3eb4b89](https://github.com/smallcase/react-native-smallcase-gateway/commit/3eb4b8976bc03d05165c54f726749816a98d6b75))
|
|
227
|
-
* **Loans:** added repayment Loans Servicing method ([702eb0b](https://github.com/smallcase/react-native-smallcase-gateway/commit/702eb0b0140679a333183144fd8d0a6a77932024))
|
|
228
|
-
* ScLoan environment ([fc6c1be](https://github.com/smallcase/react-native-smallcase-gateway/commit/fc6c1be22c6e479667af816a250d40ef014c2012))
|
|
229
|
-
* ScLoan withdraw flow ([04b26da](https://github.com/smallcase/react-native-smallcase-gateway/commit/04b26da5de347ff1e954b8779b46540070c36c0b))
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
### Bug Fixes
|
|
233
|
-
|
|
234
|
-
* android bridge loans params ([51e8430](https://github.com/smallcase/react-native-smallcase-gateway/commit/51e84308152a37935cfd23ffc3dd677a24deaa96))
|
|
235
|
-
* android bridge setup response to json ([c1a0bd6](https://github.com/smallcase/react-native-smallcase-gateway/commit/c1a0bd675e4d706b6471fa436e34bd85202ebb43))
|
|
236
|
-
* android bridge setupLoans - scGatewayConfig ([0068c83](https://github.com/smallcase/react-native-smallcase-gateway/commit/0068c834813efe664b56f639c13d39c6c3643a90))
|
|
237
|
-
* android bridge setupLoans versionCode key ([a0d71d3](https://github.com/smallcase/react-native-smallcase-gateway/commit/a0d71d3bb1daf02c88882821483d8c54b91d8a75))
|
|
238
|
-
* bug fixes for WITHDRAW intent ([8e76670](https://github.com/smallcase/react-native-smallcase-gateway/commit/8e76670db5bf78294ce6063be3b774f7c295c06e))
|
|
239
|
-
* environment mismatch ([fdb16dc](https://github.com/smallcase/react-native-smallcase-gateway/commit/fdb16dc83a7e4dd9d2d3b65fb153159f3ee971b9))
|
|
240
|
-
* export ScLoan ([33a1d75](https://github.com/smallcase/react-native-smallcase-gateway/commit/33a1d7504d01dc06b56d1e2c92aa543b28afd046))
|
|
241
|
-
* interaction updation race condition ([390c377](https://github.com/smallcase/react-native-smallcase-gateway/commit/390c377abd2bbca0b0a26c6737f49b390295ccd0))
|
|
242
|
-
* iOS nil error data with SCLoan error ([5f8f589](https://github.com/smallcase/react-native-smallcase-gateway/commit/5f8f589d053a37703aec8b81bd6e9b06a9edaea0))
|
|
243
|
-
* loans internal SDK version number ([6b35d6c](https://github.com/smallcase/react-native-smallcase-gateway/commit/6b35d6c484d90b4340e1ade8e03197bb698baae7))
|
|
244
|
-
* loans setup being called on platform, inc. in js ([6cf7c46](https://github.com/smallcase/react-native-smallcase-gateway/commit/6cf7c462dc2ff2afbc9280698d68a7c40518d58d))
|
|
245
|
-
* **loans:** response parse error in loans setup ([67350f8](https://github.com/smallcase/react-native-smallcase-gateway/commit/67350f821d0af43b290bff72f49188853638c401))
|
|
246
|
-
* refactoring SDK contracts ([c0602ce](https://github.com/smallcase/react-native-smallcase-gateway/commit/c0602ce1ee2b31c4eccbbb43f9a76934f183b8dd))
|
|
247
|
-
* ScGatewayConfig to ScLoanConfig ([ef3a90b](https://github.com/smallcase/react-native-smallcase-gateway/commit/ef3a90bc52ed1206102d1cc3d99996dfc4f5a944))
|
|
248
|
-
* ScLoanConfig to ScLoanInfo for flow methods ([31741c2](https://github.com/smallcase/react-native-smallcase-gateway/commit/31741c2e8dd9f1e654fcf4b7debfe7d7cf7d8852))
|
|
249
|
-
* setup loans environment mismatch ([906e27c](https://github.com/smallcase/react-native-smallcase-gateway/commit/906e27c5343ae2dfb17682af7cdb075c9ddfcde4))
|
|
250
|
-
* unknown envrionment reference ([576c840](https://github.com/smallcase/react-native-smallcase-gateway/commit/576c840355f88f931bd57d4c002f6ffacc35be6d))
|
|
251
|
-
|
|
252
|
-
### [2.1.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v2.0.0...v2.1.1) (2023-05-17)
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
### Bug Fixes
|
|
256
|
-
|
|
257
|
-
* SDK init response undefined ([99a4606](https://github.com/smallcase/react-native-smallcase-gateway/commit/99a460665240dc68b183aabd5bc088a9c8751f24))
|
|
258
|
-
|
|
259
|
-
### [1.7.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.7.0...v1.7.1) (2022-12-01)
|
|
260
|
-
|
|
261
|
-
## [2.1.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v2.0.2...v2.1.0) (2023-04-11)
|
|
262
|
-
|
|
263
|
-
### [2.0.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v2.0.1...v2.0.2) (2023-03-29)
|
|
264
|
-
|
|
265
|
-
### [2.0.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v2.0.0...v2.0.1) (2023-02-13)
|
|
266
|
-
|
|
267
|
-
### [1.7.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.7.0...v1.7.1) (2022-12-01)
|
|
268
|
-
|
|
269
|
-
## [2.0.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.7.0...v2.0.0) (2022-12-06)
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
### Features
|
|
273
|
-
|
|
274
|
-
* delete old files ([d85689e](https://github.com/smallcase/react-native-smallcase-gateway/commit/d85689eac4324b8c877a502d539aee7317eb7715))
|
|
275
|
-
* move blank ios swift source files ([c5f1e6e](https://github.com/smallcase/react-native-smallcase-gateway/commit/c5f1e6ed8588474d4cbab1521b3eece92f0c60c4))
|
|
276
|
-
* move js source files to ts ([2331df6](https://github.com/smallcase/react-native-smallcase-gateway/commit/2331df678fe4e9ec23ada7b40ceb1c4bd36cb6b6))
|
|
277
|
-
* move new android files ([634ba90](https://github.com/smallcase/react-native-smallcase-gateway/commit/634ba90383214571f704cf9bff459a0e2e32ac15))
|
|
278
|
-
* move new config files ([645014f](https://github.com/smallcase/react-native-smallcase-gateway/commit/645014fbd8dfeda35eccb8e012a0a6832446c354))
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
### Bug Fixes
|
|
282
|
-
|
|
283
|
-
* "main" path in package.json ([f29b94b](https://github.com/smallcase/react-native-smallcase-gateway/commit/f29b94b9fa6d3d84952e642bb7077e2c5820998e))
|
|
284
|
-
* add login cta and mf bridge methods to new arch ([ce16ed5](https://github.com/smallcase/react-native-smallcase-gateway/commit/ce16ed5de7610ef38a11e635486a014b3acf5892))
|
|
285
|
-
* index.js imports ([a5272e6](https://github.com/smallcase/react-native-smallcase-gateway/commit/a5272e63f9f23a0d39a2e6f69032dcd2197e099c))
|
|
286
|
-
* ios bridge ([37b900f](https://github.com/smallcase/react-native-smallcase-gateway/commit/37b900f817370de920990fb1cd0dd96f03bd6877))
|
|
287
|
-
* util.ts -> util.js ([3e6f843](https://github.com/smallcase/react-native-smallcase-gateway/commit/3e6f843d2486b2d6982da2045358308e0a3b4ca2))
|
|
288
|
-
* wrong ts usage ([d8125cf](https://github.com/smallcase/react-native-smallcase-gateway/commit/d8125cf55af477011c920e3fd8c33d1f2b65c691))
|
|
289
|
-
### [1.7.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.7.0...v1.7.1) (2022-12-01)
|
|
290
|
-
|
|
291
|
-
## [1.7.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.6.3...v1.7.0) (2022-11-24)
|
|
292
|
-
|
|
293
|
-
### [1.6.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.6.2...v1.6.3) (2022-11-22)
|
|
294
|
-
|
|
295
|
-
### [1.6.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.6.1...v1.6.2) (2022-11-11)
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
### Features
|
|
299
|
-
|
|
300
|
-
* added support for MF Holdings import fix ([0bf5388](https://github.com/smallcase/react-native-smallcase-gateway/commit/0bf5388e1ca6ee5534681dfa35bd3f69c3aefd7a))
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
### Bug Fixes
|
|
304
|
-
|
|
305
|
-
* Data in mf response is null ([bfca609](https://github.com/smallcase/react-native-smallcase-gateway/commit/bfca609a3075a9e45dc63c4fa9e4561ea3b6cd37))
|
|
306
|
-
|
|
307
|
-
### [1.6.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.5.4...v1.6.1) (2022-10-19)
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
### Features
|
|
311
|
-
|
|
312
|
-
* 1014 err msg added ([04bc4de](https://github.com/smallcase/react-native-smallcase-gateway/commit/04bc4de8dcd3a7a37d6f0d15eee5aeeb34419195))
|
|
313
|
-
* add bridge method for mf holdings ([b68b570](https://github.com/smallcase/react-native-smallcase-gateway/commit/b68b57062ed514dc46404f94191c3ee438f184dc))
|
|
314
|
-
|
|
315
|
-
## [1.6.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.5.4...v1.6.0) (2022-09-23)
|
|
316
|
-
|
|
317
|
-
### [1.5.4](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.5.2...v1.5.4) (2022-09-08)
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
### Bug Fixes
|
|
321
|
-
|
|
322
|
-
* removing arm64 arch for iOS simulators && ios sdk version bump ([4bdbe52](https://github.com/smallcase/react-native-smallcase-gateway/commit/4bdbe5208b354a20cc295368a6ad5fb53bc223be))
|
|
323
|
-
|
|
324
|
-
### [1.5.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.5.2...v1.5.3) (2022-08-11)
|
|
325
|
-
|
|
326
|
-
### [1.5.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.5.1...v1.5.2) (2022-08-03)
|
|
327
|
-
|
|
328
|
-
### [1.5.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.5.0...v1.5.1) (2022-08-02)
|
|
329
|
-
|
|
330
|
-
## [1.5.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.4.2...v1.5.0) (2022-08-01)
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
### Features
|
|
334
|
-
|
|
335
|
-
* added error data for transactional errors ([e50e977](https://github.com/smallcase/react-native-smallcase-gateway/commit/e50e977dda6c15f4ed3c4e40932f851e7a3bebce))
|
|
336
|
-
* added signup key for all transactional intents ([6f00f57](https://github.com/smallcase/react-native-smallcase-gateway/commit/6f00f57cf2f24f6896019ca17f7603508477161d))
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
### Bug Fixes
|
|
340
|
-
|
|
341
|
-
* added `data` in DataListener error callback ([0481520](https://github.com/smallcase/react-native-smallcase-gateway/commit/0481520ace7730d137400808b05b037787d73296))
|
|
342
|
-
* build fails on gradle 7 ([28f79fd](https://github.com/smallcase/react-native-smallcase-gateway/commit/28f79fd53dd2400412f7286442f7b6031287c063))
|
|
343
|
-
* data not appended in init and show orders ([07a2a61](https://github.com/smallcase/react-native-smallcase-gateway/commit/07a2a61dd2add4a3cf7b7e4d59a70bb6c750c0bc))
|
|
344
|
-
* error data not being returned for intent_not_enabled_for_broker 3000 error ([53b4bfd](https://github.com/smallcase/react-native-smallcase-gateway/commit/53b4bfd52c7dee4aed647e04493e4d1e23402406))
|
|
345
|
-
* http for artifactory url ([b7934dc](https://github.com/smallcase/react-native-smallcase-gateway/commit/b7934dc28353508f36aa9ec23d1ebac36d74bf29))
|
|
346
|
-
* unsafe params on launchSmallplug ([a6752cb](https://github.com/smallcase/react-native-smallcase-gateway/commit/a6752cb9d41eb0f55c997fa1712a26c0e72d7472))
|
|
347
|
-
|
|
348
|
-
### [1.4.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.4.0...v1.4.2) (2022-07-21)
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
### Bug Fixes
|
|
352
|
-
|
|
353
|
-
* version not null ([479109d](https://github.com/smallcase/react-native-smallcase-gateway/commit/479109d9d491a853f1d09744fe2f36fffb1409dc))
|
|
354
|
-
|
|
355
|
-
### [1.4.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.4.0...v1.4.1) (2022-06-27)
|
|
356
|
-
|
|
357
|
-
## [1.4.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.3.3...v1.4.0) (2022-06-23)
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
### Bug Fixes
|
|
361
|
-
|
|
362
|
-
* android native module for dmbranding ([df816f6](https://github.com/smallcase/react-native-smallcase-gateway/commit/df816f6dfa987dfdfc6297aec362fdb2c7d1e3c3))
|
|
363
|
-
* dm partner branding ([78fb73f](https://github.com/smallcase/react-native-smallcase-gateway/commit/78fb73f56055c74eecebcff03c7560a794c06c7f))
|
|
364
|
-
* iOS null issue & Android def val ([a852397](https://github.com/smallcase/react-native-smallcase-gateway/commit/a852397e2aa4e0ffc6669f0345cbd93f2e63a6b8))
|
|
365
|
-
* method signature for ios native dm ([daedabc](https://github.com/smallcase/react-native-smallcase-gateway/commit/daedabca1180b16c3eacd2c956a51b8d63457435))
|
|
366
|
-
* Platform check for dm branding ([0d80e79](https://github.com/smallcase/react-native-smallcase-gateway/commit/0d80e797b80e4c92e940b2763da81299ba05c9c6))
|
|
367
|
-
* type error ([e2b1394](https://github.com/smallcase/react-native-smallcase-gateway/commit/e2b139426a488a94bfe514265a8599c81ffb31b8))
|
|
368
|
-
|
|
369
|
-
### [1.3.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.3.2...v1.3.3) (2022-06-02)
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
### Bug Fixes
|
|
373
|
-
|
|
374
|
-
* Login Fallback Fragment UI ([36f2285](https://github.com/smallcase/react-native-smallcase-gateway/commit/36f228594b20c57310d6391f38a796a4ba242b6e))
|
|
375
|
-
|
|
376
|
-
### [1.3.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.3.1...v1.3.2) (2022-06-02)
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
### Bug Fixes
|
|
380
|
-
|
|
381
|
-
* LoginFallbackFragment DI injection fail ([e9342ae](https://github.com/smallcase/react-native-smallcase-gateway/commit/e9342aef588f939cb79334edb9a12e0e35a68b7b))
|
|
382
|
-
|
|
383
|
-
### [1.3.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.3.0...v1.3.1) (2022-06-02)
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
### Bug Fixes
|
|
387
|
-
|
|
388
|
-
* missing success flag from transaction success response ([3b5140a](https://github.com/smallcase/react-native-smallcase-gateway/commit/3b5140aa7748a7dd7d271cbfc7ad3b7e767ba56d))
|
|
389
|
-
|
|
390
|
-
## [1.3.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.2.4...v1.3.0) (2022-06-01)
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
### Features
|
|
394
|
-
|
|
395
|
-
* kite native login ([26fca00](https://github.com/smallcase/react-native-smallcase-gateway/commit/26fca00a10c2ed02e3db85180c370c8bb661bc1f))
|
|
396
|
-
|
|
397
|
-
### [1.2.4](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.2.3...v1.2.4) (2022-05-30)
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
### Bug Fixes
|
|
401
|
-
|
|
402
|
-
* excluded arm64 arch for ios simulators ([207e3a6](https://github.com/smallcase/react-native-smallcase-gateway/commit/207e3a62a9764875d61c7888c2a1a9efcd9af796))
|
|
403
|
-
|
|
404
|
-
### [1.2.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.2.2...v1.2.3) (2022-05-30)
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
### Bug Fixes
|
|
408
|
-
|
|
409
|
-
* show orders and gateway rebranding issues ([025221c](https://github.com/smallcase/react-native-smallcase-gateway/commit/025221c9790411451c70c1b598bc8f9471600d8e))
|
|
410
|
-
|
|
411
|
-
### [1.2.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.2.1...v1.2.2) (2022-05-27)
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
### Bug Fixes
|
|
415
|
-
|
|
416
|
-
* show orders not working for leprechaun users ([f7f23a2](https://github.com/smallcase/react-native-smallcase-gateway/commit/f7f23a21ed933fbfa702bc21b6c4dd483653ea42))
|
|
417
|
-
|
|
418
|
-
### [1.2.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.2.0...v1.2.1) (2022-05-27)
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
### Bug Fixes
|
|
422
|
-
|
|
423
|
-
* smallplug crash for blank page ([35996e9](https://github.com/smallcase/react-native-smallcase-gateway/commit/35996e90c6fe97f4d98e004ab7d319f34411db2d))
|
|
424
|
-
|
|
425
|
-
## [1.2.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.1.0...v1.2.0) (2022-05-17)
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
### Features
|
|
429
|
-
|
|
430
|
-
* show orders ([5ea8109](https://github.com/smallcase/react-native-smallcase-gateway/commit/5ea8109911ddd1f38dc666fb6815f10112bcce74))
|
|
431
|
-
|
|
432
|
-
## [1.1.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.0.2...v1.1.0) (2022-04-07)
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
### Bug Fixes
|
|
436
|
-
|
|
437
|
-
* transaction error response in onSuccess callback ([6d36aeb](https://github.com/smallcase/react-native-smallcase-gateway/commit/6d36aebc0af379d7d7782baa7e59bc3092654d76))
|
|
438
|
-
|
|
439
|
-
### [1.0.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.0.0...v1.0.2) (2022-04-04)
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
### Features
|
|
443
|
-
|
|
444
|
-
* log SDK version with transactionId ([8b833b3](https://github.com/smallcase/react-native-smallcase-gateway/commit/8b833b366c0b8f9a030f920134d82c0f84fa6c7f))
|
|
445
|
-
|
|
446
|
-
### [1.0.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.0.0...v1.0.1) (2022-03-15)
|
|
447
|
-
|
|
448
|
-
## [1.0.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v0.10.0...v1.0.0) (2022-01-21)
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
### Features
|
|
452
|
-
|
|
453
|
-
* integrated smallcase module ([f17cd4c](https://github.com/smallcase/react-native-smallcase-gateway/commit/f17cd4caed3881f51393b544ce376e91baec8b2f))
|
|
454
|
-
|
|
455
|
-
## [0.10.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.9.0...v0.10.0) (2022-01-07)
|
|
456
|
-
|
|
457
|
-
## [0.9.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.8.0...v0.9.0) (2022-01-03)
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
### Features
|
|
461
|
-
|
|
462
|
-
* updated android SDK to 3.1.10 and iOS SDK to 3.1.5 ([69d28f5](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/69d28f5b75d7280beae9dd30d5481269f93daff6))
|
|
463
|
-
|
|
464
|
-
## [0.8.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.7.0...v0.8.0) (2021-11-15)
|
|
465
|
-
|
|
466
|
-
## [0.7.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.6.0...v0.7.0) (2021-09-20)
|
|
467
|
-
|
|
468
|
-
## [0.6.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.5.0...v0.6.0) (2021-08-17)
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
### Features
|
|
472
|
-
|
|
473
|
-
* added broker name to transaction responses ([c486fc0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/c486fc0e5d2093b1345ff5c750e94a913579ea9b))
|
|
474
|
-
|
|
475
|
-
## [0.5.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.4.0...v0.5.0) (2021-08-10)
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
### Bug Fixes
|
|
479
|
-
|
|
480
|
-
* ios deployment target reduced to 11.0 ([a02955c](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/a02955c6cff9314b9a0dff17a6b7194b32232dce))
|
|
481
|
-
|
|
482
|
-
## [0.4.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.3.0...v0.4.0) (2021-05-31)
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
### Features
|
|
486
|
-
|
|
487
|
-
* added archiveSmallcase functionality and utm params in triggerLeadGen ([314f7d1](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/314f7d10417031cdef7eaa3360fa87cbce826b5e))
|
|
488
|
-
|
|
489
|
-
## [0.3.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.3.0-alpha.2...v0.3.0) (2021-02-24)
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
### Bug Fixes
|
|
493
|
-
|
|
494
|
-
* add "no_order" error code to handle invalid pending-action orders ([89d19e4](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/89d19e44f2cc8758c6a38715837d1a6ea595e041))
|
|
495
|
-
|
|
496
|
-
## [0.3.0-alpha.2](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.3.0-alpha.1...v0.3.0-alpha.2) (2021-02-15)
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
### Features
|
|
500
|
-
|
|
501
|
-
* add optional list of brokers to show in trigger-transaction (ios) ([f1f0eba](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/f1f0ebaa98ceffbac55df2a791de9bc199fc4597))
|
|
502
|
-
|
|
503
|
-
## [0.3.0-alpha.1](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.3.0-alpha.0...v0.3.0-alpha.1) (2021-02-10)
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
### Bug Fixes
|
|
507
|
-
|
|
508
|
-
* add null safety to trigger-transaction ([d42d1ba](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/d42d1ba8d6c7ef80d6c7b115e0f4d55de0cb20f8))
|
|
509
|
-
|
|
510
|
-
## [0.3.0-alpha.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.2.0...v0.3.0-alpha.0) (2021-02-10)
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
### Features
|
|
514
|
-
|
|
515
|
-
* add optional list of brokers to show in trigger-transaction ([d0c0036](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/d0c003600766991a8df7e8a87cc4f46c75878b2c))
|
|
516
|
-
|
|
517
|
-
## [0.2.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.1.1-alpha.0...v0.2.0) (2021-01-05)
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
### Features
|
|
521
|
-
|
|
522
|
-
* add logout user and signup key in ios ([8cb5b74](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/8cb5b74e2b402253c4e2bfff2886c7e669df8f3b))
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
### Bug Fixes
|
|
526
|
-
|
|
527
|
-
* remove json handling in ios, and pass the response as it is ([67ed038](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/67ed038bf873180fc7ca394a4fba514e83bee66c))
|
|
528
|
-
|
|
529
|
-
### [0.1.1-alpha.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.1.0...v0.1.1-alpha.0) (2020-12-30)
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
### Features
|
|
533
|
-
|
|
534
|
-
* add logout user ([e7ac74f](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/e7ac74fddc2dfe808d8403621fc9a65cc22b8e49))
|
|
535
|
-
|
|
536
|
-
## [0.1.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.29...v0.1.0) (2020-12-09)
|
|
537
|
-
|
|
538
|
-
### [0.0.29](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.28...v0.0.29) (2020-12-04)
|
|
539
|
-
|
|
540
|
-
### [0.0.28](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.27...v0.0.28) (2020-12-04)
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
### Bug Fixes
|
|
544
|
-
|
|
545
|
-
* fix null being taken as object ([2aaefed](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/2aaefedaf79c52532219dbd8a25726a888b9d280))
|
|
546
|
-
|
|
547
|
-
### [0.0.27](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.26...v0.0.27) (2020-11-23)
|
|
548
|
-
|
|
549
|
-
### [0.0.26](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.25...v0.0.26) (2020-11-19)
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
### Bug Fixes
|
|
553
|
-
|
|
554
|
-
* ignore postinstall error ([f4918db](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/f4918db3c12db65a3d4942644e6e1b627a4a2b4d))
|
|
555
|
-
|
|
556
|
-
### [0.0.25](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.24...v0.0.25) (2020-11-19)
|
|
557
|
-
|
|
558
|
-
### [0.0.24](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.23...v0.0.24) (2020-11-19)
|
|
559
|
-
|
|
560
|
-
### [0.0.23](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.22...v0.0.23) (2020-11-19)
|
|
561
|
-
|
|
562
|
-
### [0.0.22](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.21...v0.0.22) (2020-11-13)
|
|
563
|
-
|
|
564
|
-
### Features
|
|
565
|
-
|
|
566
|
-
- hardcode public maven creds for smallcase repo ([572433d](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/572433deed0ded099dfe5f5096f1feb2720eaf27))
|
|
567
|
-
|
|
568
|
-
### Bug Fixes
|
|
569
|
-
|
|
570
|
-
- add missing "order_pending" error msg ([c547f12](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/c547f126677bdf3c28c8fa155bf5655f42f9aae7))
|
|
571
|
-
- make default min sdk version 21 ([baae752](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/baae75233426dfbcd6a8aa7b4c621f31ffcc37bd))
|
|
572
|
-
|
|
573
|
-
### [0.0.21](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.20...v0.0.21) (2020-11-11)
|
|
574
|
-
|
|
575
|
-
### Features
|
|
576
|
-
|
|
577
|
-
- add test framework (jest) ([3e7ed08](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/3e7ed08d0aa1e2d92224eff346016fe352aa644b))
|
|
578
|
-
|
|
579
|
-
### Bug Fixes
|
|
580
|
-
|
|
581
|
-
- add constants.js in npm files ([09cdca8](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/09cdca8cf45d1d2575606cb165921f629d04e4bd))
|
|
582
|
-
|
|
583
|
-
### [0.0.20](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.19...v0.0.20) (2020-11-11)
|
|
584
|
-
|
|
585
|
-
### [0.0.19](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.18...v0.0.19) (2020-11-11)
|
|
586
|
-
|
|
587
|
-
### 0.0.18 (2020-11-11)
|
|
588
|
-
|
|
589
|
-
### Features
|
|
590
|
-
|
|
591
|
-
- add commitizen ([c901563](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/c901563b1bedcd7de4c9839b1e4aa720a076f61c))
|