react-native-smallcase-gateway 6.0.1 → 7.0.1

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.
@@ -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:5.0.1'
152
+ implementation 'com.smallcase.gateway:sdk:6.0.1'
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"
@@ -25,7 +25,6 @@ class SmallcaseGatewayModule(reactContext: ReactApplicationContext) : ReactConte
25
25
 
26
26
  @ReactMethod
27
27
  fun setConfigEnvironment(envName: String, gateway: String, isLeprechaunActive: Boolean, isAmoEnabled: Boolean, preProvidedBrokers: ReadableArray, promise: Promise) {
28
-
29
28
  try {
30
29
  val brokerList = ArrayList<String>()
31
30
  for (index in 0 until preProvidedBrokers.size()) {
@@ -38,6 +37,11 @@ class SmallcaseGatewayModule(reactContext: ReactApplicationContext) : ReactConte
38
37
  val protocol = getProtocol(envName)
39
38
 
40
39
  val env = Environment(gateway = gateway, buildType = protocol, isAmoEnabled = isAmoEnabled, preProvidedBrokers = brokerList, isLeprachaunActive = isLeprechaunActive)
40
+
41
+ // Set userIdentification if provided - For Now, we are not accepting this on Gateway SDK
42
+ // if (!userId.isNullOrEmpty()) {
43
+ // env.userId = userIdentification
44
+ // }
41
45
 
42
46
  SmallcaseGatewaySdk.setConfigEnvironment(environment = env, smallcaseGatewayListeners = object : SmallcaseGatewayListeners {
43
47
  override fun onGatewaySetupSuccessfull() {
@@ -66,8 +70,9 @@ class SmallcaseGatewayModule(reactContext: ReactApplicationContext) : ReactConte
66
70
  }
67
71
 
68
72
  @ReactMethod
69
- fun init(sdkToken: String, promise: Promise) {
70
-
73
+ fun init(sdkToken: String, externalMeta: ReadableMap?, promise: Promise) {
74
+ // externalMeta is accepted but not used on Android (iOS only feature)
75
+ // Extract externalIdentifier if needed in future
71
76
  val initReq = InitRequest(sdkToken)
72
77
  SmallcaseGatewaySdk.init(authRequest = initReq, gatewayInitialisationListener = object : DataListener<InitialisationResponse> {
73
78
  override fun onFailure(errorCode: Int, errorMessage: String, data: String?) {
@@ -161,9 +166,8 @@ class SmallcaseGatewayModule(reactContext: ReactApplicationContext) : ReactConte
161
166
  fun launchSmallplug(targetEndpoint: String, params: String, promise: Promise) {
162
167
 
163
168
  SmallcaseGatewaySdk.launchSmallPlug(currentActivity!!, SmallplugData(targetEndpoint, params), object : SmallPlugResponseListener {
164
- override fun onFailure(errorCode: Int, errorMessage: String) {
169
+ override fun onFailure(errorCode: Int, errorMessage: String) {
165
170
  val err = createErrorJSON(errorCode, errorMessage, null)
166
-
167
171
  promise.reject("error", err)
168
172
  }
169
173
 
@@ -469,15 +473,36 @@ class SmallcaseGatewayModule(reactContext: ReactApplicationContext) : ReactConte
469
473
  writableMap.putBoolean("success", result.success)
470
474
  writableMap.putString("smallcaseAuthToken", result.smallcaseAuthToken)
471
475
 
476
+ val dataMap = Arguments.createMap()
477
+ userInfoToWritableMap(result.userInfo)?.let {
478
+ dataMap.putMap("userInfo", it)
479
+ }
480
+
481
+ if (dataMap.keySetIterator().hasNextKey()) {
482
+ writableMap.putMap("data", dataMap)
483
+ }
484
+
472
485
  return writableMap
473
486
  }
474
487
 
475
- private fun createErrorJSON(errorCode: Int?, errorMessage: String?, data: String?): WritableMap {
488
+ private fun userInfoToWritableMap(userInfo: UserInfo?): WritableMap? {
489
+ if (userInfo == null) return null
490
+
491
+ val map = Arguments.createMap()
492
+ map.putString("number", userInfo.number)
493
+ map.putString("countryCode", userInfo.countryCode)
494
+ return map
495
+ }
496
+
497
+ private fun createErrorJSON(errorCode: Int?, errorMessage: String?, data: Any?): WritableMap {
476
498
  val errObj = Arguments.createMap()
477
499
 
478
500
  errorCode?.let { errObj.putInt("errorCode", it) }
479
501
  errorMessage?.let { errObj.putString("errorMessage", it) }
480
- data?.let { errObj.putString("data", it) }
502
+ when (data) {
503
+ is String -> errObj.putString("data", data)
504
+ is WritableMap -> errObj.putMap("data", data)
505
+ }
481
506
 
482
507
  return errObj
483
508
  }
@@ -53,7 +53,7 @@ RCT_REMAP_METHOD(setConfigEnvironment,
53
53
  isLeprechaunActive:isLeprechaunActive
54
54
  isAmoEnabled:isAmoEnabled];
55
55
 
56
- [SCGateway.shared setupWithConfig: config completion:^(BOOL success,NSError * error) {
56
+ [SCGateway.shared setupWithConfig:config completion:^(BOOL success, NSError *error) {
57
57
  if(success) {
58
58
  resolve(@(YES));
59
59
  } else {
@@ -65,16 +65,19 @@ RCT_REMAP_METHOD(setConfigEnvironment,
65
65
 
66
66
  reject(@"setConfigEnvironment", @"Env setup failed", err);
67
67
  }
68
-
69
68
  }];
70
69
  }
71
70
 
72
71
  //MARK: SDK init
73
72
  RCT_REMAP_METHOD(init,
74
73
  sdkToken:(NSString *)sdkToken
74
+ externalMeta:(NSDictionary *)externalMeta
75
75
  initWithResolver:(RCTPromiseResolveBlock)resolve
76
76
  rejecter:(RCTPromiseRejectBlock)reject) {
77
- [SCGateway.shared initializeGatewayWithSdkToken:sdkToken completion:^(BOOL success, NSError * error) {
77
+
78
+ [SCGateway.shared initializeGatewayWithSdkToken:sdkToken
79
+ externalMeta:externalMeta
80
+ completion:^(BOOL success, NSError *error) {
78
81
  if(success) {
79
82
  resolve(@(YES));
80
83
  } else {
@@ -333,40 +336,51 @@ RCT_REMAP_METHOD(launchSmallplug,
333
336
 
334
337
  [SCGateway.shared launchSmallPlugWithPresentingController:[[[UIApplication sharedApplication] keyWindow] rootViewController] smallplugData:smallplugData completion:^(id smallplugResponse, NSError * error) {
335
338
 
336
- NSMutableDictionary *responseDict = [[NSMutableDictionary alloc] init];
337
-
338
339
  if (error != nil) {
339
340
  NSLog(@"%@", error.domain);
340
341
  double delayInSeconds = 0.5;
341
342
  dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
342
343
  dispatch_after(popTime, dispatch_get_main_queue(), ^(void) {
343
- NSMutableDictionary *responseDict = [[NSMutableDictionary alloc] init];
344
- [responseDict setValue:[NSNumber numberWithBool:false] forKey:@"success"];
345
- [responseDict setValue:[NSNumber numberWithInteger:error.code] forKey:@"errorCode"];
346
- [responseDict setValue:error.domain forKey:@"error"];
347
-
348
- resolve(responseDict);
349
- return;
344
+ NSMutableDictionary *errorDict = [[NSMutableDictionary alloc] init];
345
+ [errorDict setValue:[NSNumber numberWithInteger:error.code] forKey:@"errorCode"];
346
+ [errorDict setValue:error.domain forKey:@"errorMessage"];
347
+
348
+ reject(@"error", error.domain, error);
350
349
  });
351
350
  } else {
352
-
353
- if ([smallplugResponse isKindOfClass: [NSString class]]) {
354
- NSLog(@"%@", smallplugResponse);
355
-
356
- [responseDict setValue:[NSNumber numberWithBool: true] forKey:@"success"];
357
- [responseDict setValue:smallplugResponse forKey:@"smallcaseAuthToken"];
351
+ if ([smallplugResponse isKindOfClass:[SmallPlugResult class]]) {
352
+ SmallPlugResult *result = (SmallPlugResult *)smallplugResponse;
353
+
354
+ NSMutableDictionary *responseDict = [[NSMutableDictionary alloc] init];
355
+ [responseDict setValue:[NSNumber numberWithBool:true] forKey:@"success"];
356
+
357
+ if (result.smallcaseAuthToken) {
358
+ [responseDict setValue:result.smallcaseAuthToken forKey:@"smallcaseAuthToken"];
359
+ }
360
+
361
+ // Add userInfo inside data object if available
362
+ if (result.userInfo) {
363
+ NSMutableDictionary *dataDict = [[NSMutableDictionary alloc] init];
364
+ NSMutableDictionary *userInfoDict = [[NSMutableDictionary alloc] init];
365
+
366
+ if (result.userInfo.number) {
367
+ [userInfoDict setValue:result.userInfo.number forKey:@"number"];
368
+ }
369
+ if (result.userInfo.countryCode) {
370
+ [userInfoDict setValue:result.userInfo.countryCode forKey:@"countryCode"];
371
+ }
372
+
373
+ [dataDict setValue:userInfoDict forKey:@"userInfo"];
374
+ [responseDict setValue:dataDict forKey:@"data"];
375
+ }
358
376
 
359
377
  double delayInSeconds = 0.5;
360
378
  dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
361
379
  dispatch_after(popTime, dispatch_get_main_queue(), ^(void) {
362
-
363
380
  resolve(responseDict);
364
- return;
365
-
366
381
  });
367
382
  }
368
383
  }
369
-
370
384
  }];
371
385
  });
372
386
  }
@@ -405,40 +419,51 @@ RCT_REMAP_METHOD(launchSmallplugWithBranding,
405
419
 
406
420
  [SCGateway.shared launchSmallPlugWithPresentingController:[[[UIApplication sharedApplication] keyWindow] rootViewController] smallplugData:smallplugData smallplugUiConfig:smallplugUiConfig completion:^(id smallplugResponse, NSError * error) {
407
421
 
408
- NSMutableDictionary *responseDict = [[NSMutableDictionary alloc] init];
409
-
410
422
  if (error != nil) {
411
423
  NSLog(@"%@", error.domain);
412
424
  double delayInSeconds = 0.5;
413
425
  dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
414
426
  dispatch_after(popTime, dispatch_get_main_queue(), ^(void) {
415
- NSMutableDictionary *responseDict = [[NSMutableDictionary alloc] init];
416
- [responseDict setValue:[NSNumber numberWithBool:false] forKey:@"success"];
417
- [responseDict setValue:[NSNumber numberWithInteger:error.code] forKey:@"errorCode"];
418
- [responseDict setValue:error.domain forKey:@"error"];
419
-
420
- resolve(responseDict);
421
- return;
427
+ NSMutableDictionary *errorDict = [[NSMutableDictionary alloc] init];
428
+ [errorDict setValue:[NSNumber numberWithInteger:error.code] forKey:@"errorCode"];
429
+ [errorDict setValue:error.domain forKey:@"errorMessage"];
430
+
431
+ reject(@"error", error.domain, error);
422
432
  });
423
433
  } else {
424
-
425
- if ([smallplugResponse isKindOfClass: [NSString class]]) {
426
- NSLog(@"%@", smallplugResponse);
427
-
428
- [responseDict setValue:[NSNumber numberWithBool: true] forKey:@"success"];
429
- [responseDict setValue:smallplugResponse forKey:@"smallcaseAuthToken"];
434
+ if ([smallplugResponse isKindOfClass:[SmallPlugResult class]]) {
435
+ SmallPlugResult *result = (SmallPlugResult *)smallplugResponse;
436
+
437
+ NSMutableDictionary *responseDict = [[NSMutableDictionary alloc] init];
438
+ [responseDict setValue:[NSNumber numberWithBool:true] forKey:@"success"];
439
+
440
+ if (result.smallcaseAuthToken) {
441
+ [responseDict setValue:result.smallcaseAuthToken forKey:@"smallcaseAuthToken"];
442
+ }
443
+
444
+ // Add userInfo inside data object if available
445
+ if (result.userInfo) {
446
+ NSMutableDictionary *dataDict = [[NSMutableDictionary alloc] init];
447
+ NSMutableDictionary *userInfoDict = [[NSMutableDictionary alloc] init];
448
+
449
+ if (result.userInfo.number) {
450
+ [userInfoDict setValue:result.userInfo.number forKey:@"number"];
451
+ }
452
+ if (result.userInfo.countryCode) {
453
+ [userInfoDict setValue:result.userInfo.countryCode forKey:@"countryCode"];
454
+ }
455
+
456
+ [dataDict setValue:userInfoDict forKey:@"userInfo"];
457
+ [responseDict setValue:dataDict forKey:@"data"];
458
+ }
430
459
 
431
460
  double delayInSeconds = 0.5;
432
461
  dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
433
462
  dispatch_after(popTime, dispatch_get_main_queue(), ^(void) {
434
-
435
463
  resolve(responseDict);
436
- return;
437
-
438
464
  });
439
465
  }
440
466
  }
441
-
442
467
  }];
443
468
  });
444
469
  }
@@ -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 = [];
@@ -71,10 +81,13 @@ const setConfigEnvironment = async envConfig => {
71
81
  *
72
82
  * note: this must be called after `setConfigEnvironment()`
73
83
  * @param {string} sdkToken
84
+ * @param {Object} [externalMeta] - external metadata (iOS only, optional)
85
+ * @param {Object} [externalMeta.externalIdentifier] - key-value pairs for external identifiers (e.g., { userId: '123' })
74
86
  */
75
- const init = async sdkToken => {
87
+ const init = async (sdkToken, externalMeta) => {
76
88
  const safeToken = typeof sdkToken === 'string' ? sdkToken : '';
77
- return SmallcaseGatewayNative.init(safeToken);
89
+ const safeExternalMeta = externalMeta && typeof externalMeta === 'object' ? externalMeta : null;
90
+ return SmallcaseGatewayNative.init(safeToken, safeExternalMeta);
78
91
  };
79
92
 
80
93
  /**
@@ -106,9 +119,12 @@ const triggerMfTransaction = async transactionId => {
106
119
 
107
120
  /**
108
121
  * launches smallcases module
122
+ * On success, resolves with SmallplugRes.
123
+ * On failure, rejects with an error object containing `errorCode`, `errorMessage`, and an optional `data` object with `userInfo`.
109
124
  *
110
125
  * @param {string} targetEndpoint
111
126
  * @param {string} params
127
+ * @returns {Promise<SmallplugRes>}
112
128
  */
113
129
  const launchSmallplug = async (targetEndpoint, params) => {
114
130
  const safeEndpoint = typeof targetEndpoint === 'string' ? targetEndpoint : '';
@@ -118,6 +134,8 @@ const launchSmallplug = async (targetEndpoint, params) => {
118
134
 
119
135
  /**
120
136
  * launches smallcases module
137
+ * On success, resolves with SmallplugRes.
138
+ * On failure, rejects with an error object containing `errorCode`, `errorMessage`, and an optional `data` object with `userInfo`.
121
139
  *
122
140
  * @param {string} targetEndpoint
123
141
  * @param {string} params
@@ -125,6 +143,7 @@ const launchSmallplug = async (targetEndpoint, params) => {
125
143
  * @param {number} headerOpacity
126
144
  * @param {string} backIconColor
127
145
  * @param {number} backIconOpacity
146
+ * @returns {Promise<SmallplugRes>}
128
147
  */
129
148
  const launchSmallplugWithBranding = async (targetEndpoint, params, headerColor, headerOpacity, backIconColor, backIconOpacity) => {
130
149
  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,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,GAAGS,cAAG,CAACC,IAAI;EAElErB,iBAAiB,GAAGe,cAAc;EAElC,MAAMjB,sBAAsB,CAACG,oBAAoB,CAC/CkB,WAAW,EACXD,eAAe,EACfN,gBAAgB,EAChBE,gBAAgB,EAChBC,cACF,CAAC;AACH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4B,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","externalMeta","safeToken","safeExternalMeta","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 * @param {Object} [externalMeta] - external metadata (iOS only, optional)\n * @param {Object} [externalMeta.externalIdentifier] - key-value pairs for external identifiers (e.g., { userId: '123' })\n */\nconst init = async (sdkToken, externalMeta) => {\n const safeToken = typeof sdkToken === 'string' ? sdkToken : '';\n const safeExternalMeta = externalMeta && typeof externalMeta === 'object' ? externalMeta : null;\n \n return SmallcaseGatewayNative.init(safeToken, safeExternalMeta);\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;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,IAAIC,iBAAiB,GAAG,EAAE;;AAE1B;AACA;AACA;AACA;AACA,MAAMC,oBAAoB,GAAG,MAAOC,SAAS,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,EAACmD,WAAW,CAAC;EAE1C,OAAOzD,sBAAsB,CAAC0D,wBAAwB,CAACf,UAAU,CAAC;AACpE,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMgB,0BAA0B,GAAG,MAAAA,CACjCF,WAAW,EACX1B,SAAS,EACT6B,YAAY,KACT;EACH,MAAMjB,UAAU,GAAG,IAAArC,gBAAU,EAACmD,WAAW,CAAC;EAC1C,MAAMzB,OAAO,GAAG,IAAA1B,gBAAU,EAACyB,SAAS,CAAC;EACrC,MAAM8B,gBAAgB,GAAG9C,OAAO,CAAC6C,YAAY,CAAC;EAE9C,OAAO5D,sBAAsB,CAAC2D,0BAA0B,CACtDhB,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,OAAO/D,sBAAsB,CAAC8D,gBAAgB,CAACE,SAAS,CAAC;AAC3D,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAMC,aAAa,GAAG,MAAAA,CAAA,KAAY;EAChC,OAAOjE,sBAAsB,CAACiE,aAAa,CAACzD,gBAAO,CAAC;AACtD,CAAC;AAED,MAAMT,gBAAgB,GAAG;EACvByB,IAAI;EACJ8B,UAAU;EACVE,cAAc;EACdE,wBAAwB;EACxBC,0BAA0B;EAC1BG,gBAAgB;EAChBjC,kBAAkB;EAClBM,oBAAoB;EACpBhC,oBAAoB;EACpBoC,eAAe;EACfK,2BAA2B;EAC3BqB,aAAa;EACbV;AACF,CAAC;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEarE,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 = [];
@@ -65,10 +75,13 @@ const setConfigEnvironment = async envConfig => {
65
75
  *
66
76
  * note: this must be called after `setConfigEnvironment()`
67
77
  * @param {string} sdkToken
78
+ * @param {Object} [externalMeta] - external metadata (iOS only, optional)
79
+ * @param {Object} [externalMeta.externalIdentifier] - key-value pairs for external identifiers (e.g., { userId: '123' })
68
80
  */
69
- const init = async sdkToken => {
81
+ const init = async (sdkToken, externalMeta) => {
70
82
  const safeToken = typeof sdkToken === 'string' ? sdkToken : '';
71
- return SmallcaseGatewayNative.init(safeToken);
83
+ const safeExternalMeta = externalMeta && typeof externalMeta === 'object' ? externalMeta : null;
84
+ return SmallcaseGatewayNative.init(safeToken, safeExternalMeta);
72
85
  };
73
86
 
74
87
  /**
@@ -100,9 +113,12 @@ const triggerMfTransaction = async transactionId => {
100
113
 
101
114
  /**
102
115
  * launches smallcases module
116
+ * On success, resolves with SmallplugRes.
117
+ * On failure, rejects with an error object containing `errorCode`, `errorMessage`, and an optional `data` object with `userInfo`.
103
118
  *
104
119
  * @param {string} targetEndpoint
105
120
  * @param {string} params
121
+ * @returns {Promise<SmallplugRes>}
106
122
  */
107
123
  const launchSmallplug = async (targetEndpoint, params) => {
108
124
  const safeEndpoint = typeof targetEndpoint === 'string' ? targetEndpoint : '';
@@ -112,6 +128,8 @@ const launchSmallplug = async (targetEndpoint, params) => {
112
128
 
113
129
  /**
114
130
  * launches smallcases module
131
+ * On success, resolves with SmallplugRes.
132
+ * On failure, rejects with an error object containing `errorCode`, `errorMessage`, and an optional `data` object with `userInfo`.
115
133
  *
116
134
  * @param {string} targetEndpoint
117
135
  * @param {string} params
@@ -119,6 +137,7 @@ const launchSmallplug = async (targetEndpoint, params) => {
119
137
  * @param {number} headerOpacity
120
138
  * @param {string} backIconColor
121
139
  * @param {number} backIconOpacity
140
+ * @returns {Promise<SmallplugRes>}
122
141
  */
123
142
  const launchSmallplugWithBranding = async (targetEndpoint, params, headerColor, headerOpacity, backIconColor, backIconOpacity) => {
124
143
  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,CAACw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AAO1D,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","externalMeta","safeToken","safeExternalMeta","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 * @param {Object} [externalMeta] - external metadata (iOS only, optional)\n * @param {Object} [externalMeta.externalIdentifier] - key-value pairs for external identifiers (e.g., { userId: '123' })\n */\nconst init = async (sdkToken, externalMeta) => {\n const safeToken = typeof sdkToken === 'string' ? sdkToken : '';\n const safeExternalMeta = externalMeta && typeof externalMeta === 'object' ? externalMeta : null;\n \n return SmallcaseGatewayNative.init(safeToken, safeExternalMeta);\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,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EACtD,MAAMb,UAAU,GAAG3C,UAAU,CAACwD,WAAW,CAAC;EAE1C,OAAOpD,sBAAsB,CAACqD,wBAAwB,CAACd,UAAU,CAAC;AACpE,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMe,0BAA0B,GAAG,MAAAA,CACjCF,WAAW,EACXzB,SAAS,EACT4B,YAAY,KACT;EACH,MAAMhB,UAAU,GAAG3C,UAAU,CAACwD,WAAW,CAAC;EAC1C,MAAMxB,OAAO,GAAGhC,UAAU,CAAC+B,SAAS,CAAC;EACrC,MAAM6B,gBAAgB,GAAG5C,OAAO,CAAC2C,YAAY,CAAC;EAE9C,OAAOvD,sBAAsB,CAACsD,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,OAAO1D,sBAAsB,CAACyD,gBAAgB,CAACE,SAAS,CAAC;AAC3D,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAMC,aAAa,GAAG,MAAAA,CAAA,KAAY;EAChC,OAAO5D,sBAAsB,CAAC4D,aAAa,CAAC9D,OAAO,CAAC;AACtD,CAAC;AAED,MAAMC,gBAAgB,GAAG;EACvBqB,IAAI;EACJ6B,UAAU;EACVE,cAAc;EACdE,wBAAwB;EACxBC,0BAA0B;EAC1BG,gBAAgB;EAChBhC,kBAAkB;EAClBM,oBAAoB;EACpB7B,oBAAoB;EACpBiC,eAAe;EACfK,2BAA2B;EAC3BoB,aAAa;EACbV;AACF,CAAC;AAED,eAAenD,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": "6.0.1",
4
+ "version": "7.0.1",
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",
@@ -33,6 +33,6 @@ Pod::Spec.new do |s|
33
33
  s.dependency "ReactCommon/turbomodule/core"
34
34
  end
35
35
 
36
- s.dependency 'SCGateway', '6.1.1'
36
+ s.dependency 'SCGateway', '7.0.1'
37
37
  s.dependency 'SCLoans', '6.0.2'
38
38
  end
@@ -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 = [];
@@ -75,10 +85,14 @@ const setConfigEnvironment = async (envConfig) => {
75
85
  *
76
86
  * note: this must be called after `setConfigEnvironment()`
77
87
  * @param {string} sdkToken
88
+ * @param {Object} [externalMeta] - external metadata (iOS only, optional)
89
+ * @param {Object} [externalMeta.externalIdentifier] - key-value pairs for external identifiers (e.g., { userId: '123' })
78
90
  */
79
- const init = async (sdkToken) => {
91
+ const init = async (sdkToken, externalMeta) => {
80
92
  const safeToken = typeof sdkToken === 'string' ? sdkToken : '';
81
- return SmallcaseGatewayNative.init(safeToken);
93
+ const safeExternalMeta = externalMeta && typeof externalMeta === 'object' ? externalMeta : null;
94
+
95
+ return SmallcaseGatewayNative.init(safeToken, safeExternalMeta);
82
96
  };
83
97
 
84
98
  /**
@@ -123,9 +137,12 @@ const triggerMfTransaction = async (transactionId) => {
123
137
 
124
138
  /**
125
139
  * launches smallcases module
140
+ * On success, resolves with SmallplugRes.
141
+ * On failure, rejects with an error object containing `errorCode`, `errorMessage`, and an optional `data` object with `userInfo`.
126
142
  *
127
143
  * @param {string} targetEndpoint
128
144
  * @param {string} params
145
+ * @returns {Promise<SmallplugRes>}
129
146
  */
130
147
  const launchSmallplug = async (targetEndpoint, params) => {
131
148
  const safeEndpoint = typeof targetEndpoint === 'string' ? targetEndpoint : '';
@@ -136,6 +153,8 @@ const launchSmallplug = async (targetEndpoint, params) => {
136
153
 
137
154
  /**
138
155
  * launches smallcases module
156
+ * On success, resolves with SmallplugRes.
157
+ * On failure, rejects with an error object containing `errorCode`, `errorMessage`, and an optional `data` object with `userInfo`.
139
158
  *
140
159
  * @param {string} targetEndpoint
141
160
  * @param {string} params
@@ -143,6 +162,7 @@ const launchSmallplug = async (targetEndpoint, params) => {
143
162
  * @param {number} headerOpacity
144
163
  * @param {string} backIconColor
145
164
  * @param {number} backIconOpacity
165
+ * @returns {Promise<SmallplugRes>}
146
166
  */
147
167
  const launchSmallplugWithBranding = async (
148
168
  targetEndpoint,
@@ -95,8 +95,10 @@ declare namespace SmallcaseGateway {
95
95
  *
96
96
  * note: this must be called after `setConfigEnvironment()`
97
97
  * @param {string} sdkToken
98
+ * @param {Object} [externalMeta] - external metadata (iOS only, optional)
99
+ * @param {Object} [externalMeta.externalIdentifier] - key-value pairs for external identifiers (e.g., { userId: '123' })
98
100
  */
99
- declare function init(sdkToken: string): unknown;
101
+ declare function init(sdkToken: string, externalMeta?: { externalIdentifier?: { [key: string]: string } }): unknown;
100
102
  /**
101
103
  * Logs the user out and removes the web session.
102
104
  *
package/types/index.d.ts CHANGED
@@ -67,7 +67,7 @@ declare const _default: {
67
67
  authorizeHoldings: string;
68
68
  mfHoldingsImport: string;
69
69
  };
70
- init: (sdkToken: string) => unknown;
70
+ init: (sdkToken: string, externalMeta?: { externalIdentifier?: { [key: string]: string } }) => unknown;
71
71
  logoutUser: () => Promise;
72
72
  triggerLeadGen: (userDetails?: import("./SmallcaseGateway").userDetails, utmParams?: any) => any;
73
73
  triggerLeadGenWithStatus: (userDetails?: import("./SmallcaseGateway").userDetails) => Promise;
package/CHANGELOG.md DELETED
@@ -1,593 +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.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v6.0.0...v6.0.1) (2025-12-06)
6
-
7
- ## [6.0.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.2.0...v6.0.0) (2025-11-20)
8
-
9
- ### [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)
10
-
11
- ### [5.3.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.3.1...v5.3.2) (2025-11-13)
12
-
13
- ### [5.3.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.2.0...v5.3.1) (2025-10-28)
14
-
15
-
16
- ### Bug Fixes
17
-
18
- * update loans SDK dependency to beta version for compatibility ([453385c](https://github.com/smallcase/react-native-smallcase-gateway/commit/453385c736ad57a85f255227dc87ef716e15c49a))
19
-
20
- ### [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)
21
-
22
- ## [5.3.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.2.0...v5.3.0) (2025-10-01)
23
-
24
- ### [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)
25
-
26
- ## [5.2.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.0.2-rc.2...v5.2.0) (2025-08-14)
27
-
28
-
29
- ### Features
30
-
31
- * 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))
32
-
33
-
34
- ### Bug Fixes
35
-
36
- * update iOS bundle identifier and clean up build config ([363f457](https://github.com/smallcase/react-native-smallcase-gateway/commit/363f4576103bd57a301ad84fe773296288969e8c))
37
-
38
- ## [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)
39
-
40
- ## [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)
41
-
42
- ## [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)
43
-
44
- ## [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)
45
-
46
- ## [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)
47
-
48
- ## [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)
49
-
50
- ## [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)
51
-
52
-
53
- ### Features
54
-
55
- * **release:** add 'release:major:rc' script for prerelease management ([5602fa6](https://github.com/smallcase/react-native-smallcase-gateway/commit/5602fa62bf7f0e24d27353b2b93ebdfaea11466d))
56
-
57
- ## [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)
58
-
59
- ## [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)
60
-
61
- ## [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)
62
-
63
- ### [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)
64
-
65
- ### [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)
66
-
67
- ## [5.1.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.0.2-rc.2...v5.1.0) (2025-08-14)
68
-
69
-
70
- ### Features
71
-
72
- * 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))
73
-
74
-
75
- ### Bug Fixes
76
-
77
- * update iOS bundle identifier and clean up build config ([363f457](https://github.com/smallcase/react-native-smallcase-gateway/commit/363f4576103bd57a301ad84fe773296288969e8c))
78
-
79
- ## [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)
80
-
81
- ## [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)
82
-
83
- ## [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)
84
-
85
- ## [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)
86
-
87
- ## [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)
88
-
89
- ## [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)
90
-
91
- ## [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)
92
-
93
-
94
- ### Features
95
-
96
- * **release:** add 'release:major:rc' script for prerelease management ([5602fa6](https://github.com/smallcase/react-native-smallcase-gateway/commit/5602fa62bf7f0e24d27353b2b93ebdfaea11466d))
97
-
98
- ## [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)
99
-
100
- ## [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)
101
-
102
- ## [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)
103
-
104
- ### [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)
105
-
106
- ### [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)
107
-
108
- ## [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)
109
-
110
- ## [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)
111
-
112
- ## [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)
113
-
114
- ## [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)
115
-
116
- ## [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)
117
-
118
- ## [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)
119
-
120
- ## [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)
121
-
122
-
123
- ### Features
124
-
125
- * **release:** add 'release:major:rc' script for prerelease management ([5602fa6](https://github.com/smallcase/react-native-smallcase-gateway/commit/5602fa62bf7f0e24d27353b2b93ebdfaea11466d))
126
-
127
- ## [5.1.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.1.0-rc.3...v5.1.0) (2025-07-07)
128
-
129
- ### [5.0.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v5.0.0...v5.0.1) (2025-05-05)
130
-
131
- ## [5.0.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v4.3.3...v5.0.0) (2025-01-21)
132
-
133
- ### [4.3.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v4.3.2...v4.3.3) (2024-12-11)
134
-
135
- ### [4.3.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v4.3.1...v4.3.2) (2024-11-20)
136
-
137
- ### [4.3.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v4.3.1-beta-2...v4.3.1) (2024-10-23)
138
-
139
- ## [4.3.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v4.2.0...v4.3.0) (2024-10-16)
140
-
141
- ### [4.2.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v4.2.0...v4.2.1) (2024-09-30)
142
-
143
- ### [3.1.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v3.1.3-internal-1...v3.1.3) (2024-06-19)
144
-
145
- ### [3.1.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v3.1.1...v3.1.2) (2024-05-14)
146
-
147
- ### [3.1.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v3.1.0...v3.1.1) (2024-05-14)
148
-
149
- ## [3.1.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v3.0.1...v3.1.0) (2024-04-26)
150
-
151
-
152
- ### Features
153
-
154
- * **ios:** handle Onboarding intent on bridge ([1afb21a](https://github.com/smallcase/react-native-smallcase-gateway/commit/1afb21a7ee30870ffeebd23e86a486afcf41172c))
155
-
156
- ## [3.0.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v2.3.1...v3.0.0) (2024-01-19)
157
-
158
-
159
- ### Features
160
-
161
- * loans ([1ac32dc](https://github.com/smallcase/react-native-smallcase-gateway/commit/1ac32dc1506b5511ab7924a73bfd2b31d471fe8a))
162
-
163
-
164
- ### Bug Fixes
165
-
166
- * **native:** changed Bridge method responses to conform to ScLoanResponse ([6f1a2b6](https://github.com/smallcase/react-native-smallcase-gateway/commit/6f1a2b621f90b7677d37e6dd2150487f46e3d5a7))
167
-
168
- ### [2.3.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v2.3.0...v2.3.1) (2023-12-08)
169
-
170
- ## [2.3.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v2.2.2...v2.3.0) (2023-10-17)
171
-
172
-
173
- ### Features
174
-
175
- * add service method to ScLoan ([3c25226](https://github.com/smallcase/react-native-smallcase-gateway/commit/3c252265aed8f8279491e139a212cced686da80d))
176
- * ios loans servicing ([50e7cb2](https://github.com/smallcase/react-native-smallcase-gateway/commit/50e7cb2375fe0d35e227576c207b7552eeb3371a))
177
- * loans servicing android ([ea3f211](https://github.com/smallcase/react-native-smallcase-gateway/commit/ea3f211f729af45cda2bfb95e53d7259102978dc))
178
-
179
-
180
- ### Bug Fixes
181
-
182
- * update .m file for ios loans refactor changes ([11a2c21](https://github.com/smallcase/react-native-smallcase-gateway/commit/11a2c21990d164928c5f1088eb515d73db6bc09f))
183
-
184
- ### [2.2.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v2.2.1...v2.2.2) (2023-08-03)
185
-
186
- ### [2.2.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v2.1.1...v2.2.1) (2023-07-25)
187
-
188
-
189
- ### Features
190
-
191
- * add artifactory creds in gradle.properties ([4da3731](https://github.com/smallcase/react-native-smallcase-gateway/commit/4da3731d6530d6b8981ba2808b12fafc90fa6b07))
192
- * android bridge SetupResponse ([a9ef115](https://github.com/smallcase/react-native-smallcase-gateway/commit/a9ef11535640cf13c86cc5a188f649e9afb2bbf6))
193
- * las internal android ([0d7da50](https://github.com/smallcase/react-native-smallcase-gateway/commit/0d7da503b69f93ce2fe7652c9f219491b41dfc6a))
194
- * **las:** withdraw servicing method ([3eb4b89](https://github.com/smallcase/react-native-smallcase-gateway/commit/3eb4b8976bc03d05165c54f726749816a98d6b75))
195
- * **Loans:** added repayment Loans Servicing method ([702eb0b](https://github.com/smallcase/react-native-smallcase-gateway/commit/702eb0b0140679a333183144fd8d0a6a77932024))
196
- * ScLoan environment ([fc6c1be](https://github.com/smallcase/react-native-smallcase-gateway/commit/fc6c1be22c6e479667af816a250d40ef014c2012))
197
- * ScLoan withdraw flow ([04b26da](https://github.com/smallcase/react-native-smallcase-gateway/commit/04b26da5de347ff1e954b8779b46540070c36c0b))
198
-
199
-
200
- ### Bug Fixes
201
-
202
- * android bridge loans params ([51e8430](https://github.com/smallcase/react-native-smallcase-gateway/commit/51e84308152a37935cfd23ffc3dd677a24deaa96))
203
- * android bridge setup response to json ([c1a0bd6](https://github.com/smallcase/react-native-smallcase-gateway/commit/c1a0bd675e4d706b6471fa436e34bd85202ebb43))
204
- * android bridge setupLoans - scGatewayConfig ([0068c83](https://github.com/smallcase/react-native-smallcase-gateway/commit/0068c834813efe664b56f639c13d39c6c3643a90))
205
- * android bridge setupLoans versionCode key ([a0d71d3](https://github.com/smallcase/react-native-smallcase-gateway/commit/a0d71d3bb1daf02c88882821483d8c54b91d8a75))
206
- * bug fixes for WITHDRAW intent ([8e76670](https://github.com/smallcase/react-native-smallcase-gateway/commit/8e76670db5bf78294ce6063be3b774f7c295c06e))
207
- * environment mismatch ([fdb16dc](https://github.com/smallcase/react-native-smallcase-gateway/commit/fdb16dc83a7e4dd9d2d3b65fb153159f3ee971b9))
208
- * export ScLoan ([33a1d75](https://github.com/smallcase/react-native-smallcase-gateway/commit/33a1d7504d01dc06b56d1e2c92aa543b28afd046))
209
- * interaction updation race condition ([390c377](https://github.com/smallcase/react-native-smallcase-gateway/commit/390c377abd2bbca0b0a26c6737f49b390295ccd0))
210
- * iOS nil error data with SCLoan error ([5f8f589](https://github.com/smallcase/react-native-smallcase-gateway/commit/5f8f589d053a37703aec8b81bd6e9b06a9edaea0))
211
- * loans internal SDK version number ([6b35d6c](https://github.com/smallcase/react-native-smallcase-gateway/commit/6b35d6c484d90b4340e1ade8e03197bb698baae7))
212
- * loans setup being called on platform, inc. in js ([6cf7c46](https://github.com/smallcase/react-native-smallcase-gateway/commit/6cf7c462dc2ff2afbc9280698d68a7c40518d58d))
213
- * **loans:** response parse error in loans setup ([67350f8](https://github.com/smallcase/react-native-smallcase-gateway/commit/67350f821d0af43b290bff72f49188853638c401))
214
- * refactoring SDK contracts ([c0602ce](https://github.com/smallcase/react-native-smallcase-gateway/commit/c0602ce1ee2b31c4eccbbb43f9a76934f183b8dd))
215
- * ScGatewayConfig to ScLoanConfig ([ef3a90b](https://github.com/smallcase/react-native-smallcase-gateway/commit/ef3a90bc52ed1206102d1cc3d99996dfc4f5a944))
216
- * ScLoanConfig to ScLoanInfo for flow methods ([31741c2](https://github.com/smallcase/react-native-smallcase-gateway/commit/31741c2e8dd9f1e654fcf4b7debfe7d7cf7d8852))
217
- * setup loans environment mismatch ([906e27c](https://github.com/smallcase/react-native-smallcase-gateway/commit/906e27c5343ae2dfb17682af7cdb075c9ddfcde4))
218
- * unknown envrionment reference ([576c840](https://github.com/smallcase/react-native-smallcase-gateway/commit/576c840355f88f931bd57d4c002f6ffacc35be6d))
219
-
220
- ## [2.2.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v2.1.1...v2.2.0) (2023-07-13)
221
-
222
-
223
- ### Features
224
-
225
- * add artifactory creds in gradle.properties ([4da3731](https://github.com/smallcase/react-native-smallcase-gateway/commit/4da3731d6530d6b8981ba2808b12fafc90fa6b07))
226
- * android bridge SetupResponse ([a9ef115](https://github.com/smallcase/react-native-smallcase-gateway/commit/a9ef11535640cf13c86cc5a188f649e9afb2bbf6))
227
- * las internal android ([0d7da50](https://github.com/smallcase/react-native-smallcase-gateway/commit/0d7da503b69f93ce2fe7652c9f219491b41dfc6a))
228
- * **las:** withdraw servicing method ([3eb4b89](https://github.com/smallcase/react-native-smallcase-gateway/commit/3eb4b8976bc03d05165c54f726749816a98d6b75))
229
- * **Loans:** added repayment Loans Servicing method ([702eb0b](https://github.com/smallcase/react-native-smallcase-gateway/commit/702eb0b0140679a333183144fd8d0a6a77932024))
230
- * ScLoan environment ([fc6c1be](https://github.com/smallcase/react-native-smallcase-gateway/commit/fc6c1be22c6e479667af816a250d40ef014c2012))
231
- * ScLoan withdraw flow ([04b26da](https://github.com/smallcase/react-native-smallcase-gateway/commit/04b26da5de347ff1e954b8779b46540070c36c0b))
232
-
233
-
234
- ### Bug Fixes
235
-
236
- * android bridge loans params ([51e8430](https://github.com/smallcase/react-native-smallcase-gateway/commit/51e84308152a37935cfd23ffc3dd677a24deaa96))
237
- * android bridge setup response to json ([c1a0bd6](https://github.com/smallcase/react-native-smallcase-gateway/commit/c1a0bd675e4d706b6471fa436e34bd85202ebb43))
238
- * android bridge setupLoans - scGatewayConfig ([0068c83](https://github.com/smallcase/react-native-smallcase-gateway/commit/0068c834813efe664b56f639c13d39c6c3643a90))
239
- * android bridge setupLoans versionCode key ([a0d71d3](https://github.com/smallcase/react-native-smallcase-gateway/commit/a0d71d3bb1daf02c88882821483d8c54b91d8a75))
240
- * bug fixes for WITHDRAW intent ([8e76670](https://github.com/smallcase/react-native-smallcase-gateway/commit/8e76670db5bf78294ce6063be3b774f7c295c06e))
241
- * environment mismatch ([fdb16dc](https://github.com/smallcase/react-native-smallcase-gateway/commit/fdb16dc83a7e4dd9d2d3b65fb153159f3ee971b9))
242
- * export ScLoan ([33a1d75](https://github.com/smallcase/react-native-smallcase-gateway/commit/33a1d7504d01dc06b56d1e2c92aa543b28afd046))
243
- * interaction updation race condition ([390c377](https://github.com/smallcase/react-native-smallcase-gateway/commit/390c377abd2bbca0b0a26c6737f49b390295ccd0))
244
- * iOS nil error data with SCLoan error ([5f8f589](https://github.com/smallcase/react-native-smallcase-gateway/commit/5f8f589d053a37703aec8b81bd6e9b06a9edaea0))
245
- * loans internal SDK version number ([6b35d6c](https://github.com/smallcase/react-native-smallcase-gateway/commit/6b35d6c484d90b4340e1ade8e03197bb698baae7))
246
- * loans setup being called on platform, inc. in js ([6cf7c46](https://github.com/smallcase/react-native-smallcase-gateway/commit/6cf7c462dc2ff2afbc9280698d68a7c40518d58d))
247
- * **loans:** response parse error in loans setup ([67350f8](https://github.com/smallcase/react-native-smallcase-gateway/commit/67350f821d0af43b290bff72f49188853638c401))
248
- * refactoring SDK contracts ([c0602ce](https://github.com/smallcase/react-native-smallcase-gateway/commit/c0602ce1ee2b31c4eccbbb43f9a76934f183b8dd))
249
- * ScGatewayConfig to ScLoanConfig ([ef3a90b](https://github.com/smallcase/react-native-smallcase-gateway/commit/ef3a90bc52ed1206102d1cc3d99996dfc4f5a944))
250
- * ScLoanConfig to ScLoanInfo for flow methods ([31741c2](https://github.com/smallcase/react-native-smallcase-gateway/commit/31741c2e8dd9f1e654fcf4b7debfe7d7cf7d8852))
251
- * setup loans environment mismatch ([906e27c](https://github.com/smallcase/react-native-smallcase-gateway/commit/906e27c5343ae2dfb17682af7cdb075c9ddfcde4))
252
- * unknown envrionment reference ([576c840](https://github.com/smallcase/react-native-smallcase-gateway/commit/576c840355f88f931bd57d4c002f6ffacc35be6d))
253
-
254
- ### [2.1.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v2.0.0...v2.1.1) (2023-05-17)
255
-
256
-
257
- ### Bug Fixes
258
-
259
- * SDK init response undefined ([99a4606](https://github.com/smallcase/react-native-smallcase-gateway/commit/99a460665240dc68b183aabd5bc088a9c8751f24))
260
-
261
- ### [1.7.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.7.0...v1.7.1) (2022-12-01)
262
-
263
- ## [2.1.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v2.0.2...v2.1.0) (2023-04-11)
264
-
265
- ### [2.0.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v2.0.1...v2.0.2) (2023-03-29)
266
-
267
- ### [2.0.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v2.0.0...v2.0.1) (2023-02-13)
268
-
269
- ### [1.7.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.7.0...v1.7.1) (2022-12-01)
270
-
271
- ## [2.0.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.7.0...v2.0.0) (2022-12-06)
272
-
273
-
274
- ### Features
275
-
276
- * delete old files ([d85689e](https://github.com/smallcase/react-native-smallcase-gateway/commit/d85689eac4324b8c877a502d539aee7317eb7715))
277
- * move blank ios swift source files ([c5f1e6e](https://github.com/smallcase/react-native-smallcase-gateway/commit/c5f1e6ed8588474d4cbab1521b3eece92f0c60c4))
278
- * move js source files to ts ([2331df6](https://github.com/smallcase/react-native-smallcase-gateway/commit/2331df678fe4e9ec23ada7b40ceb1c4bd36cb6b6))
279
- * move new android files ([634ba90](https://github.com/smallcase/react-native-smallcase-gateway/commit/634ba90383214571f704cf9bff459a0e2e32ac15))
280
- * move new config files ([645014f](https://github.com/smallcase/react-native-smallcase-gateway/commit/645014fbd8dfeda35eccb8e012a0a6832446c354))
281
-
282
-
283
- ### Bug Fixes
284
-
285
- * "main" path in package.json ([f29b94b](https://github.com/smallcase/react-native-smallcase-gateway/commit/f29b94b9fa6d3d84952e642bb7077e2c5820998e))
286
- * add login cta and mf bridge methods to new arch ([ce16ed5](https://github.com/smallcase/react-native-smallcase-gateway/commit/ce16ed5de7610ef38a11e635486a014b3acf5892))
287
- * index.js imports ([a5272e6](https://github.com/smallcase/react-native-smallcase-gateway/commit/a5272e63f9f23a0d39a2e6f69032dcd2197e099c))
288
- * ios bridge ([37b900f](https://github.com/smallcase/react-native-smallcase-gateway/commit/37b900f817370de920990fb1cd0dd96f03bd6877))
289
- * util.ts -> util.js ([3e6f843](https://github.com/smallcase/react-native-smallcase-gateway/commit/3e6f843d2486b2d6982da2045358308e0a3b4ca2))
290
- * wrong ts usage ([d8125cf](https://github.com/smallcase/react-native-smallcase-gateway/commit/d8125cf55af477011c920e3fd8c33d1f2b65c691))
291
- ### [1.7.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.7.0...v1.7.1) (2022-12-01)
292
-
293
- ## [1.7.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.6.3...v1.7.0) (2022-11-24)
294
-
295
- ### [1.6.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.6.2...v1.6.3) (2022-11-22)
296
-
297
- ### [1.6.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.6.1...v1.6.2) (2022-11-11)
298
-
299
-
300
- ### Features
301
-
302
- * added support for MF Holdings import fix ([0bf5388](https://github.com/smallcase/react-native-smallcase-gateway/commit/0bf5388e1ca6ee5534681dfa35bd3f69c3aefd7a))
303
-
304
-
305
- ### Bug Fixes
306
-
307
- * Data in mf response is null ([bfca609](https://github.com/smallcase/react-native-smallcase-gateway/commit/bfca609a3075a9e45dc63c4fa9e4561ea3b6cd37))
308
-
309
- ### [1.6.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.5.4...v1.6.1) (2022-10-19)
310
-
311
-
312
- ### Features
313
-
314
- * 1014 err msg added ([04bc4de](https://github.com/smallcase/react-native-smallcase-gateway/commit/04bc4de8dcd3a7a37d6f0d15eee5aeeb34419195))
315
- * add bridge method for mf holdings ([b68b570](https://github.com/smallcase/react-native-smallcase-gateway/commit/b68b57062ed514dc46404f94191c3ee438f184dc))
316
-
317
- ## [1.6.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.5.4...v1.6.0) (2022-09-23)
318
-
319
- ### [1.5.4](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.5.2...v1.5.4) (2022-09-08)
320
-
321
-
322
- ### Bug Fixes
323
-
324
- * removing arm64 arch for iOS simulators && ios sdk version bump ([4bdbe52](https://github.com/smallcase/react-native-smallcase-gateway/commit/4bdbe5208b354a20cc295368a6ad5fb53bc223be))
325
-
326
- ### [1.5.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.5.2...v1.5.3) (2022-08-11)
327
-
328
- ### [1.5.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.5.1...v1.5.2) (2022-08-03)
329
-
330
- ### [1.5.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.5.0...v1.5.1) (2022-08-02)
331
-
332
- ## [1.5.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.4.2...v1.5.0) (2022-08-01)
333
-
334
-
335
- ### Features
336
-
337
- * added error data for transactional errors ([e50e977](https://github.com/smallcase/react-native-smallcase-gateway/commit/e50e977dda6c15f4ed3c4e40932f851e7a3bebce))
338
- * added signup key for all transactional intents ([6f00f57](https://github.com/smallcase/react-native-smallcase-gateway/commit/6f00f57cf2f24f6896019ca17f7603508477161d))
339
-
340
-
341
- ### Bug Fixes
342
-
343
- * added `data` in DataListener error callback ([0481520](https://github.com/smallcase/react-native-smallcase-gateway/commit/0481520ace7730d137400808b05b037787d73296))
344
- * build fails on gradle 7 ([28f79fd](https://github.com/smallcase/react-native-smallcase-gateway/commit/28f79fd53dd2400412f7286442f7b6031287c063))
345
- * data not appended in init and show orders ([07a2a61](https://github.com/smallcase/react-native-smallcase-gateway/commit/07a2a61dd2add4a3cf7b7e4d59a70bb6c750c0bc))
346
- * error data not being returned for intent_not_enabled_for_broker 3000 error ([53b4bfd](https://github.com/smallcase/react-native-smallcase-gateway/commit/53b4bfd52c7dee4aed647e04493e4d1e23402406))
347
- * http for artifactory url ([b7934dc](https://github.com/smallcase/react-native-smallcase-gateway/commit/b7934dc28353508f36aa9ec23d1ebac36d74bf29))
348
- * unsafe params on launchSmallplug ([a6752cb](https://github.com/smallcase/react-native-smallcase-gateway/commit/a6752cb9d41eb0f55c997fa1712a26c0e72d7472))
349
-
350
- ### [1.4.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.4.0...v1.4.2) (2022-07-21)
351
-
352
-
353
- ### Bug Fixes
354
-
355
- * version not null ([479109d](https://github.com/smallcase/react-native-smallcase-gateway/commit/479109d9d491a853f1d09744fe2f36fffb1409dc))
356
-
357
- ### [1.4.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.4.0...v1.4.1) (2022-06-27)
358
-
359
- ## [1.4.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.3.3...v1.4.0) (2022-06-23)
360
-
361
-
362
- ### Bug Fixes
363
-
364
- * android native module for dmbranding ([df816f6](https://github.com/smallcase/react-native-smallcase-gateway/commit/df816f6dfa987dfdfc6297aec362fdb2c7d1e3c3))
365
- * dm partner branding ([78fb73f](https://github.com/smallcase/react-native-smallcase-gateway/commit/78fb73f56055c74eecebcff03c7560a794c06c7f))
366
- * iOS null issue & Android def val ([a852397](https://github.com/smallcase/react-native-smallcase-gateway/commit/a852397e2aa4e0ffc6669f0345cbd93f2e63a6b8))
367
- * method signature for ios native dm ([daedabc](https://github.com/smallcase/react-native-smallcase-gateway/commit/daedabca1180b16c3eacd2c956a51b8d63457435))
368
- * Platform check for dm branding ([0d80e79](https://github.com/smallcase/react-native-smallcase-gateway/commit/0d80e797b80e4c92e940b2763da81299ba05c9c6))
369
- * type error ([e2b1394](https://github.com/smallcase/react-native-smallcase-gateway/commit/e2b139426a488a94bfe514265a8599c81ffb31b8))
370
-
371
- ### [1.3.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.3.2...v1.3.3) (2022-06-02)
372
-
373
-
374
- ### Bug Fixes
375
-
376
- * Login Fallback Fragment UI ([36f2285](https://github.com/smallcase/react-native-smallcase-gateway/commit/36f228594b20c57310d6391f38a796a4ba242b6e))
377
-
378
- ### [1.3.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.3.1...v1.3.2) (2022-06-02)
379
-
380
-
381
- ### Bug Fixes
382
-
383
- * LoginFallbackFragment DI injection fail ([e9342ae](https://github.com/smallcase/react-native-smallcase-gateway/commit/e9342aef588f939cb79334edb9a12e0e35a68b7b))
384
-
385
- ### [1.3.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.3.0...v1.3.1) (2022-06-02)
386
-
387
-
388
- ### Bug Fixes
389
-
390
- * missing success flag from transaction success response ([3b5140a](https://github.com/smallcase/react-native-smallcase-gateway/commit/3b5140aa7748a7dd7d271cbfc7ad3b7e767ba56d))
391
-
392
- ## [1.3.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.2.4...v1.3.0) (2022-06-01)
393
-
394
-
395
- ### Features
396
-
397
- * kite native login ([26fca00](https://github.com/smallcase/react-native-smallcase-gateway/commit/26fca00a10c2ed02e3db85180c370c8bb661bc1f))
398
-
399
- ### [1.2.4](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.2.3...v1.2.4) (2022-05-30)
400
-
401
-
402
- ### Bug Fixes
403
-
404
- * excluded arm64 arch for ios simulators ([207e3a6](https://github.com/smallcase/react-native-smallcase-gateway/commit/207e3a62a9764875d61c7888c2a1a9efcd9af796))
405
-
406
- ### [1.2.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.2.2...v1.2.3) (2022-05-30)
407
-
408
-
409
- ### Bug Fixes
410
-
411
- * show orders and gateway rebranding issues ([025221c](https://github.com/smallcase/react-native-smallcase-gateway/commit/025221c9790411451c70c1b598bc8f9471600d8e))
412
-
413
- ### [1.2.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.2.1...v1.2.2) (2022-05-27)
414
-
415
-
416
- ### Bug Fixes
417
-
418
- * show orders not working for leprechaun users ([f7f23a2](https://github.com/smallcase/react-native-smallcase-gateway/commit/f7f23a21ed933fbfa702bc21b6c4dd483653ea42))
419
-
420
- ### [1.2.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.2.0...v1.2.1) (2022-05-27)
421
-
422
-
423
- ### Bug Fixes
424
-
425
- * smallplug crash for blank page ([35996e9](https://github.com/smallcase/react-native-smallcase-gateway/commit/35996e90c6fe97f4d98e004ab7d319f34411db2d))
426
-
427
- ## [1.2.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.1.0...v1.2.0) (2022-05-17)
428
-
429
-
430
- ### Features
431
-
432
- * show orders ([5ea8109](https://github.com/smallcase/react-native-smallcase-gateway/commit/5ea8109911ddd1f38dc666fb6815f10112bcce74))
433
-
434
- ## [1.1.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.0.2...v1.1.0) (2022-04-07)
435
-
436
-
437
- ### Bug Fixes
438
-
439
- * transaction error response in onSuccess callback ([6d36aeb](https://github.com/smallcase/react-native-smallcase-gateway/commit/6d36aebc0af379d7d7782baa7e59bc3092654d76))
440
-
441
- ### [1.0.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.0.0...v1.0.2) (2022-04-04)
442
-
443
-
444
- ### Features
445
-
446
- * log SDK version with transactionId ([8b833b3](https://github.com/smallcase/react-native-smallcase-gateway/commit/8b833b366c0b8f9a030f920134d82c0f84fa6c7f))
447
-
448
- ### [1.0.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.0.0...v1.0.1) (2022-03-15)
449
-
450
- ## [1.0.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v0.10.0...v1.0.0) (2022-01-21)
451
-
452
-
453
- ### Features
454
-
455
- * integrated smallcase module ([f17cd4c](https://github.com/smallcase/react-native-smallcase-gateway/commit/f17cd4caed3881f51393b544ce376e91baec8b2f))
456
-
457
- ## [0.10.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.9.0...v0.10.0) (2022-01-07)
458
-
459
- ## [0.9.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.8.0...v0.9.0) (2022-01-03)
460
-
461
-
462
- ### Features
463
-
464
- * 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))
465
-
466
- ## [0.8.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.7.0...v0.8.0) (2021-11-15)
467
-
468
- ## [0.7.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.6.0...v0.7.0) (2021-09-20)
469
-
470
- ## [0.6.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.5.0...v0.6.0) (2021-08-17)
471
-
472
-
473
- ### Features
474
-
475
- * added broker name to transaction responses ([c486fc0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/c486fc0e5d2093b1345ff5c750e94a913579ea9b))
476
-
477
- ## [0.5.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.4.0...v0.5.0) (2021-08-10)
478
-
479
-
480
- ### Bug Fixes
481
-
482
- * ios deployment target reduced to 11.0 ([a02955c](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/a02955c6cff9314b9a0dff17a6b7194b32232dce))
483
-
484
- ## [0.4.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.3.0...v0.4.0) (2021-05-31)
485
-
486
-
487
- ### Features
488
-
489
- * added archiveSmallcase functionality and utm params in triggerLeadGen ([314f7d1](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/314f7d10417031cdef7eaa3360fa87cbce826b5e))
490
-
491
- ## [0.3.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.3.0-alpha.2...v0.3.0) (2021-02-24)
492
-
493
-
494
- ### Bug Fixes
495
-
496
- * add "no_order" error code to handle invalid pending-action orders ([89d19e4](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/89d19e44f2cc8758c6a38715837d1a6ea595e041))
497
-
498
- ## [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)
499
-
500
-
501
- ### Features
502
-
503
- * add optional list of brokers to show in trigger-transaction (ios) ([f1f0eba](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/f1f0ebaa98ceffbac55df2a791de9bc199fc4597))
504
-
505
- ## [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)
506
-
507
-
508
- ### Bug Fixes
509
-
510
- * add null safety to trigger-transaction ([d42d1ba](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/d42d1ba8d6c7ef80d6c7b115e0f4d55de0cb20f8))
511
-
512
- ## [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)
513
-
514
-
515
- ### Features
516
-
517
- * add optional list of brokers to show in trigger-transaction ([d0c0036](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/d0c003600766991a8df7e8a87cc4f46c75878b2c))
518
-
519
- ## [0.2.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.1.1-alpha.0...v0.2.0) (2021-01-05)
520
-
521
-
522
- ### Features
523
-
524
- * add logout user and signup key in ios ([8cb5b74](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/8cb5b74e2b402253c4e2bfff2886c7e669df8f3b))
525
-
526
-
527
- ### Bug Fixes
528
-
529
- * remove json handling in ios, and pass the response as it is ([67ed038](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/67ed038bf873180fc7ca394a4fba514e83bee66c))
530
-
531
- ### [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)
532
-
533
-
534
- ### Features
535
-
536
- * add logout user ([e7ac74f](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/e7ac74fddc2dfe808d8403621fc9a65cc22b8e49))
537
-
538
- ## [0.1.0](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.29...v0.1.0) (2020-12-09)
539
-
540
- ### [0.0.29](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.28...v0.0.29) (2020-12-04)
541
-
542
- ### [0.0.28](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.27...v0.0.28) (2020-12-04)
543
-
544
-
545
- ### Bug Fixes
546
-
547
- * fix null being taken as object ([2aaefed](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/2aaefedaf79c52532219dbd8a25726a888b9d280))
548
-
549
- ### [0.0.27](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.26...v0.0.27) (2020-11-23)
550
-
551
- ### [0.0.26](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.25...v0.0.26) (2020-11-19)
552
-
553
-
554
- ### Bug Fixes
555
-
556
- * ignore postinstall error ([f4918db](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/f4918db3c12db65a3d4942644e6e1b627a4a2b4d))
557
-
558
- ### [0.0.25](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.24...v0.0.25) (2020-11-19)
559
-
560
- ### [0.0.24](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.23...v0.0.24) (2020-11-19)
561
-
562
- ### [0.0.23](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.22...v0.0.23) (2020-11-19)
563
-
564
- ### [0.0.22](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.21...v0.0.22) (2020-11-13)
565
-
566
- ### Features
567
-
568
- - hardcode public maven creds for smallcase repo ([572433d](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/572433deed0ded099dfe5f5096f1feb2720eaf27))
569
-
570
- ### Bug Fixes
571
-
572
- - add missing "order_pending" error msg ([c547f12](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/c547f126677bdf3c28c8fa155bf5655f42f9aae7))
573
- - make default min sdk version 21 ([baae752](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/baae75233426dfbcd6a8aa7b4c621f31ffcc37bd))
574
-
575
- ### [0.0.21](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.20...v0.0.21) (2020-11-11)
576
-
577
- ### Features
578
-
579
- - add test framework (jest) ([3e7ed08](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/3e7ed08d0aa1e2d92224eff346016fe352aa644b))
580
-
581
- ### Bug Fixes
582
-
583
- - add constants.js in npm files ([09cdca8](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/09cdca8cf45d1d2575606cb165921f629d04e4bd))
584
-
585
- ### [0.0.20](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.19...v0.0.20) (2020-11-11)
586
-
587
- ### [0.0.19](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/compare/v0.0.18...v0.0.19) (2020-11-11)
588
-
589
- ### 0.0.18 (2020-11-11)
590
-
591
- ### Features
592
-
593
- - add commitizen ([c901563](https://gitlab.com/scGatewayOS/react-native-smallcase-gateway/commit/c901563b1bedcd7de4c9839b1e4aa720a076f61c))