@hawcx/react-native-sdk 1.0.7 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/CHANGELOG.md +3 -6
  2. package/HawcxReactNative.podspec +2 -2
  3. package/README.md +327 -109
  4. package/android/build.gradle +2 -2
  5. package/android/src/main/java/com/hawcx/reactnative/HawcxEventDispatcher.kt +4 -0
  6. package/android/src/main/java/com/hawcx/reactnative/HawcxReactNativeModule.kt +324 -1
  7. package/android/src/main/java/com/hawcx/reactnative/v6/HawcxV6Bridge.kt +402 -0
  8. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/HawcxFramework +0 -0
  9. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Info.plist +0 -0
  10. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios.abi.json +22143 -0
  11. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios.private.swiftinterface +649 -21
  12. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  13. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios.swiftinterface +649 -21
  14. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/HawcxFramework +0 -0
  15. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Info.plist +0 -0
  16. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios-simulator.abi.json +22143 -0
  17. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +649 -21
  18. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  19. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios-simulator.swiftinterface +649 -21
  20. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/x86_64-apple-ios-simulator.abi.json +22143 -0
  21. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +649 -21
  22. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  23. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +649 -21
  24. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/_CodeSignature/CodeResources +21 -21
  25. package/ios/HawcxReactNative.m +56 -0
  26. package/ios/HawcxReactNative.swift +380 -1
  27. package/ios/HawcxV6BridgeSupport.swift +468 -0
  28. package/lib/commonjs/index.js +326 -3
  29. package/lib/commonjs/index.js.map +1 -1
  30. package/lib/commonjs/v6Normalization.js +325 -0
  31. package/lib/commonjs/v6Normalization.js.map +1 -0
  32. package/lib/commonjs/v6State.js +186 -0
  33. package/lib/commonjs/v6State.js.map +1 -0
  34. package/lib/commonjs/v6Types.js +2 -0
  35. package/lib/commonjs/v6Types.js.map +1 -0
  36. package/lib/commonjs/v6WebLogin.js +101 -0
  37. package/lib/commonjs/v6WebLogin.js.map +1 -0
  38. package/lib/module/index.js +287 -1
  39. package/lib/module/index.js.map +1 -1
  40. package/lib/module/v6Normalization.js +318 -0
  41. package/lib/module/v6Normalization.js.map +1 -0
  42. package/lib/module/v6State.js +173 -0
  43. package/lib/module/v6State.js.map +1 -0
  44. package/lib/module/v6Types.js +2 -0
  45. package/lib/module/v6Types.js.map +1 -0
  46. package/lib/module/v6WebLogin.js +92 -0
  47. package/lib/module/v6WebLogin.js.map +1 -0
  48. package/lib/typescript/index.d.ts +83 -0
  49. package/lib/typescript/index.d.ts.map +1 -1
  50. package/lib/typescript/v6Normalization.d.ts +3 -0
  51. package/lib/typescript/v6Normalization.d.ts.map +1 -0
  52. package/lib/typescript/v6State.d.ts +13 -0
  53. package/lib/typescript/v6State.d.ts.map +1 -0
  54. package/lib/typescript/v6Types.d.ts +157 -0
  55. package/lib/typescript/v6Types.d.ts.map +1 -0
  56. package/lib/typescript/v6WebLogin.d.ts +32 -0
  57. package/lib/typescript/v6WebLogin.d.ts.map +1 -0
  58. package/package.json +21 -9
  59. package/src/index.ts +477 -0
  60. package/src/v6Normalization.ts +356 -0
  61. package/src/v6State.ts +238 -0
  62. package/src/v6Types.ts +194 -0
  63. package/src/v6WebLogin.ts +154 -0
  64. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  65. package/android/gradle/wrapper/gradle-wrapper.properties +0 -6
  66. package/android/gradlew +0 -185
  67. package/android/gradlew.bat +0 -89
  68. package/android/libs/hawcx-5.1.2.aar +0 -0
  69. package/docs/RELEASE.md +0 -129
  70. package/example/README.md +0 -59
  71. package/example/android/app/build.gradle +0 -126
  72. package/example/android/app/debug.keystore +0 -0
  73. package/example/android/app/proguard-rules.pro +0 -10
  74. package/example/android/app/src/debug/AndroidManifest.xml +0 -9
  75. package/example/android/app/src/main/AndroidManifest.xml +0 -27
  76. package/example/android/app/src/main/java/com/hawcx/example/MainActivity.kt +0 -22
  77. package/example/android/app/src/main/java/com/hawcx/example/MainApplication.kt +0 -45
  78. package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
  79. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  80. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  81. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  82. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  83. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  84. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  85. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  86. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  87. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  88. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  89. package/example/android/app/src/main/res/values/strings.xml +0 -3
  90. package/example/android/app/src/main/res/values/styles.xml +0 -9
  91. package/example/android/build.gradle +0 -35
  92. package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  93. package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -7
  94. package/example/android/gradle.properties +0 -41
  95. package/example/android/gradlew +0 -249
  96. package/example/android/gradlew.bat +0 -92
  97. package/example/android/local.properties +0 -2
  98. package/example/android/settings.gradle +0 -38
  99. package/example/app.json +0 -4
  100. package/example/babel.config.js +0 -3
  101. package/example/e2e/README.md +0 -17
  102. package/example/e2e/hawcx-login.yaml +0 -14
  103. package/example/index.js +0 -5
  104. package/example/ios/.xcode.env +0 -11
  105. package/example/ios/HawcxExampleApp/AppDelegate.h +0 -6
  106. package/example/ios/HawcxExampleApp/AppDelegate.mm +0 -31
  107. package/example/ios/HawcxExampleApp/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
  108. package/example/ios/HawcxExampleApp/Images.xcassets/Contents.json +0 -6
  109. package/example/ios/HawcxExampleApp/Info.plist +0 -55
  110. package/example/ios/HawcxExampleApp/LaunchScreen.storyboard +0 -47
  111. package/example/ios/HawcxExampleApp/PrivacyInfo.xcprivacy +0 -37
  112. package/example/ios/HawcxExampleApp/main.m +0 -10
  113. package/example/ios/HawcxExampleApp.xcodeproj/project.pbxproj +0 -704
  114. package/example/ios/HawcxExampleApp.xcodeproj/project.xcworkspace/xcuserdata/agambhullar.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  115. package/example/ios/HawcxExampleApp.xcodeproj/xcshareddata/xcschemes/HawcxExampleApp.xcscheme +0 -90
  116. package/example/ios/HawcxExampleApp.xcodeproj/xcuserdata/agambhullar.xcuserdatad/xcschemes/xcschememanagement.plist +0 -16
  117. package/example/ios/HawcxExampleApp.xcworkspace/contents.xcworkspacedata +0 -10
  118. package/example/ios/HawcxExampleAppTests/HawcxExampleAppTests.m +0 -66
  119. package/example/ios/HawcxExampleAppTests/Info.plist +0 -24
  120. package/example/ios/Podfile +0 -79
  121. package/example/ios/Podfile.lock +0 -1290
  122. package/example/metro.config.js +0 -16
  123. package/example/package-lock.json +0 -13220
  124. package/example/package.json +0 -30
  125. package/example/src/App.tsx +0 -755
  126. package/example/src/hawcx.config.ts +0 -25
  127. package/example/tsconfig.json +0 -8
  128. package/ios/Frameworks/.keep +0 -0
  129. package/lib/typescript/__tests__/index.test.d.ts +0 -2
  130. package/lib/typescript/__tests__/index.test.d.ts.map +0 -1
  131. package/react_mobile_sdk_plan.md +0 -242
  132. package/src/__tests__/index.test.ts +0 -206
@@ -2,6 +2,7 @@
2
2
  // swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
3
3
  // swift-module-flags: -target arm64-apple-ios17.5-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name HawcxFramework
4
4
  // swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2
5
+ import AuthenticationServices
5
6
  import CommonCrypto
6
7
  import CryptoKit
7
8
  import Foundation
@@ -15,6 +16,624 @@ import _Concurrency
15
16
  import _StringProcessing
16
17
  import _SwiftConcurrencyShims
17
18
  import os
19
+ public struct HawcxV1Request : Swift.Encodable {
20
+ public let protocolVersion: Swift.Int
21
+ public let session: Swift.String?
22
+ public let action: HawcxFramework.HawcxV1Action
23
+ #if compiler(>=5.3)
24
+ public init(protocolVersion: Swift.Int = 2, session: Swift.String? = nil, action: HawcxFramework.HawcxV1Action)
25
+ #endif
26
+ public func encode(to encoder: any Swift.Encoder) throws
27
+ }
28
+ public struct HawcxV1Response : Swift.Decodable {
29
+ public let protocolVersion: Swift.Int
30
+ public let session: Swift.String
31
+ public let prompt: HawcxFramework.HawcxV1Prompt
32
+ public let meta: HawcxFramework.HawcxV1ResponseMeta
33
+ public let promptMeta: HawcxFramework.HawcxV1PromptMetadata?
34
+ public init(from decoder: any Swift.Decoder) throws
35
+ }
36
+ public struct HawcxV1ResponseMeta : Swift.Decodable, Swift.Equatable {
37
+ public let traceId: Swift.String
38
+ public let expiresAt: Swift.String
39
+ public static func == (a: HawcxFramework.HawcxV1ResponseMeta, b: HawcxFramework.HawcxV1ResponseMeta) -> Swift.Bool
40
+ public init(from decoder: any Swift.Decoder) throws
41
+ }
42
+ public struct HawcxV1FlowSnapshot : Swift.Equatable {
43
+ public let protocolVersion: Swift.Int
44
+ public let session: Swift.String
45
+ public let prompt: HawcxFramework.HawcxV1Prompt
46
+ public let meta: HawcxFramework.HawcxV1ResponseMeta
47
+ public let promptMeta: HawcxFramework.HawcxV1PromptMetadata?
48
+ public init(response: HawcxFramework.HawcxV1Response)
49
+ public static func == (a: HawcxFramework.HawcxV1FlowSnapshot, b: HawcxFramework.HawcxV1FlowSnapshot) -> Swift.Bool
50
+ }
51
+ public enum HawcxV1FlowState : Swift.Equatable {
52
+ case idle
53
+ case loading(session: Swift.String?)
54
+ case prompt(session: Swift.String, prompt: HawcxFramework.HawcxV1Prompt, meta: HawcxFramework.HawcxV1ResponseMeta, promptMeta: HawcxFramework.HawcxV1PromptMetadata?)
55
+ case completed(session: Swift.String, authCode: Swift.String, expiresAt: Swift.String, codeVerifier: Swift.String?)
56
+ case error(session: Swift.String?, code: Swift.String, action: HawcxFramework.HawcxV1ErrorAction?, message: Swift.String, retryable: Swift.Bool, details: HawcxFramework.HawcxV1ErrorDetails?)
57
+ public var isTerminal: Swift.Bool {
58
+ get
59
+ }
60
+ public static func == (a: HawcxFramework.HawcxV1FlowState, b: HawcxFramework.HawcxV1FlowState) -> Swift.Bool
61
+ }
62
+ public enum HawcxV1FlowType : Swift.String, Swift.Codable {
63
+ case signin
64
+ case signup
65
+ case accountManage
66
+ #if compiler(>=5.3)
67
+ public init?(rawValue: Swift.String)
68
+ #endif
69
+ public typealias RawValue = Swift.String
70
+ public var rawValue: Swift.String {
71
+ get
72
+ }
73
+ }
74
+ public enum HawcxV1PrimaryMethodSelectionPolicy : Swift.Equatable {
75
+ case manual
76
+ case automaticFromIdentifier
77
+ public static func == (a: HawcxFramework.HawcxV1PrimaryMethodSelectionPolicy, b: HawcxFramework.HawcxV1PrimaryMethodSelectionPolicy) -> Swift.Bool
78
+ public func hash(into hasher: inout Swift.Hasher)
79
+ public var hashValue: Swift.Int {
80
+ get
81
+ }
82
+ }
83
+ public struct HawcxV1DeviceInfo : Swift.Codable, Swift.Equatable {
84
+ public let v: Swift.Int
85
+ public let fingerprint: Swift.String
86
+ public let signals: [Swift.String : HawcxFramework.HawcxV1JSONValue]?
87
+ #if compiler(>=5.3)
88
+ public init(v: Swift.Int = 1, fingerprint: Swift.String, signals: [Swift.String : HawcxFramework.HawcxV1JSONValue]? = nil)
89
+ #endif
90
+ public static func == (a: HawcxFramework.HawcxV1DeviceInfo, b: HawcxFramework.HawcxV1DeviceInfo) -> Swift.Bool
91
+ public func encode(to encoder: any Swift.Encoder) throws
92
+ public init(from decoder: any Swift.Decoder) throws
93
+ }
94
+ public struct HawcxV1DeviceCredentials : Swift.Codable, Swift.Equatable {
95
+ public let keyset: Swift.String
96
+ public let hindex: Swift.String
97
+ public let sk2: Swift.String
98
+ public init(keyset: Swift.String, hindex: Swift.String, sk2: Swift.String)
99
+ public static func == (a: HawcxFramework.HawcxV1DeviceCredentials, b: HawcxFramework.HawcxV1DeviceCredentials) -> Swift.Bool
100
+ public func encode(to encoder: any Swift.Encoder) throws
101
+ public init(from decoder: any Swift.Decoder) throws
102
+ }
103
+ public enum HawcxV1Action : Swift.Encodable, Swift.Equatable {
104
+ case start(flowType: HawcxFramework.HawcxV1FlowType, identifier: Swift.String, startToken: Swift.String?, inviteCode: Swift.String?, codeChallenge: Swift.String?, device: HawcxFramework.HawcxV1DeviceInfo?, deviceCredentials: HawcxFramework.HawcxV1DeviceCredentials?)
105
+ case selectMethod(methodId: Swift.String)
106
+ case submitCode(code: Swift.String)
107
+ case submitTotp(code: Swift.String)
108
+ case submitPhone(phone: Swift.String)
109
+ case requestChallenge(keyset: Swift.String, hindex: Swift.String, sk2: Swift.String)
110
+ case submitSignature(keyId: Swift.String, signature: Swift.String, mapp: Swift.String)
111
+ case oauthCallback(code: Swift.String, state: Swift.String)
112
+ case resend
113
+ case poll
114
+ case cancel
115
+ case qrAuthApprove(h2index: Swift.String, signature: Swift.String, sk2: Swift.String, rememberDevice: Swift.Bool, phoneActionToken: Swift.String)
116
+ public func encode(to encoder: any Swift.Encoder) throws
117
+ public static func == (a: HawcxFramework.HawcxV1Action, b: HawcxFramework.HawcxV1Action) -> Swift.Bool
118
+ }
119
+ public enum HawcxV1Prompt : Swift.Decodable, Swift.Equatable {
120
+ case selectMethod(methods: [HawcxFramework.HawcxV1Method], phase: Swift.String?)
121
+ case enterCode(destination: Swift.String, codeLength: Swift.Int?, codeFormat: Swift.String?, codeExpiresAt: Swift.String?, resendAt: Swift.String?)
122
+ case enterTotp
123
+ case setupTotp(secret: Swift.String, otpauthUrl: Swift.String, period: Swift.Int?)
124
+ case setupSms(existingPhone: Swift.String?)
125
+ case redirect(url: Swift.String, returnScheme: Swift.String?)
126
+ case awaitApproval(qrData: Swift.String?, expiresAt: Swift.String, pollInterval: Swift.Int)
127
+ case setupDevice(domain: Swift.String, algorithm: Swift.String, version: Swift.String)
128
+ case deviceChallenge(challenge: Swift.String, challengeEncoding: Swift.String, keyId: Swift.String, algorithm: Swift.String, domain: Swift.String, combinedsalt: Swift.String, responseEncoding: Swift.String)
129
+ case completed(authCode: Swift.String, expiresAt: Swift.String, codeVerifier: Swift.String?)
130
+ case error(code: Swift.String, action: HawcxFramework.HawcxV1ErrorAction, message: Swift.String, retryable: Swift.Bool, details: HawcxFramework.HawcxV1ErrorDetails?)
131
+ case unknown(type: Swift.String)
132
+ public var isInternal: Swift.Bool {
133
+ get
134
+ }
135
+ public init(from decoder: any Swift.Decoder) throws
136
+ public static func == (a: HawcxFramework.HawcxV1Prompt, b: HawcxFramework.HawcxV1Prompt) -> Swift.Bool
137
+ }
138
+ public struct HawcxV1Method : Swift.Codable, Swift.Equatable {
139
+ public let id: Swift.String
140
+ public let label: Swift.String
141
+ public let icon: Swift.String?
142
+ public static func == (a: HawcxFramework.HawcxV1Method, b: HawcxFramework.HawcxV1Method) -> Swift.Bool
143
+ public func encode(to encoder: any Swift.Encoder) throws
144
+ public init(from decoder: any Swift.Decoder) throws
145
+ }
146
+ public struct HawcxV1PromptMetadata : Swift.Decodable, Swift.Equatable {
147
+ public let stepInfo: HawcxFramework.HawcxV1StepInfo?
148
+ public let risk: HawcxFramework.HawcxV1RiskInfo?
149
+ public let codeChannel: Swift.String?
150
+ public var isEmpty: Swift.Bool {
151
+ get
152
+ }
153
+ #if compiler(>=5.3)
154
+ public init(stepInfo: HawcxFramework.HawcxV1StepInfo?, risk: HawcxFramework.HawcxV1RiskInfo?, codeChannel: Swift.String?)
155
+ #endif
156
+ public init(from decoder: any Swift.Decoder) throws
157
+ public static func == (a: HawcxFramework.HawcxV1PromptMetadata, b: HawcxFramework.HawcxV1PromptMetadata) -> Swift.Bool
158
+ }
159
+ public struct HawcxV1StepInfo : Swift.Decodable, Swift.Equatable {
160
+ public let id: Swift.String
161
+ public let label: Swift.String?
162
+ public static func == (a: HawcxFramework.HawcxV1StepInfo, b: HawcxFramework.HawcxV1StepInfo) -> Swift.Bool
163
+ public init(from decoder: any Swift.Decoder) throws
164
+ }
165
+ public struct HawcxV1RiskInfo : Swift.Decodable, Swift.Equatable {
166
+ public let detected: Swift.Bool
167
+ public let reasons: [Swift.String]
168
+ public let message: Swift.String?
169
+ public let location: HawcxFramework.HawcxV1RiskLocation?
170
+ public let riskScore: Swift.Double?
171
+ public static func == (a: HawcxFramework.HawcxV1RiskInfo, b: HawcxFramework.HawcxV1RiskInfo) -> Swift.Bool
172
+ public init(from decoder: any Swift.Decoder) throws
173
+ }
174
+ public struct HawcxV1RiskLocation : Swift.Decodable, Swift.Equatable {
175
+ public let city: Swift.String?
176
+ public let country: Swift.String?
177
+ public static func == (a: HawcxFramework.HawcxV1RiskLocation, b: HawcxFramework.HawcxV1RiskLocation) -> Swift.Bool
178
+ public init(from decoder: any Swift.Decoder) throws
179
+ }
180
+ public enum HawcxV1ErrorAction : Swift.Codable, Swift.Equatable {
181
+ case retryInput
182
+ case restartFlow
183
+ case wait
184
+ case retryRequest
185
+ case abort
186
+ case resendCode
187
+ case selectMethod
188
+ case unknown(Swift.String)
189
+ public static func fromProtocolActionType(_ raw: Swift.String) -> HawcxFramework.HawcxV1ErrorAction
190
+ public init(from decoder: any Swift.Decoder) throws
191
+ public func encode(to encoder: any Swift.Encoder) throws
192
+ public static func == (a: HawcxFramework.HawcxV1ErrorAction, b: HawcxFramework.HawcxV1ErrorAction) -> Swift.Bool
193
+ }
194
+ public struct HawcxV1ErrorDetails : Swift.Codable, Swift.Equatable {
195
+ public let retryAfterSeconds: Swift.Int?
196
+ public let retryAt: Swift.String?
197
+ public let attemptsRemaining: Swift.Int?
198
+ public let errors: [HawcxFramework.HawcxV1FieldError]?
199
+ public var isEmpty: Swift.Bool {
200
+ get
201
+ }
202
+ #if compiler(>=5.3)
203
+ public init(retryAfterSeconds: Swift.Int? = nil, retryAt: Swift.String? = nil, attemptsRemaining: Swift.Int? = nil, errors: [HawcxFramework.HawcxV1FieldError]? = nil)
204
+ #endif
205
+ public init(from decoder: any Swift.Decoder) throws
206
+ public func encode(to encoder: any Swift.Encoder) throws
207
+ public static func == (a: HawcxFramework.HawcxV1ErrorDetails, b: HawcxFramework.HawcxV1ErrorDetails) -> Swift.Bool
208
+ }
209
+ public struct HawcxV1FieldError : Swift.Codable, Swift.Equatable {
210
+ public let field: Swift.String
211
+ public let message: Swift.String
212
+ public init(field: Swift.String, message: Swift.String)
213
+ public static func == (a: HawcxFramework.HawcxV1FieldError, b: HawcxFramework.HawcxV1FieldError) -> Swift.Bool
214
+ public func encode(to encoder: any Swift.Encoder) throws
215
+ public init(from decoder: any Swift.Decoder) throws
216
+ }
217
+ public enum HawcxV1JSONValue : Swift.Codable, Swift.Equatable {
218
+ case string(Swift.String)
219
+ case number(Swift.Double)
220
+ case bool(Swift.Bool)
221
+ case object([Swift.String : HawcxFramework.HawcxV1JSONValue])
222
+ case array([HawcxFramework.HawcxV1JSONValue])
223
+ case null
224
+ public init(from decoder: any Swift.Decoder) throws
225
+ public func encode(to encoder: any Swift.Encoder) throws
226
+ public static func == (a: HawcxFramework.HawcxV1JSONValue, b: HawcxFramework.HawcxV1JSONValue) -> Swift.Bool
227
+ }
228
+ public struct HawcxV1ClientConfig {
229
+ public static let defaultDeviceCredentialClearCodes: Swift.Set<Swift.String>
230
+ public let configId: Swift.String
231
+ @available(*, deprecated, message: "Use configId. Kept for backward compatibility.")
232
+ public let projectId: Swift.String
233
+ @available(*, deprecated, message: "Use configId. v1 no longer sends x-api-key/apikey headers.")
234
+ public let apiKey: Swift.String?
235
+ public let baseURL: Foundation.URL
236
+ public let sdkName: Swift.String
237
+ public let sdkVersion: Swift.String
238
+ public let platform: Swift.String
239
+ public let protocolVersion: Swift.Int
240
+ public let relyingParty: Swift.String?
241
+ public let timeoutSeconds: Foundation.TimeInterval
242
+ public let retryMaxAttempts: Swift.Int
243
+ public let retryBaseDelaySeconds: Foundation.TimeInterval
244
+ public let autoRetryWait: Swift.Bool
245
+ public let deviceCredentialsProvider: ((Swift.String) -> HawcxFramework.HawcxV1DeviceCredentials?)?
246
+ public let deviceCredentialsInvalidator: ((Swift.String) -> Swift.Void)?
247
+ public let deviceCredentialClearCodes: Swift.Set<Swift.String>
248
+ public let deviceCryptoHandler: (any HawcxFramework.HawcxV1DeviceCryptoHandling)?
249
+ #if compiler(>=5.3)
250
+ public init(configId: Swift.String, baseURL: Foundation.URL, sdkName: Swift.String = "@hawcx/ios", sdkVersion: Swift.String, platform: Swift.String = "ios", protocolVersion: Swift.Int = 2, relyingParty: Swift.String? = nil, timeoutSeconds: Foundation.TimeInterval = 15, retryMaxAttempts: Swift.Int = 2, retryBaseDelaySeconds: Foundation.TimeInterval = 0.5, autoRetryWait: Swift.Bool = false, deviceCredentialsProvider: ((Swift.String) -> HawcxFramework.HawcxV1DeviceCredentials?)? = nil, deviceCredentialsInvalidator: ((Swift.String) -> Swift.Void)? = nil, deviceCredentialClearCodes: Swift.Set<Swift.String> = HawcxV1ClientConfig.defaultDeviceCredentialClearCodes, deviceCryptoHandler: (any HawcxFramework.HawcxV1DeviceCryptoHandling)? = nil)
251
+ #endif
252
+ #if compiler(>=5.3)
253
+ @available(*, deprecated, message: "Use init(configId:baseURL:...). For v1, configId should be your API key.")
254
+ public init(projectId: Swift.String, apiKey: Swift.String? = nil, baseURL: Foundation.URL, sdkName: Swift.String = "@hawcx/ios", sdkVersion: Swift.String, platform: Swift.String = "ios", protocolVersion: Swift.Int = 2, relyingParty: Swift.String? = nil, timeoutSeconds: Foundation.TimeInterval = 15, retryMaxAttempts: Swift.Int = 2, retryBaseDelaySeconds: Foundation.TimeInterval = 0.5, autoRetryWait: Swift.Bool = false, deviceCredentialsProvider: ((Swift.String) -> HawcxFramework.HawcxV1DeviceCredentials?)? = nil, deviceCredentialsInvalidator: ((Swift.String) -> Swift.Void)? = nil, deviceCredentialClearCodes: Swift.Set<Swift.String> = HawcxV1ClientConfig.defaultDeviceCredentialClearCodes, deviceCryptoHandler: (any HawcxFramework.HawcxV1DeviceCryptoHandling)? = nil)
255
+ #endif
256
+ }
257
+ final public class HawcxProtocolV1Client {
258
+ final public let config: HawcxFramework.HawcxV1ClientConfig
259
+ final public var session: Swift.String? {
260
+ get
261
+ }
262
+ final public var state: HawcxFramework.HawcxV1FlowState {
263
+ get
264
+ }
265
+ final public var onStateChange: ((HawcxFramework.HawcxV1FlowState) -> Swift.Void)?
266
+ public init(config: HawcxFramework.HawcxV1ClientConfig, urlSession: Foundation.URLSession = .shared)
267
+ final public func reset()
268
+ #if compiler(>=5.3)
269
+ final public func start(flowType: HawcxFramework.HawcxV1FlowType, identifier: Swift.String, startToken: Swift.String? = nil, inviteCode: Swift.String? = nil, codeChallenge: Swift.String? = nil, device: HawcxFramework.HawcxV1DeviceInfo? = nil, deviceCredentials: HawcxFramework.HawcxV1DeviceCredentials? = nil, completion: @escaping (HawcxFramework.HawcxV1FlowState) -> Swift.Void)
270
+ #endif
271
+ final public func selectMethod(methodId: Swift.String, completion: @escaping (HawcxFramework.HawcxV1FlowState) -> Swift.Void)
272
+ final public func submitCode(code: Swift.String, completion: @escaping (HawcxFramework.HawcxV1FlowState) -> Swift.Void)
273
+ final public func submitTotp(code: Swift.String, completion: @escaping (HawcxFramework.HawcxV1FlowState) -> Swift.Void)
274
+ final public func submitPhone(phone: Swift.String, completion: @escaping (HawcxFramework.HawcxV1FlowState) -> Swift.Void)
275
+ final public func requestChallenge(keyset: Swift.String, hindex: Swift.String, sk2: Swift.String, completion: @escaping (HawcxFramework.HawcxV1FlowState) -> Swift.Void)
276
+ final public func submitSignature(keyId: Swift.String, signature: Swift.String, mapp: Swift.String, completion: @escaping (HawcxFramework.HawcxV1FlowState) -> Swift.Void)
277
+ final public func oauthCallback(code: Swift.String, state: Swift.String, completion: @escaping (HawcxFramework.HawcxV1FlowState) -> Swift.Void)
278
+ final public func resend(completion: @escaping (HawcxFramework.HawcxV1FlowState) -> Swift.Void)
279
+ final public func poll(completion: @escaping (HawcxFramework.HawcxV1FlowState) -> Swift.Void)
280
+ final public func cancel(completion: @escaping (HawcxFramework.HawcxV1FlowState) -> Swift.Void)
281
+ final public func send(action: HawcxFramework.HawcxV1Action, completion: @escaping (HawcxFramework.HawcxV1FlowState) -> Swift.Void)
282
+ @objc deinit
283
+ }
284
+ final public class HawcxV1SDK {
285
+ final public let configId: Swift.String
286
+ @available(*, deprecated, message: "Use configId. Kept for backward compatibility.")
287
+ final public let projectId: Swift.String
288
+ final public let baseURL: Foundation.URL
289
+ final public let sdkVersion: Swift.String
290
+ final public let crypto: HawcxFramework.HawcxV1DeviceCryptoService
291
+ final public let client: HawcxFramework.HawcxProtocolV1Client
292
+ final public let flow: HawcxFramework.HawcxV1FlowController
293
+ #if compiler(>=5.3)
294
+ public init(configId: Swift.String, baseURL: Foundation.URL, sdkVersion: Swift.String? = nil, relyingParty: Swift.String? = nil, autoPollApprovals: Swift.Bool = true, primaryMethodSelectionPolicy: HawcxFramework.HawcxV1PrimaryMethodSelectionPolicy = .manual)
295
+ #endif
296
+ #if compiler(>=5.3)
297
+ @available(*, deprecated, message: "Use init(configId:baseURL:...). For v1, configId should be your API key.")
298
+ convenience public init(projectId: Swift.String, apiKey: Swift.String? = nil, baseURL: Foundation.URL, sdkVersion: Swift.String? = nil, relyingParty: Swift.String? = nil, autoPollApprovals: Swift.Bool = true, primaryMethodSelectionPolicy: HawcxFramework.HawcxV1PrimaryMethodSelectionPolicy = .manual)
299
+ #endif
300
+ #if compiler(>=5.3)
301
+ final public func start(flowType: HawcxFramework.HawcxV1FlowType, identifier: Swift.String, startToken: Swift.String? = nil, inviteCode: Swift.String? = nil, codeChallenge: Swift.String? = nil)
302
+ #endif
303
+ final public func reset()
304
+ @objc deinit
305
+ }
306
+ public enum HawcxV1ClientError : Swift.Error, Swift.Equatable {
307
+ case invalidConfiguration(Swift.String)
308
+ case requestEncodingFailed(Swift.String)
309
+ case responseDecodingFailed(Swift.String)
310
+ case transportError(Swift.String)
311
+ case httpError(statusCode: Swift.Int, body: Swift.String?)
312
+ case serverError(HawcxFramework.HawcxV1Prompt)
313
+ public static func == (a: HawcxFramework.HawcxV1ClientError, b: HawcxFramework.HawcxV1ClientError) -> Swift.Bool
314
+ }
315
+ public enum HawcxV1DeviceInfoError : Swift.Error, Swift.Equatable {
316
+ case invalidIdentifier
317
+ case fingerprintGenerationFailed(Swift.String)
318
+ public static func == (a: HawcxFramework.HawcxV1DeviceInfoError, b: HawcxFramework.HawcxV1DeviceInfoError) -> Swift.Bool
319
+ }
320
+ public struct HawcxV1DeviceInfoBuilder {
321
+ public static func normalizedIdentifier(_ identifier: Swift.String) -> Swift.String
322
+ #if compiler(>=5.3)
323
+ public static func build(identifier: Swift.String, sdkVersion: Swift.String? = nil, additionalSignals: [Swift.String : HawcxFramework.HawcxV1JSONValue] = [:]) throws -> HawcxFramework.HawcxV1DeviceInfo
324
+ #endif
325
+ #if compiler(>=5.3)
326
+ public static func buildSignals(sdkVersion: Swift.String? = nil) -> [Swift.String : HawcxFramework.HawcxV1JSONValue]
327
+ #endif
328
+ }
329
+ public enum HawcxV1CryptoError : Swift.Error, Swift.Equatable {
330
+ case randomGenerationFailed(Darwin.OSStatus)
331
+ case nonceInitializationFailed
332
+ case encryptionFailed
333
+ case decryptionFailed
334
+ case invalidCiphertext
335
+ case invalidChallengeEncoding
336
+ case invalidChallenge
337
+ case invalidInfoString
338
+ case invalidKeyset
339
+ case signingFailed
340
+ public static func == (a: HawcxFramework.HawcxV1CryptoError, b: HawcxFramework.HawcxV1CryptoError) -> Swift.Bool
341
+ }
342
+ public enum HawcxV1CryptoSuite {
343
+ public static let algorithmP256: Swift.String
344
+ #if compiler(>=5.3)
345
+ public static func canonicalAlgorithm(_ algorithm: Swift.String) -> Swift.String?
346
+ #endif
347
+ public static func supports(_ algorithm: Swift.String) -> Swift.Bool
348
+ public static func areCompatible(_ lhs: Swift.String, _ rhs: Swift.String) -> Swift.Bool
349
+ }
350
+ public enum HawcxV1Crypto {
351
+ public static func generateSalts() throws -> (salt0: Foundation.Data, salt1: Foundation.Data, salt2: Foundation.Data)
352
+ public static func deriveSK0(sharedSecret: Foundation.Data, salt0: Foundation.Data) -> Foundation.Data
353
+ public static func deriveSK1(sharedSecret: Foundation.Data, combinedPrs: Foundation.Data) -> Foundation.Data
354
+ public static func deriveSK2(sharedSecret: Foundation.Data, salt1: Foundation.Data) -> Foundation.Data
355
+ public static func deriveHDS(sharedSecret: Foundation.Data, salt2: Foundation.Data) -> Foundation.Data
356
+ #if compiler(>=5.3)
357
+ public static func encryptCombinedPrs(privateKey: Foundation.Data, sk0: Foundation.Data, iv0: Foundation.Data? = nil) throws -> (combinedprs: Foundation.Data, iv0: Foundation.Data)
358
+ #endif
359
+ public static func decryptCombinedPrs(_ combinedPrs: Foundation.Data, iv0: Foundation.Data, sk0: Foundation.Data) throws -> Foundation.Data
360
+ #if compiler(>=5.3)
361
+ public static func encryptCombinedSalt(salt0: Foundation.Data, infoData: Foundation.Data, sk1: Foundation.Data, iv1: Foundation.Data? = nil) throws -> Foundation.Data
362
+ #endif
363
+ public static func decryptCombinedSalt(_ combinedSalt: Foundation.Data, sk1: Foundation.Data, expectedInfo: Foundation.Data) throws -> Foundation.Data
364
+ #if compiler(>=5.3)
365
+ public static func encryptKeyset(publicKey: Foundation.Data, combinedSalt: Foundation.Data, sk2: Foundation.Data, iv2: Foundation.Data? = nil) throws -> Foundation.Data
366
+ #endif
367
+ public static func decryptKeyset(_ keyset: Foundation.Data, sk2: Foundation.Data) throws -> (publicKey: Foundation.Data, combinedSalt: Foundation.Data)
368
+ public static func computeDFP(hds: Foundation.Data, bundleId: Swift.String, osType: Swift.String) -> Foundation.Data
369
+ public static func computeHI(salt1: Foundation.Data, salt2: Foundation.Data, sk2: Foundation.Data, combinedPrs: Foundation.Data, aPeer: Foundation.Data, sharedSecret: Foundation.Data, userId: Swift.String, domain: Swift.String, dfp: Foundation.Data) -> Swift.String
370
+ public static func makeInfoString(bui: Swift.String, osType: Swift.String, algorithm: Swift.String) -> Foundation.Data
371
+ public static func signChallenge(challenge: Swift.String, challengeEncoding: Swift.String, domain: Swift.String, privateKeyData: Foundation.Data) throws -> (signature: Swift.String, mapp: Swift.String)
372
+ public static func signMessage(_ message: Foundation.Data, privateKeyData: Foundation.Data) throws -> Swift.String
373
+ public static func randomBytes(count: Swift.Int) throws -> Foundation.Data
374
+ public static func sha256(_ data: Foundation.Data) -> Foundation.Data
375
+ public static func symmetricKeyData(_ key: CryptoKit.SymmetricKey) -> Foundation.Data
376
+ }
377
+ public enum HawcxV1DeviceCryptoStoreError : Swift.Error {
378
+ case encodingFailed
379
+ case decodingFailed
380
+ case corruptedRecord
381
+ case secureEnclaveUnavailable
382
+ public static func == (a: HawcxFramework.HawcxV1DeviceCryptoStoreError, b: HawcxFramework.HawcxV1DeviceCryptoStoreError) -> Swift.Bool
383
+ public func hash(into hasher: inout Swift.Hasher)
384
+ public var hashValue: Swift.Int {
385
+ get
386
+ }
387
+ }
388
+ public enum HawcxV1WrapMetadata : Swift.Codable, Swift.Equatable {
389
+ case secureEnclave(ephemeralPublicKey: Foundation.Data)
390
+ case fallback(sharedSecret: Foundation.Data)
391
+ public init(from decoder: any Swift.Decoder) throws
392
+ public func encode(to encoder: any Swift.Encoder) throws
393
+ public static func == (a: HawcxFramework.HawcxV1WrapMetadata, b: HawcxFramework.HawcxV1WrapMetadata) -> Swift.Bool
394
+ }
395
+ public struct HawcxV1DeviceCryptoRecord : Swift.Codable, Swift.Equatable {
396
+ public let recordVersion: Swift.Int
397
+ public let createdAt: Foundation.TimeInterval
398
+ public let userIdentifier: Swift.String
399
+ public let projectId: Swift.String
400
+ public let algorithm: Swift.String
401
+ public let keyset: Swift.String
402
+ public let hindex: Swift.String
403
+ public let salt1: Foundation.Data
404
+ public let salt2: Foundation.Data
405
+ public let combinedsalt: Foundation.Data?
406
+ public let combinedprs: Foundation.Data
407
+ public let iv0: Foundation.Data
408
+ public let wrapMetadata: HawcxFramework.HawcxV1WrapMetadata
409
+ public static func == (a: HawcxFramework.HawcxV1DeviceCryptoRecord, b: HawcxFramework.HawcxV1DeviceCryptoRecord) -> Swift.Bool
410
+ public func encode(to encoder: any Swift.Encoder) throws
411
+ public init(from decoder: any Swift.Decoder) throws
412
+ }
413
+ final public class HawcxV1DeviceCryptoStore {
414
+ #if compiler(>=5.3)
415
+ public init(serviceName: Swift.String? = nil, useSecureEnclave: Swift.Bool = true)
416
+ #endif
417
+ final public func recordKey(identifier: Swift.String, projectId: Swift.String) -> Swift.String
418
+ final public func save(record: HawcxFramework.HawcxV1DeviceCryptoRecord) throws
419
+ #if compiler(>=5.3)
420
+ final public func load(identifier: Swift.String, projectId: Swift.String) throws -> HawcxFramework.HawcxV1DeviceCryptoRecord?
421
+ #endif
422
+ final public func delete(identifier: Swift.String, projectId: Swift.String)
423
+ final public func createSharedSecret(identifier: Swift.String, projectId: Swift.String) throws -> (secret: Foundation.Data, metadata: HawcxFramework.HawcxV1WrapMetadata, peerPublicKey: Foundation.Data)
424
+ final public func sharedSecret(identifier: Swift.String, projectId: Swift.String, metadata: HawcxFramework.HawcxV1WrapMetadata) throws -> Foundation.Data
425
+ #if compiler(>=5.3)
426
+ final public func deviceCredentials(identifier: Swift.String, projectId: Swift.String) -> HawcxFramework.HawcxV1DeviceCredentials?
427
+ #endif
428
+ @objc deinit
429
+ }
430
+ public struct HawcxV1DeviceCryptoError : Swift.Error {
431
+ public let code: Swift.String
432
+ public let message: Swift.String
433
+ public let shouldClearRecord: Swift.Bool
434
+ public init(code: Swift.String, message: Swift.String, shouldClearRecord: Swift.Bool)
435
+ }
436
+ public protocol HawcxV1DeviceCryptoHandling {
437
+ func handleSetupDevice(domain: Swift.String, algorithm: Swift.String, version: Swift.String, identifier: Swift.String) throws -> HawcxFramework.HawcxV1Action
438
+ func handleDeviceChallenge(challenge: Swift.String, challengeEncoding: Swift.String, keyId: Swift.String, algorithm: Swift.String, domain: Swift.String, combinedsalt: Swift.String, responseEncoding: Swift.String, identifier: Swift.String) throws -> HawcxFramework.HawcxV1Action
439
+ #if compiler(>=5.3)
440
+ func deviceCredentials(for identifier: Swift.String) -> HawcxFramework.HawcxV1DeviceCredentials?
441
+ #endif
442
+ func clearRecord(for identifier: Swift.String)
443
+ }
444
+ final public class HawcxV1DeviceCryptoService : HawcxFramework.HawcxV1DeviceCryptoHandling {
445
+ final public let projectId: Swift.String
446
+ final public let store: HawcxFramework.HawcxV1DeviceCryptoStore
447
+ public init(projectId: Swift.String, store: HawcxFramework.HawcxV1DeviceCryptoStore = HawcxV1DeviceCryptoStore())
448
+ #if compiler(>=5.3)
449
+ final public func deviceCredentials(for identifier: Swift.String) -> HawcxFramework.HawcxV1DeviceCredentials?
450
+ #endif
451
+ final public func clearRecord(for identifier: Swift.String)
452
+ #if compiler(>=5.3)
453
+ final public func makeDeviceCredentialsProvider() -> (Swift.String) -> HawcxFramework.HawcxV1DeviceCredentials?
454
+ #endif
455
+ final public func makeDeviceCredentialsInvalidator() -> (Swift.String) -> Swift.Void
456
+ final public func handleSetupDevice(domain: Swift.String, algorithm: Swift.String, version: Swift.String, identifier: Swift.String) throws -> HawcxFramework.HawcxV1Action
457
+ final public func handleDeviceChallenge(challenge: Swift.String, challengeEncoding: Swift.String, keyId: Swift.String, algorithm: Swift.String, domain: Swift.String, combinedsalt: Swift.String, responseEncoding: Swift.String, identifier: Swift.String) throws -> HawcxFramework.HawcxV1Action
458
+ @objc deinit
459
+ }
460
+ public struct HawcxV1PromptContext : Swift.Equatable {
461
+ public let session: Swift.String
462
+ public let meta: HawcxFramework.HawcxV1ResponseMeta
463
+ public let stepInfo: HawcxFramework.HawcxV1StepInfo?
464
+ public let risk: HawcxFramework.HawcxV1RiskInfo?
465
+ public let codeChannel: Swift.String?
466
+ #if compiler(>=5.3)
467
+ public init(session: Swift.String, meta: HawcxFramework.HawcxV1ResponseMeta, stepInfo: HawcxFramework.HawcxV1StepInfo?, risk: HawcxFramework.HawcxV1RiskInfo?, codeChannel: Swift.String? = nil)
468
+ #endif
469
+ public init(session: Swift.String, meta: HawcxFramework.HawcxV1ResponseMeta)
470
+ public static func == (a: HawcxFramework.HawcxV1PromptContext, b: HawcxFramework.HawcxV1PromptContext) -> Swift.Bool
471
+ }
472
+ public enum HawcxV1UserPrompt : Swift.Equatable {
473
+ case selectMethod(methods: [HawcxFramework.HawcxV1Method], phase: Swift.String?)
474
+ case enterCode(destination: Swift.String, codeLength: Swift.Int?, codeFormat: Swift.String?, codeExpiresAt: Swift.String?, resendAt: Swift.String?)
475
+ case enterTotp
476
+ case setupTotp(secret: Swift.String, otpauthUrl: Swift.String, period: Swift.Int?)
477
+ case setupSms(existingPhone: Swift.String?)
478
+ case redirect(url: Swift.String, returnScheme: Swift.String?)
479
+ case awaitApproval(qrData: Swift.String?, expiresAt: Swift.String, pollInterval: Swift.Int)
480
+ public static func == (a: HawcxFramework.HawcxV1UserPrompt, b: HawcxFramework.HawcxV1UserPrompt) -> Swift.Bool
481
+ }
482
+ public enum HawcxV1FlowUpdate : Swift.Equatable {
483
+ case idle
484
+ case loading(session: Swift.String?)
485
+ case prompt(context: HawcxFramework.HawcxV1PromptContext, prompt: HawcxFramework.HawcxV1UserPrompt)
486
+ case completed(session: Swift.String, authCode: Swift.String, expiresAt: Swift.String, codeVerifier: Swift.String?, meta: HawcxFramework.HawcxV1ResponseMeta)
487
+ case error(session: Swift.String?, code: Swift.String, action: HawcxFramework.HawcxV1ErrorAction?, message: Swift.String, retryable: Swift.Bool, details: HawcxFramework.HawcxV1ErrorDetails?, meta: HawcxFramework.HawcxV1ResponseMeta?)
488
+ public static func == (a: HawcxFramework.HawcxV1FlowUpdate, b: HawcxFramework.HawcxV1FlowUpdate) -> Swift.Bool
489
+ }
490
+ final public class HawcxV1FlowController {
491
+ final public let client: HawcxFramework.HawcxProtocolV1Client
492
+ final public let autoPollApprovals: Swift.Bool
493
+ final public let primaryMethodSelectionPolicy: HawcxFramework.HawcxV1PrimaryMethodSelectionPolicy
494
+ final public let callbackQueue: Dispatch.DispatchQueue
495
+ final public var onUpdate: ((HawcxFramework.HawcxV1FlowUpdate) -> Swift.Void)?
496
+ public init(client: HawcxFramework.HawcxProtocolV1Client, autoPollApprovals: Swift.Bool = true, primaryMethodSelectionPolicy: HawcxFramework.HawcxV1PrimaryMethodSelectionPolicy = .manual, callbackQueue: Dispatch.DispatchQueue = .main)
497
+ final public func reset()
498
+ #if compiler(>=5.3)
499
+ final public func start(flowType: HawcxFramework.HawcxV1FlowType, identifier: Swift.String, startToken: Swift.String? = nil, inviteCode: Swift.String? = nil, codeChallenge: Swift.String? = nil, device: HawcxFramework.HawcxV1DeviceInfo? = nil)
500
+ #endif
501
+ final public func selectMethod(_ methodId: Swift.String)
502
+ final public func submitCode(_ code: Swift.String)
503
+ final public func submitTotp(_ code: Swift.String)
504
+ final public func submitPhone(_ phone: Swift.String)
505
+ @discardableResult
506
+ final public func resend() -> Swift.Bool
507
+ final public func poll()
508
+ final public func oauthCallback(code: Swift.String, state: Swift.String)
509
+ final public func cancel()
510
+ final public func canResend(now: Foundation.Date = Date()) -> Swift.Bool
511
+ @objc deinit
512
+ }
513
+ public enum HawcxV1QrPayloadType : Swift.String, Swift.Equatable {
514
+ case qrAuth
515
+ case qrLogin
516
+ #if compiler(>=5.3)
517
+ public init?(rawValue: Swift.String)
518
+ #endif
519
+ public typealias RawValue = Swift.String
520
+ public var rawValue: Swift.String {
521
+ get
522
+ }
523
+ }
524
+ public struct HawcxV1QrPayload : Swift.Equatable {
525
+ public let type: HawcxFramework.HawcxV1QrPayloadType
526
+ public let sessionId: Swift.String
527
+ public let nonce: Swift.String
528
+ public let phoneActionToken: Swift.String?
529
+ public let token: Swift.String?
530
+ public let projectId: Swift.String?
531
+ public let version: Swift.String?
532
+ public let raw: Swift.String
533
+ public var isQrLogin: Swift.Bool {
534
+ get
535
+ }
536
+ #if compiler(>=5.3)
537
+ public init(type: HawcxFramework.HawcxV1QrPayloadType, sessionId: Swift.String, nonce: Swift.String, phoneActionToken: Swift.String?, token: Swift.String?, projectId: Swift.String?, version: Swift.String?, raw: Swift.String)
538
+ #endif
539
+ public static func == (a: HawcxFramework.HawcxV1QrPayload, b: HawcxFramework.HawcxV1QrPayload) -> Swift.Bool
540
+ }
541
+ public enum HawcxV1QrPayloadParser {
542
+ #if compiler(>=5.3)
543
+ public static func parse(_ raw: Swift.String) -> HawcxFramework.HawcxV1QrPayload?
544
+ #endif
545
+ }
546
+ public struct HawcxV1QrSignaturePayload : Swift.Equatable {
547
+ public let signature: Swift.String
548
+ public let h2index: Swift.String
549
+ public let sk2: Swift.String
550
+ public init(signature: Swift.String, h2index: Swift.String, sk2: Swift.String)
551
+ public static func == (a: HawcxFramework.HawcxV1QrSignaturePayload, b: HawcxFramework.HawcxV1QrSignaturePayload) -> Swift.Bool
552
+ }
553
+ public protocol HawcxV1QrSigning {
554
+ func signQrMessage(_ message: Swift.String, identifier: Swift.String) throws -> HawcxFramework.HawcxV1QrSignaturePayload
555
+ func clearRecord(for identifier: Swift.String)
556
+ }
557
+ public enum HawcxV1QrApprovalOutcome : Swift.Equatable {
558
+ case approved
559
+ case bound(userid: Swift.String?)
560
+ public static func == (a: HawcxFramework.HawcxV1QrApprovalOutcome, b: HawcxFramework.HawcxV1QrApprovalOutcome) -> Swift.Bool
561
+ }
562
+ public struct HawcxV1QrApprovalError : Swift.Error, Swift.Equatable {
563
+ public let code: Swift.String
564
+ public let message: Swift.String
565
+ public let retryable: Swift.Bool
566
+ public let shouldClearRecord: Swift.Bool
567
+ public let retryAfterSeconds: Swift.Int?
568
+ #if compiler(>=5.3)
569
+ public init(code: Swift.String, message: Swift.String, retryable: Swift.Bool, shouldClearRecord: Swift.Bool, retryAfterSeconds: Swift.Int?)
570
+ #endif
571
+ public static func == (a: HawcxFramework.HawcxV1QrApprovalError, b: HawcxFramework.HawcxV1QrApprovalError) -> Swift.Bool
572
+ }
573
+ final public class HawcxV1QrApprovalService {
574
+ final public let config: HawcxFramework.HawcxV1ClientConfig
575
+ public init(config: HawcxFramework.HawcxV1ClientConfig, signer: any HawcxFramework.HawcxV1QrSigning, urlSession: Foundation.URLSession = .shared)
576
+ #if compiler(>=5.3)
577
+ final public func approve(payload: HawcxFramework.HawcxV1QrPayload, identifier: Swift.String, rememberDevice: Swift.Bool = false, completion: @escaping (Swift.Result<HawcxFramework.HawcxV1QrApprovalOutcome, HawcxFramework.HawcxV1QrApprovalError>) -> Swift.Void)
578
+ #endif
579
+ #if compiler(>=5.3)
580
+ final public func approveQrAuth(payload: HawcxFramework.HawcxV1QrPayload, identifier: Swift.String, rememberDevice: Swift.Bool = false, completion: @escaping (Swift.Result<HawcxFramework.HawcxV1QrApprovalOutcome, HawcxFramework.HawcxV1QrApprovalError>) -> Swift.Void)
581
+ #endif
582
+ #if compiler(>=5.3)
583
+ final public func approveQrLogin(payload: HawcxFramework.HawcxV1QrPayload, identifier: Swift.String, rememberDevice: Swift.Bool = false, completion: @escaping (Swift.Result<HawcxFramework.HawcxV1QrApprovalOutcome, HawcxFramework.HawcxV1QrApprovalError>) -> Swift.Void)
584
+ #endif
585
+ @objc deinit
586
+ }
587
+ extension HawcxFramework.HawcxV1DeviceCryptoService : HawcxFramework.HawcxV1QrSigning {
588
+ final public func signQrMessage(_ message: Swift.String, identifier: Swift.String) throws -> HawcxFramework.HawcxV1QrSignaturePayload
589
+ }
590
+ public struct HawcxV1OAuthCallback : Swift.Equatable {
591
+ public let code: Swift.String
592
+ public let state: Swift.String
593
+ public init(code: Swift.String, state: Swift.String)
594
+ public static func == (a: HawcxFramework.HawcxV1OAuthCallback, b: HawcxFramework.HawcxV1OAuthCallback) -> Swift.Bool
595
+ }
596
+ public enum HawcxV1OAuthCallbackParser {
597
+ #if compiler(>=5.3)
598
+ public static func parse(_ url: Foundation.URL) -> HawcxFramework.HawcxV1OAuthCallback?
599
+ #endif
600
+ }
601
+ public enum HawcxV1OAuthRedirectError : Swift.Error, Swift.Equatable {
602
+ case cancelled
603
+ case invalidCallback
604
+ case failed(Swift.String)
605
+ public static func == (a: HawcxFramework.HawcxV1OAuthRedirectError, b: HawcxFramework.HawcxV1OAuthRedirectError) -> Swift.Bool
606
+ }
607
+ @objc @_Concurrency.MainActor @preconcurrency final public class HawcxV1OAuthRedirectSession : ObjectiveC.NSObject, AuthenticationServices.ASWebAuthenticationPresentationContextProviding {
608
+ @_Concurrency.MainActor @preconcurrency public init(presentationAnchorProvider: @escaping () -> AuthenticationServices.ASPresentationAnchor)
609
+ #if compiler(>=5.3)
610
+ @_Concurrency.MainActor @preconcurrency final public func start(url: Foundation.URL, callbackScheme: Swift.String?, prefersEphemeralSession: Swift.Bool = false, completion: @escaping (Swift.Result<Foundation.URL, HawcxFramework.HawcxV1OAuthRedirectError>) -> Swift.Void)
611
+ #endif
612
+ @_Concurrency.MainActor @preconcurrency final public func cancel()
613
+ @_Concurrency.MainActor @preconcurrency @objc final public func presentationAnchor(for session: AuthenticationServices.ASWebAuthenticationSession) -> AuthenticationServices.ASPresentationAnchor
614
+ @objc deinit
615
+ }
616
+ public struct HawcxV1OAuthToken : Swift.Equatable {
617
+ public let idToken: Swift.String
618
+ public let tokenType: Swift.String?
619
+ public let expiresIn: Swift.Int?
620
+ public static func == (a: HawcxFramework.HawcxV1OAuthToken, b: HawcxFramework.HawcxV1OAuthToken) -> Swift.Bool
621
+ }
622
+ public enum HawcxV1OAuthExchangeError : Swift.Error, Swift.Equatable {
623
+ case invalidConfiguration(Swift.String)
624
+ case requestEncodingFailed
625
+ case transportError(Swift.String)
626
+ case invalidResponse(Swift.String)
627
+ case tokenVerificationFailed(Swift.String)
628
+ public static func == (a: HawcxFramework.HawcxV1OAuthExchangeError, b: HawcxFramework.HawcxV1OAuthExchangeError) -> Swift.Bool
629
+ }
630
+ @_hasMissingDesignatedInitializers final public class HawcxV1OAuthExchangeService {
631
+ public init(config: HawcxFramework.HawcxOAuthConfig, urlSession: Foundation.URLSession = .shared)
632
+ #if compiler(>=5.3)
633
+ final public func exchange(authCode: Swift.String, codeVerifier: Swift.String? = nil, completion: @escaping (Swift.Result<HawcxFramework.HawcxV1OAuthToken, HawcxFramework.HawcxV1OAuthExchangeError>) -> Swift.Void)
634
+ #endif
635
+ @objc deinit
636
+ }
18
637
  public struct PushLoginRequestDetails : Swift.Codable {
19
638
  public let requestId: Swift.String
20
639
  public let ipAddress: Swift.String
@@ -72,22 +691,22 @@ public struct SessionDetails : Swift.Codable {
72
691
  public let city: Swift.String?
73
692
  public let state: Swift.String?
74
693
  public let country: Swift.String?
75
- #if compiler(>=5.3) && $NonescapableTypes
694
+ #if compiler(>=5.3)
76
695
  public var derivedOsDetails: Swift.String? {
77
696
  get
78
697
  }
79
698
  #endif
80
- #if compiler(>=5.3) && $NonescapableTypes
699
+ #if compiler(>=5.3)
81
700
  public var derivedBrowserWithVersion: Swift.String? {
82
701
  get
83
702
  }
84
703
  #endif
85
- #if compiler(>=5.3) && $NonescapableTypes
704
+ #if compiler(>=5.3)
86
705
  public var derivedDeviceType: Swift.String? {
87
706
  get
88
707
  }
89
708
  #endif
90
- #if compiler(>=5.3) && $NonescapableTypes
709
+ #if compiler(>=5.3)
91
710
  public var derivedLocation: Swift.String? {
92
711
  get
93
712
  }
@@ -103,32 +722,32 @@ public struct Device : Swift.Codable, Swift.Identifiable, Swift.Hashable {
103
722
  public let model: Swift.String?
104
723
  public let osVersion: Swift.String?
105
724
  public let loginTime: Swift.String?
106
- #if compiler(>=5.3) && $NonescapableTypes
725
+ #if compiler(>=5.3)
107
726
  public var osDetails: Swift.String? {
108
727
  get
109
728
  }
110
729
  #endif
111
- #if compiler(>=5.3) && $NonescapableTypes
730
+ #if compiler(>=5.3)
112
731
  public var browserWithVersion: Swift.String? {
113
732
  get
114
733
  }
115
734
  #endif
116
- #if compiler(>=5.3) && $NonescapableTypes
735
+ #if compiler(>=5.3)
117
736
  public var deviceType: Swift.String? {
118
737
  get
119
738
  }
120
739
  #endif
121
- #if compiler(>=5.3) && $NonescapableTypes
740
+ #if compiler(>=5.3)
122
741
  public var sessionDetails: [HawcxFramework.Session]? {
123
742
  get
124
743
  }
125
744
  #endif
126
745
  public static func == (lhs: HawcxFramework.Device, rhs: HawcxFramework.Device) -> Swift.Bool
127
746
  public func hash(into hasher: inout Swift.Hasher)
128
- #if compiler(>=5.3) && $NonescapableTypes
747
+ #if compiler(>=5.3)
129
748
  public init(id: Foundation.UUID = UUID(), devId: Swift.String?, platform: Swift.String? = nil, browserName: Swift.String? = nil, model: Swift.String? = nil, osVersion: Swift.String? = nil, loginTime: Swift.String? = nil)
130
749
  #endif
131
- #if compiler(>=5.3) && $NonescapableTypes
750
+ #if compiler(>=5.3)
132
751
  public init(id: Foundation.UUID = UUID(), devId: Swift.String?, osDetails: Swift.String?, browserWithVersion: Swift.String?, deviceType: Swift.String?, sessionDetails: [HawcxFramework.Session]?)
133
752
  #endif
134
753
  public typealias ID = Foundation.UUID
@@ -189,7 +808,7 @@ public enum AuthV4ErrorCode : Swift.String, Swift.Error {
189
808
  case oauthExchangeFailed
190
809
  case oauthTokenVerificationFailed
191
810
  case fingerprintError
192
- #if compiler(>=5.3) && $NonescapableTypes
811
+ #if compiler(>=5.3)
193
812
  public init?(rawValue: Swift.String)
194
813
  #endif
195
814
  public typealias RawValue = Swift.String
@@ -202,7 +821,7 @@ public enum WebLoginErrorCode : Swift.String, Swift.Error {
202
821
  case invalidPin
203
822
  case failedApprove
204
823
  case networkError
205
- #if compiler(>=5.3) && $NonescapableTypes
824
+ #if compiler(>=5.3)
206
825
  public init?(rawValue: Swift.String)
207
826
  #endif
208
827
  public typealias RawValue = Swift.String
@@ -212,7 +831,7 @@ public enum WebLoginErrorCode : Swift.String, Swift.Error {
212
831
  }
213
832
  public protocol AuthV4Callback : AnyObject {
214
833
  func onOtpRequired()
215
- #if compiler(>=5.3) && $NonescapableTypes
834
+ #if compiler(>=5.3)
216
835
  func onAuthSuccess(accessToken: Swift.String?, refreshToken: Swift.String?, isLoginFlow: Swift.Bool)
217
836
  #endif
218
837
  func onError(errorCode: HawcxFramework.AuthV4ErrorCode, errorMessage: Swift.String)
@@ -233,7 +852,7 @@ public enum AuthV5ErrorCode : Swift.String, Swift.Error {
233
852
  case oauthConfigurationMissing
234
853
  case oauthExchangeFailed
235
854
  case oauthTokenVerificationFailed
236
- #if compiler(>=5.3) && $NonescapableTypes
855
+ #if compiler(>=5.3)
237
856
  public init?(rawValue: Swift.String)
238
857
  #endif
239
858
  public typealias RawValue = Swift.String
@@ -243,14 +862,14 @@ public enum AuthV5ErrorCode : Swift.String, Swift.Error {
243
862
  }
244
863
  public protocol AuthV5Callback : AnyObject {
245
864
  func onOtpRequired()
246
- #if compiler(>=5.3) && $NonescapableTypes
865
+ #if compiler(>=5.3)
247
866
  func onAuthSuccess(accessToken: Swift.String?, refreshToken: Swift.String?, isLoginFlow: Swift.Bool)
248
867
  #endif
249
868
  func onError(errorCode: HawcxFramework.AuthV5ErrorCode, errorMessage: Swift.String)
250
- #if compiler(>=5.3) && $NonescapableTypes
869
+ #if compiler(>=5.3)
251
870
  func onAuthorizationCode(code: Swift.String, expiresIn: Swift.Int?)
252
871
  #endif
253
- #if compiler(>=5.3) && $NonescapableTypes
872
+ #if compiler(>=5.3)
254
873
  func onAdditionalVerificationRequired(sessionId: Swift.String, detail: Swift.String?)
255
874
  #endif
256
875
  }
@@ -260,7 +879,7 @@ public protocol HawcxPushAuthDelegate : AnyObject {
260
879
  }
261
880
  public class HawcxSDK {
262
881
  weak public var pushAuthDelegate: (any HawcxFramework.HawcxPushAuthDelegate)?
263
- #if compiler(>=5.3) && $NonescapableTypes
882
+ #if compiler(>=5.3)
264
883
  public init(projectApiKey: Swift.String, baseURL: Swift.String, oauthConfig: HawcxFramework.HawcxOAuthConfig? = nil)
265
884
  #endif
266
885
  public func authenticateV4(userid: Swift.String, callback: any HawcxFramework.AuthV4Callback)
@@ -273,14 +892,14 @@ public class HawcxSDK {
273
892
  public func setAPNsDeviceToken(_ tokenData: Foundation.Data)
274
893
  public func userDidAuthenticate()
275
894
  public func handlePushNotification(userInfo: [Swift.AnyHashable : Any]) -> Swift.Bool
276
- #if compiler(>=5.3) && $NonescapableTypes
895
+ #if compiler(>=5.3)
277
896
  public func approveLoginRequest(requestId: Swift.String, completion: @escaping ((any Swift.Error)?) -> Swift.Void)
278
897
  #endif
279
- #if compiler(>=5.3) && $NonescapableTypes
898
+ #if compiler(>=5.3)
280
899
  public func declineLoginRequest(requestId: Swift.String, completion: @escaping ((any Swift.Error)?) -> Swift.Void)
281
900
  #endif
282
901
  public func getLastLoggedInUser() -> Swift.String
283
- #if compiler(>=5.3) && $NonescapableTypes
902
+ #if compiler(>=5.3)
284
903
  @discardableResult
285
904
  public func storeBackendOAuthTokens(accessToken: Swift.String, refreshToken: Swift.String?, forUser userId: Swift.String) -> Swift.Bool
286
905
  #endif
@@ -299,6 +918,15 @@ public protocol WebLoginCallback {
299
918
  func showError(webLoginErrorCode: HawcxFramework.WebLoginErrorCode, errorMessage: Swift.String)
300
919
  func onSuccess()
301
920
  }
921
+ extension HawcxFramework.HawcxV1FlowType : Swift.Equatable {}
922
+ extension HawcxFramework.HawcxV1FlowType : Swift.Hashable {}
923
+ extension HawcxFramework.HawcxV1FlowType : Swift.RawRepresentable {}
924
+ extension HawcxFramework.HawcxV1PrimaryMethodSelectionPolicy : Swift.Hashable {}
925
+ extension HawcxFramework.HawcxV1DeviceCryptoStoreError : Swift.Equatable {}
926
+ extension HawcxFramework.HawcxV1DeviceCryptoStoreError : Swift.Hashable {}
927
+ extension HawcxFramework.HawcxV1QrPayloadType : Swift.Hashable {}
928
+ extension HawcxFramework.HawcxV1QrPayloadType : Swift.RawRepresentable {}
929
+ extension HawcxFramework.HawcxV1OAuthRedirectSession : Swift.Sendable {}
302
930
  extension HawcxFramework.SDKLogger.LogLevel : Swift.Equatable {}
303
931
  extension HawcxFramework.SDKLogger.LogLevel : Swift.Hashable {}
304
932
  extension HawcxFramework.AuthV4ErrorCode : Swift.Equatable {}