@hawcx/react-native-sdk 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/HawcxReactNative.podspec +2 -2
  3. package/LICENSE +48 -15
  4. package/README.md +150 -88
  5. package/docs/RELEASE.md +2 -2
  6. package/example/ios/HawcxExampleApp.xcodeproj/project.pbxproj +57 -57
  7. package/example/ios/HawcxExampleApp.xcodeproj/project.xcworkspace/xcuserdata/agambhullar.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  8. package/example/ios/Podfile +24 -0
  9. package/example/ios/Podfile.lock +3 -3
  10. package/example/package-lock.json +3 -3
  11. package/example/package.json +1 -1
  12. package/example/src/App.tsx +211 -8
  13. package/example/src/hawcx.config.ts +4 -26
  14. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/HawcxFramework +0 -0
  15. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios.abi.json +208 -77
  16. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios.private.swiftinterface +10 -0
  17. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  18. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios.swiftinterface +10 -0
  19. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/HawcxFramework +0 -0
  20. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios-simulator.abi.json +208 -77
  21. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +10 -0
  22. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  23. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios-simulator.swiftinterface +10 -0
  24. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/x86_64-apple-ios-simulator.abi.json +208 -77
  25. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +10 -0
  26. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  27. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +10 -0
  28. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/_CodeSignature/CodeResources +20 -20
  29. package/ios/HawcxReactNative.swift +64 -0
  30. package/lib/commonjs/index.js +34 -0
  31. package/lib/commonjs/index.js.map +1 -1
  32. package/lib/module/index.js +33 -0
  33. package/lib/module/index.js.map +1 -1
  34. package/lib/typescript/index.d.ts +28 -0
  35. package/lib/typescript/index.d.ts.map +1 -1
  36. package/package.json +1 -1
  37. package/react_mobile_sdk_plan.md +2 -0
  38. package/src/__tests__/index.test.ts +40 -1
  39. package/src/index.ts +66 -0
@@ -247,6 +247,12 @@ public protocol AuthV5Callback : AnyObject {
247
247
  func onAuthSuccess(accessToken: Swift.String?, refreshToken: Swift.String?, isLoginFlow: Swift.Bool)
248
248
  #endif
249
249
  func onError(errorCode: HawcxFramework.AuthV5ErrorCode, errorMessage: Swift.String)
250
+ #if compiler(>=5.3) && $NonescapableTypes
251
+ func onAuthorizationCode(code: Swift.String, expiresIn: Swift.Int?)
252
+ #endif
253
+ #if compiler(>=5.3) && $NonescapableTypes
254
+ func onAdditionalVerificationRequired(sessionId: Swift.String, detail: Swift.String?)
255
+ #endif
250
256
  }
251
257
  public protocol HawcxPushAuthDelegate : AnyObject {
252
258
  func hawcx(didReceiveLoginRequest requestId: Swift.String, details: HawcxFramework.PushLoginRequestDetails)
@@ -274,6 +280,10 @@ public class HawcxSDK {
274
280
  public func declineLoginRequest(requestId: Swift.String, completion: @escaping ((any Swift.Error)?) -> Swift.Void)
275
281
  #endif
276
282
  public func getLastLoggedInUser() -> Swift.String
283
+ #if compiler(>=5.3) && $NonescapableTypes
284
+ @discardableResult
285
+ public func storeBackendOAuthTokens(accessToken: Swift.String, refreshToken: Swift.String?, forUser userId: Swift.String) -> Swift.Bool
286
+ #endif
277
287
  public func clearSessionTokens(forUser userid: Swift.String)
278
288
  public func clearUserKeychainData(forUser userid: Swift.String)
279
289
  public func clearLastLoggedInUser()
@@ -247,6 +247,12 @@ public protocol AuthV5Callback : AnyObject {
247
247
  func onAuthSuccess(accessToken: Swift.String?, refreshToken: Swift.String?, isLoginFlow: Swift.Bool)
248
248
  #endif
249
249
  func onError(errorCode: HawcxFramework.AuthV5ErrorCode, errorMessage: Swift.String)
250
+ #if compiler(>=5.3) && $NonescapableTypes
251
+ func onAuthorizationCode(code: Swift.String, expiresIn: Swift.Int?)
252
+ #endif
253
+ #if compiler(>=5.3) && $NonescapableTypes
254
+ func onAdditionalVerificationRequired(sessionId: Swift.String, detail: Swift.String?)
255
+ #endif
250
256
  }
251
257
  public protocol HawcxPushAuthDelegate : AnyObject {
252
258
  func hawcx(didReceiveLoginRequest requestId: Swift.String, details: HawcxFramework.PushLoginRequestDetails)
@@ -274,6 +280,10 @@ public class HawcxSDK {
274
280
  public func declineLoginRequest(requestId: Swift.String, completion: @escaping ((any Swift.Error)?) -> Swift.Void)
275
281
  #endif
276
282
  public func getLastLoggedInUser() -> Swift.String
283
+ #if compiler(>=5.3) && $NonescapableTypes
284
+ @discardableResult
285
+ public func storeBackendOAuthTokens(accessToken: Swift.String, refreshToken: Swift.String?, forUser userId: Swift.String) -> Swift.Bool
286
+ #endif
277
287
  public func clearSessionTokens(forUser userid: Swift.String)
278
288
  public func clearUserKeychainData(forUser userid: Swift.String)
279
289
  public func clearLastLoggedInUser()