react-native-plaid-link-sdk 13.4.0 → 13.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +21 -3
- package/CHANGELOG.md +81 -0
- package/README.md +44 -3
- package/android/build.gradle +1 -1
- package/android/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/expo/modules/plaidlinksdk/RNPlaidLinkSdkVersion.kt +1 -1
- package/build/ReactNativePlaidLinkSdk.types.d.ts +68 -2
- package/build/ReactNativePlaidLinkSdk.types.d.ts.map +1 -1
- package/build/ReactNativePlaidLinkSdk.types.js +43 -0
- package/build/ReactNativePlaidLinkSdk.types.js.map +1 -1
- package/build/ReactNativePlaidLinkSdkModule.d.ts +2 -1
- package/build/ReactNativePlaidLinkSdkModule.d.ts.map +1 -1
- package/build/ReactNativePlaidLinkSdkModule.js.map +1 -1
- package/build/index.d.ts +9 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +13 -0
- package/build/index.js.map +1 -1
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Info.plist +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/LinkKit +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.abi.json +2105 -360
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.private.swiftinterface +28 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftinterface +28 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/_CodeSignature/CodeResources +11 -11
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Info.plist +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/LinkKit +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.abi.json +2105 -360
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +28 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +28 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftmodule +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +2105 -360
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +28 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +28 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/_CodeSignature/CodeResources +21 -21
- package/ios/src/RNPlaidLinkSdkVersion.swift +1 -1
- package/ios/src/ReactNativePlaidLinkSdkModule.swift +56 -0
- package/package.json +1 -1
- package/src/ReactNativePlaidLinkSdk.types.ts +80 -1
- package/src/ReactNativePlaidLinkSdkModule.ts +2 -0
- package/src/index.ts +16 -0
|
@@ -322,6 +322,12 @@ public enum FinanceKitError : Foundation.LocalizedError {
|
|
|
322
322
|
case permissionError(message: Swift.String)
|
|
323
323
|
case linkApiError(message: Swift.String)
|
|
324
324
|
case permissionAccessError(message: Swift.String)
|
|
325
|
+
case permissionNotRequested(message: Swift.String)
|
|
326
|
+
case dataUnavailable(message: Swift.String)
|
|
327
|
+
case noAccounts(message: Swift.String)
|
|
328
|
+
case syncFailed(errorType: Swift.String, errorCode: Swift.String, message: Swift.String)
|
|
329
|
+
case channelClosed(message: Swift.String)
|
|
330
|
+
case syncTimedOut(message: Swift.String)
|
|
325
331
|
case unknown(error: any Swift.Error)
|
|
326
332
|
public var errorDescription: Swift.String? {
|
|
327
333
|
get
|
|
@@ -487,6 +493,7 @@ public enum ViewName : Swift.CustomStringConvertible, Swift.Codable, Swift.Equat
|
|
|
487
493
|
case instantMicrodepositVerification
|
|
488
494
|
case sameDayMicrodepositVerification
|
|
489
495
|
case transferStatusCheck
|
|
496
|
+
case institutionLoginInstructions
|
|
490
497
|
case unknown(Swift.String)
|
|
491
498
|
public static var allCases: [LinkKit.ViewName] {
|
|
492
499
|
get
|
|
@@ -683,6 +690,23 @@ public struct PlaidFinanceKit {
|
|
|
683
690
|
public static func sync(token: Swift.String, requestAuthorizationIfNeeded: Swift.Bool, syncBehavior: LinkKit.PlaidFinanceKit.SyncBehavior = .live, completion: @escaping (Swift.Result<Swift.Void, LinkKit.FinanceKitError>) -> Swift.Void)
|
|
684
691
|
@available(iOS 17.4, *)
|
|
685
692
|
public static func sync(token: Swift.String, requestAuthorizationIfNeeded: Swift.Bool, syncBehavior: LinkKit.PlaidFinanceKit.SyncBehavior = .live) async throws
|
|
693
|
+
@available(iOS 17.4, *)
|
|
694
|
+
public enum Status {
|
|
695
|
+
case unavailable
|
|
696
|
+
case notDetermined
|
|
697
|
+
case denied
|
|
698
|
+
case authorized
|
|
699
|
+
case unknown
|
|
700
|
+
public static func == (a: LinkKit.PlaidFinanceKit.Status, b: LinkKit.PlaidFinanceKit.Status) -> Swift.Bool
|
|
701
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
702
|
+
public var hashValue: Swift.Int {
|
|
703
|
+
get
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
@available(iOS 17.4, *)
|
|
707
|
+
public static func status(completion: @escaping (LinkKit.PlaidFinanceKit.Status) -> Swift.Void)
|
|
708
|
+
@available(iOS 17.4, *)
|
|
709
|
+
public static func status() async -> LinkKit.PlaidFinanceKit.Status
|
|
686
710
|
}
|
|
687
711
|
@available(*, deprecated, message: "Present Link with PlaidLinkSheet(session:) or session.sheet() instead")
|
|
688
712
|
@_Concurrency.MainActor @preconcurrency public struct PlaidLinkUIViewControllerRepresentable : SwiftUICore.View {
|
|
@@ -760,5 +784,9 @@ extension LinkKit.Environment : Swift.Hashable {}
|
|
|
760
784
|
extension LinkKit.PlaidFinanceKit.SyncBehavior : Swift.Equatable {}
|
|
761
785
|
@available(iOS 17.4, *)
|
|
762
786
|
extension LinkKit.PlaidFinanceKit.SyncBehavior : Swift.Hashable {}
|
|
787
|
+
@available(iOS 17.4, *)
|
|
788
|
+
extension LinkKit.PlaidFinanceKit.Status : Swift.Equatable {}
|
|
789
|
+
@available(iOS 17.4, *)
|
|
790
|
+
extension LinkKit.PlaidFinanceKit.Status : Swift.Hashable {}
|
|
763
791
|
@available(*, deprecated, message: "Present Link with PlaidLinkSheet(session:) or session.sheet() instead")
|
|
764
792
|
extension LinkKit.PlaidLinkUIViewControllerRepresentable : Swift.Sendable {}
|
|
Binary file
|
|
@@ -322,6 +322,12 @@ public enum FinanceKitError : Foundation.LocalizedError {
|
|
|
322
322
|
case permissionError(message: Swift.String)
|
|
323
323
|
case linkApiError(message: Swift.String)
|
|
324
324
|
case permissionAccessError(message: Swift.String)
|
|
325
|
+
case permissionNotRequested(message: Swift.String)
|
|
326
|
+
case dataUnavailable(message: Swift.String)
|
|
327
|
+
case noAccounts(message: Swift.String)
|
|
328
|
+
case syncFailed(errorType: Swift.String, errorCode: Swift.String, message: Swift.String)
|
|
329
|
+
case channelClosed(message: Swift.String)
|
|
330
|
+
case syncTimedOut(message: Swift.String)
|
|
325
331
|
case unknown(error: any Swift.Error)
|
|
326
332
|
public var errorDescription: Swift.String? {
|
|
327
333
|
get
|
|
@@ -487,6 +493,7 @@ public enum ViewName : Swift.CustomStringConvertible, Swift.Codable, Swift.Equat
|
|
|
487
493
|
case instantMicrodepositVerification
|
|
488
494
|
case sameDayMicrodepositVerification
|
|
489
495
|
case transferStatusCheck
|
|
496
|
+
case institutionLoginInstructions
|
|
490
497
|
case unknown(Swift.String)
|
|
491
498
|
public static var allCases: [LinkKit.ViewName] {
|
|
492
499
|
get
|
|
@@ -683,6 +690,23 @@ public struct PlaidFinanceKit {
|
|
|
683
690
|
public static func sync(token: Swift.String, requestAuthorizationIfNeeded: Swift.Bool, syncBehavior: LinkKit.PlaidFinanceKit.SyncBehavior = .live, completion: @escaping (Swift.Result<Swift.Void, LinkKit.FinanceKitError>) -> Swift.Void)
|
|
684
691
|
@available(iOS 17.4, *)
|
|
685
692
|
public static func sync(token: Swift.String, requestAuthorizationIfNeeded: Swift.Bool, syncBehavior: LinkKit.PlaidFinanceKit.SyncBehavior = .live) async throws
|
|
693
|
+
@available(iOS 17.4, *)
|
|
694
|
+
public enum Status {
|
|
695
|
+
case unavailable
|
|
696
|
+
case notDetermined
|
|
697
|
+
case denied
|
|
698
|
+
case authorized
|
|
699
|
+
case unknown
|
|
700
|
+
public static func == (a: LinkKit.PlaidFinanceKit.Status, b: LinkKit.PlaidFinanceKit.Status) -> Swift.Bool
|
|
701
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
702
|
+
public var hashValue: Swift.Int {
|
|
703
|
+
get
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
@available(iOS 17.4, *)
|
|
707
|
+
public static func status(completion: @escaping (LinkKit.PlaidFinanceKit.Status) -> Swift.Void)
|
|
708
|
+
@available(iOS 17.4, *)
|
|
709
|
+
public static func status() async -> LinkKit.PlaidFinanceKit.Status
|
|
686
710
|
}
|
|
687
711
|
@available(*, deprecated, message: "Present Link with PlaidLinkSheet(session:) or session.sheet() instead")
|
|
688
712
|
@_Concurrency.MainActor @preconcurrency public struct PlaidLinkUIViewControllerRepresentable : SwiftUICore.View {
|
|
@@ -760,5 +784,9 @@ extension LinkKit.Environment : Swift.Hashable {}
|
|
|
760
784
|
extension LinkKit.PlaidFinanceKit.SyncBehavior : Swift.Equatable {}
|
|
761
785
|
@available(iOS 17.4, *)
|
|
762
786
|
extension LinkKit.PlaidFinanceKit.SyncBehavior : Swift.Hashable {}
|
|
787
|
+
@available(iOS 17.4, *)
|
|
788
|
+
extension LinkKit.PlaidFinanceKit.Status : Swift.Equatable {}
|
|
789
|
+
@available(iOS 17.4, *)
|
|
790
|
+
extension LinkKit.PlaidFinanceKit.Status : Swift.Hashable {}
|
|
763
791
|
@available(*, deprecated, message: "Present Link with PlaidLinkSheet(session:) or session.sheet() instead")
|
|
764
792
|
extension LinkKit.PlaidLinkUIViewControllerRepresentable : Swift.Sendable {}
|
|
Binary file
|
|
@@ -14,47 +14,47 @@
|
|
|
14
14
|
</data>
|
|
15
15
|
<key>Info.plist</key>
|
|
16
16
|
<data>
|
|
17
|
-
|
|
17
|
+
KeogQvQ8IybhceYYwOdCeMX0+/k=
|
|
18
18
|
</data>
|
|
19
19
|
<key>Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
20
20
|
<data>
|
|
21
|
-
|
|
21
|
+
A3Q25RofinIMKViCXylZLD0BV5E=
|
|
22
22
|
</data>
|
|
23
23
|
<key>Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
u+MBcaH4QDxWqexQ+UZXEzRoDck=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
DhtqM2E9McYDElBENQfmYk0aWDg=
|
|
30
30
|
</data>
|
|
31
31
|
<key>Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
u+MBcaH4QDxWqexQ+UZXEzRoDck=
|
|
34
34
|
</data>
|
|
35
35
|
<key>Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
36
36
|
<data>
|
|
37
|
-
|
|
37
|
+
k9FX9leG3jAmw20xA2l8ViKiKto=
|
|
38
38
|
</data>
|
|
39
39
|
<key>Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
40
40
|
<data>
|
|
41
|
-
|
|
41
|
+
A3Q25RofinIMKViCXylZLD0BV5E=
|
|
42
42
|
</data>
|
|
43
43
|
<key>Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
44
44
|
<data>
|
|
45
|
-
|
|
45
|
+
7VawhH5/X+52PP1PKgwcWR2X2JM=
|
|
46
46
|
</data>
|
|
47
47
|
<key>Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
48
48
|
<data>
|
|
49
|
-
|
|
49
|
+
4It/RrJx74Td2VjWAGh7ehvFUno=
|
|
50
50
|
</data>
|
|
51
51
|
<key>Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
52
52
|
<data>
|
|
53
|
-
|
|
53
|
+
7VawhH5/X+52PP1PKgwcWR2X2JM=
|
|
54
54
|
</data>
|
|
55
55
|
<key>Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
56
56
|
<data>
|
|
57
|
-
|
|
57
|
+
7ohq6tGRfsM+GSP9k+/6oEJx/1g=
|
|
58
58
|
</data>
|
|
59
59
|
<key>Modules/module.modulemap</key>
|
|
60
60
|
<data>
|
|
@@ -85,70 +85,70 @@
|
|
|
85
85
|
<dict>
|
|
86
86
|
<key>hash2</key>
|
|
87
87
|
<data>
|
|
88
|
-
|
|
88
|
+
pHyqNmblw3/h3rzzOhopjfgkP7AjXFfzzF21lFvfQzs=
|
|
89
89
|
</data>
|
|
90
90
|
</dict>
|
|
91
91
|
<key>Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
92
92
|
<dict>
|
|
93
93
|
<key>hash2</key>
|
|
94
94
|
<data>
|
|
95
|
-
|
|
95
|
+
vGo5fWIsjaUFdMueqs38+nbuuz1A03WD3IRszXKJfM4=
|
|
96
96
|
</data>
|
|
97
97
|
</dict>
|
|
98
98
|
<key>Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
99
99
|
<dict>
|
|
100
100
|
<key>hash2</key>
|
|
101
101
|
<data>
|
|
102
|
-
|
|
102
|
+
4+c8NpeqCEaGbdtG38YvBvo8kqw7LWLfrngUX5Y5QNo=
|
|
103
103
|
</data>
|
|
104
104
|
</dict>
|
|
105
105
|
<key>Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
106
106
|
<dict>
|
|
107
107
|
<key>hash2</key>
|
|
108
108
|
<data>
|
|
109
|
-
|
|
109
|
+
vGo5fWIsjaUFdMueqs38+nbuuz1A03WD3IRszXKJfM4=
|
|
110
110
|
</data>
|
|
111
111
|
</dict>
|
|
112
112
|
<key>Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
113
113
|
<dict>
|
|
114
114
|
<key>hash2</key>
|
|
115
115
|
<data>
|
|
116
|
-
|
|
116
|
+
oKmBx9aPxsBaAGmdmMSS3zuWo+mm8Uuq7FxmW/dP9NM=
|
|
117
117
|
</data>
|
|
118
118
|
</dict>
|
|
119
119
|
<key>Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
120
120
|
<dict>
|
|
121
121
|
<key>hash2</key>
|
|
122
122
|
<data>
|
|
123
|
-
|
|
123
|
+
pHyqNmblw3/h3rzzOhopjfgkP7AjXFfzzF21lFvfQzs=
|
|
124
124
|
</data>
|
|
125
125
|
</dict>
|
|
126
126
|
<key>Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
127
127
|
<dict>
|
|
128
128
|
<key>hash2</key>
|
|
129
129
|
<data>
|
|
130
|
-
|
|
130
|
+
f77jX61dj1XOw/nsG3LJ8RgwK4kCQD0yyBv0JzU6YhM=
|
|
131
131
|
</data>
|
|
132
132
|
</dict>
|
|
133
133
|
<key>Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
134
134
|
<dict>
|
|
135
135
|
<key>hash2</key>
|
|
136
136
|
<data>
|
|
137
|
-
|
|
137
|
+
dLazbkfiVAw6NxBZ3jh0j+ksIyR35+RrrSMwexjU050=
|
|
138
138
|
</data>
|
|
139
139
|
</dict>
|
|
140
140
|
<key>Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
141
141
|
<dict>
|
|
142
142
|
<key>hash2</key>
|
|
143
143
|
<data>
|
|
144
|
-
|
|
144
|
+
f77jX61dj1XOw/nsG3LJ8RgwK4kCQD0yyBv0JzU6YhM=
|
|
145
145
|
</data>
|
|
146
146
|
</dict>
|
|
147
147
|
<key>Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
148
148
|
<dict>
|
|
149
149
|
<key>hash2</key>
|
|
150
150
|
<data>
|
|
151
|
-
|
|
151
|
+
NkoFf/VBUX0it4cmBOHA+uEKhYi22DxDUQOU3Hawvd4=
|
|
152
152
|
</data>
|
|
153
153
|
</dict>
|
|
154
154
|
<key>Modules/module.modulemap</key>
|
|
@@ -15,5 +15,5 @@ public class RNPlaidLinkSdkVersion: NSObject {
|
|
|
15
15
|
///
|
|
16
16
|
/// This should match the version specified in package.json.
|
|
17
17
|
/// Update this value when bumping the SDK version.
|
|
18
|
-
@objc public static let sdkVersion: String = "13.
|
|
18
|
+
@objc public static let sdkVersion: String = "13.5.0"
|
|
19
19
|
}
|
|
@@ -368,6 +368,20 @@ public class ReactNativePlaidLinkSdkModule: Module {
|
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
+
|
|
372
|
+
AsyncFunction(ModuleFunctionName.getFinanceKitStatus.rawValue) { (promise: Promise) in
|
|
373
|
+
if #available(iOS 17.4, *) {
|
|
374
|
+
PlaidFinanceKit.status { status in
|
|
375
|
+
DispatchQueue.main.async {
|
|
376
|
+
promise.resolve(status.asString)
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
} else {
|
|
380
|
+
DispatchQueue.main.async {
|
|
381
|
+
promise.reject("UNSUPPORTED_IOS_VERSION", "FinanceKit requires iOS 17.4 or later")
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
371
385
|
}
|
|
372
386
|
|
|
373
387
|
// MARK: Enums
|
|
@@ -390,6 +404,7 @@ public class ReactNativePlaidLinkSdkModule: Module {
|
|
|
390
404
|
case submitLayerData
|
|
391
405
|
case startHeadlessSession
|
|
392
406
|
case syncFinanceKit
|
|
407
|
+
case getFinanceKitStatus
|
|
393
408
|
}
|
|
394
409
|
|
|
395
410
|
// MARK: Private
|
|
@@ -402,6 +417,21 @@ public class ReactNativePlaidLinkSdkModule: Module {
|
|
|
402
417
|
|
|
403
418
|
// MARK: Internal Extensions
|
|
404
419
|
|
|
420
|
+
@available(iOS 17.4, *)
|
|
421
|
+
extension PlaidFinanceKit.Status {
|
|
422
|
+
/// Values match the `FinanceKitStatus` enum in `ReactNativePlaidLinkSdk.types.ts`.
|
|
423
|
+
var asString: String {
|
|
424
|
+
switch self {
|
|
425
|
+
case .unavailable: return "unavailable"
|
|
426
|
+
case .notDetermined: return "notDetermined"
|
|
427
|
+
case .denied: return "denied"
|
|
428
|
+
case .authorized: return "authorized"
|
|
429
|
+
case .unknown: return "unknown"
|
|
430
|
+
@unknown default: return "unknown"
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
|
|
405
435
|
extension Institution {
|
|
406
436
|
var asDictionary: [String: Any] {
|
|
407
437
|
return [
|
|
@@ -549,6 +579,8 @@ struct LayerSubmissionData: SubmissionData {
|
|
|
549
579
|
|
|
550
580
|
@available(iOS 17.4, *)
|
|
551
581
|
extension LinkKit.FinanceKitError {
|
|
582
|
+
/// `errorType` values mirror LinkKit's Objective-C `PLKPlaidFinanceKitError` codes and
|
|
583
|
+
/// the JavaScript `FinanceKitErrorType` enum, so the three stay comparable.
|
|
552
584
|
fileprivate var asFinanceKitErrorDictionary: [String: Any] {
|
|
553
585
|
let errorType: Int
|
|
554
586
|
let errorCode: String
|
|
@@ -575,6 +607,30 @@ extension LinkKit.FinanceKitError {
|
|
|
575
607
|
errorType = 4
|
|
576
608
|
errorCode = "UNKNOWN"
|
|
577
609
|
errorMessage = error.localizedDescription
|
|
610
|
+
case .noAccounts:
|
|
611
|
+
errorType = 5
|
|
612
|
+
errorCode = "NO_ACCOUNTS"
|
|
613
|
+
errorMessage = self.localizedDescription
|
|
614
|
+
case .syncFailed:
|
|
615
|
+
errorType = 6
|
|
616
|
+
errorCode = "SYNC_FAILED"
|
|
617
|
+
errorMessage = self.localizedDescription
|
|
618
|
+
case .permissionNotRequested:
|
|
619
|
+
errorType = 7
|
|
620
|
+
errorCode = "PERMISSION_NOT_REQUESTED"
|
|
621
|
+
errorMessage = self.localizedDescription
|
|
622
|
+
case .dataUnavailable:
|
|
623
|
+
errorType = 8
|
|
624
|
+
errorCode = "DATA_UNAVAILABLE"
|
|
625
|
+
errorMessage = self.localizedDescription
|
|
626
|
+
case .channelClosed:
|
|
627
|
+
errorType = 9
|
|
628
|
+
errorCode = "CHANNEL_CLOSED"
|
|
629
|
+
errorMessage = self.localizedDescription
|
|
630
|
+
case .syncTimedOut:
|
|
631
|
+
errorType = 10
|
|
632
|
+
errorCode = "SYNC_TIMED_OUT"
|
|
633
|
+
errorMessage = self.localizedDescription
|
|
578
634
|
@unknown default:
|
|
579
635
|
errorType = 4
|
|
580
636
|
errorCode = "UNKNOWN"
|
package/package.json
CHANGED
|
@@ -728,6 +728,7 @@ export enum LinkEventViewName {
|
|
|
728
728
|
IDENTITY_MATCH_BLOCK = "IDENTITY_MATCH_BLOCK",
|
|
729
729
|
INSTANT_MICRODEPOSIT_AUTHORIZED = "INSTANT_MICRODEPOSIT_AUTHORIZED",
|
|
730
730
|
INSTANT_MICRODEPOSIT_VERIFICATION = "INSTANT_MICRODEPOSIT_VERIFICATION",
|
|
731
|
+
INSTITUTION_LOGIN_INSTRUCTIONS = "INSTITUTION_LOGIN_INSTRUCTIONS",
|
|
731
732
|
KYC_CHECK = "KYC_CHECK",
|
|
732
733
|
LOADING = "LOADING",
|
|
733
734
|
MATCHED_CONSENT = "MATCHED_CONSENT",
|
|
@@ -868,12 +869,54 @@ export enum FinanceKitSyncBehavior {
|
|
|
868
869
|
SIMULATED = 1,
|
|
869
870
|
}
|
|
870
871
|
|
|
872
|
+
/**
|
|
873
|
+
* Whether this app can read the user's Apple Wallet data through FinanceKit.
|
|
874
|
+
* Values match the cases of LinkKit's `PlaidFinanceKit.Status`.
|
|
875
|
+
*/
|
|
876
|
+
export enum FinanceKitStatus {
|
|
877
|
+
/** This device, region or OS version cannot provide FinanceKit data. */
|
|
878
|
+
UNAVAILABLE = "unavailable",
|
|
879
|
+
/** The user has not been asked for FinanceKit access yet. */
|
|
880
|
+
NOT_DETERMINED = "notDetermined",
|
|
881
|
+
/** The user declined FinanceKit access. */
|
|
882
|
+
DENIED = "denied",
|
|
883
|
+
/** The user granted FinanceKit access. */
|
|
884
|
+
AUTHORIZED = "authorized",
|
|
885
|
+
/** FinanceKit reported a status this SDK version does not recognize. */
|
|
886
|
+
UNKNOWN = "unknown",
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
/**
|
|
890
|
+
* Why a FinanceKit sync failed. Values match LinkKit's Objective-C
|
|
891
|
+
* `PLKPlaidFinanceKitError` codes; new values are only added at the end.
|
|
892
|
+
*/
|
|
871
893
|
export enum FinanceKitErrorType {
|
|
872
894
|
InvalidToken = 0,
|
|
873
895
|
PermissionError = 1,
|
|
874
896
|
LinkApiError = 2,
|
|
875
897
|
PermissionAccessError = 3,
|
|
876
898
|
Unknown = 4,
|
|
899
|
+
/** The sync ended because Apple returned no accounts shared with this app. */
|
|
900
|
+
NoAccounts = 5,
|
|
901
|
+
/** The server ended the sync with an API error other than the ones above. */
|
|
902
|
+
SyncFailed = 6,
|
|
903
|
+
/**
|
|
904
|
+
* FinanceKit access has not been requested yet and the sync was told not to
|
|
905
|
+
* request it (`requestAuthorizationIfNeeded: false`).
|
|
906
|
+
*/
|
|
907
|
+
PermissionNotRequested = 7,
|
|
908
|
+
/**
|
|
909
|
+
* This device, region or OS version cannot provide FinanceKit data. The sync
|
|
910
|
+
* did not start.
|
|
911
|
+
*/
|
|
912
|
+
DataUnavailable = 8,
|
|
913
|
+
/** The server closed the sync channel before the sync completed. Start a new sync to retry. */
|
|
914
|
+
ChannelClosed = 9,
|
|
915
|
+
/**
|
|
916
|
+
* iOS was about to suspend the app, or an hour passed, before the sync
|
|
917
|
+
* finished. Start a new sync while the app is active to retry.
|
|
918
|
+
*/
|
|
919
|
+
SyncTimedOut = 10,
|
|
877
920
|
}
|
|
878
921
|
|
|
879
922
|
interface InvalidTokenError {
|
|
@@ -901,9 +944,45 @@ interface UnknownError {
|
|
|
901
944
|
message: string;
|
|
902
945
|
}
|
|
903
946
|
|
|
947
|
+
interface NoAccountsError {
|
|
948
|
+
type: FinanceKitErrorType.NoAccounts;
|
|
949
|
+
message: string;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
interface SyncFailedError {
|
|
953
|
+
type: FinanceKitErrorType.SyncFailed;
|
|
954
|
+
message: string;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
interface PermissionNotRequestedError {
|
|
958
|
+
type: FinanceKitErrorType.PermissionNotRequested;
|
|
959
|
+
message: string;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
interface DataUnavailableError {
|
|
963
|
+
type: FinanceKitErrorType.DataUnavailable;
|
|
964
|
+
message: string;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
interface ChannelClosedError {
|
|
968
|
+
type: FinanceKitErrorType.ChannelClosed;
|
|
969
|
+
message: string;
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
interface SyncTimedOutError {
|
|
973
|
+
type: FinanceKitErrorType.SyncTimedOut;
|
|
974
|
+
message: string;
|
|
975
|
+
}
|
|
976
|
+
|
|
904
977
|
export type FinanceKitError =
|
|
905
978
|
| InvalidTokenError
|
|
906
979
|
| PermissionError
|
|
907
980
|
| LinkApiError
|
|
908
981
|
| PermissionAccessError
|
|
909
|
-
| UnknownError
|
|
982
|
+
| UnknownError
|
|
983
|
+
| NoAccountsError
|
|
984
|
+
| SyncFailedError
|
|
985
|
+
| PermissionNotRequestedError
|
|
986
|
+
| DataUnavailableError
|
|
987
|
+
| ChannelClosedError
|
|
988
|
+
| SyncTimedOutError;
|
|
@@ -2,6 +2,7 @@ import { NativeModule, requireNativeModule } from "expo";
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
ReactNativePlaidLinkSdkModuleEvents,
|
|
5
|
+
FinanceKitStatus,
|
|
5
6
|
FinanceKitSyncBehavior,
|
|
6
7
|
} from "./ReactNativePlaidLinkSdk.types";
|
|
7
8
|
|
|
@@ -24,6 +25,7 @@ declare class ReactNativePlaidLinkSdkModule extends NativeModule<ReactNativePlai
|
|
|
24
25
|
requestAuthorizationIfNeeded: boolean,
|
|
25
26
|
syncBehavior: FinanceKitSyncBehavior,
|
|
26
27
|
): Promise<void>;
|
|
28
|
+
getFinanceKitStatus(): Promise<FinanceKitStatus>;
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
// This call loads the native module object from the JSI.
|
package/src/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
PlaidLayerSession,
|
|
13
13
|
PlaidHeadlessSession,
|
|
14
14
|
SubmissionData,
|
|
15
|
+
FinanceKitStatus,
|
|
15
16
|
FinanceKitSyncBehavior,
|
|
16
17
|
} from "./ReactNativePlaidLinkSdk.types";
|
|
17
18
|
import NativePlaidModule from "./ReactNativePlaidLinkSdkModule";
|
|
@@ -355,6 +356,21 @@ export async function syncFinanceKit(config: {
|
|
|
355
356
|
);
|
|
356
357
|
}
|
|
357
358
|
|
|
359
|
+
/**
|
|
360
|
+
* Reports whether this app can read the user's Apple Wallet data through
|
|
361
|
+
* FinanceKit, without starting a sync or prompting the user.
|
|
362
|
+
*
|
|
363
|
+
* iOS 17.4+ only. Rejects with `UNSUPPORTED_IOS_VERSION` on earlier iOS and
|
|
364
|
+
* throws on Android.
|
|
365
|
+
*/
|
|
366
|
+
export async function getFinanceKitStatus(): Promise<FinanceKitStatus> {
|
|
367
|
+
if (Platform.OS === "android") {
|
|
368
|
+
throw new Error("FinanceKit is only available on iOS");
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
return NativePlaidModule.getFinanceKitStatus();
|
|
372
|
+
}
|
|
373
|
+
|
|
358
374
|
export {
|
|
359
375
|
PlaidEmbeddedSearchView,
|
|
360
376
|
type PlaidEmbeddedSearchViewProps,
|