react-native-plaid-link-sdk 12.8.7 → 12.8.9
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/CHANGELOG.md +63 -1
- package/README.md +2 -0
- package/android/src/main/AndroidManifest.xml +1 -1
- package/dist/src/PlaidLink.js +1 -4
- package/dist/src/Types.d.ts +42 -2
- package/dist/src/Types.js +12 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Headers/LinkKit-Swift.h +13 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Headers/PLKPlaid.h +49 -0
- 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 +1682 -429
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.private.swiftinterface +29 -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 +29 -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/Threads_Threads.bundle/Info.plist +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/_CodeSignature/CodeResources +17 -17
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Headers/LinkKit-Swift.h +26 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Headers/PLKPlaid.h +49 -0
- 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 +1682 -429
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +29 -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 +29 -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 +1682 -429
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +29 -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 +29 -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/Threads_Threads.bundle/Info.plist +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/_CodeSignature/CodeResources +27 -27
- package/ios/RNLinksdk.mm +14 -4
- package/package.json +1 -1
- package/src/PlaidLink.tsx +1 -4
- package/src/Types.ts +54 -2
- package/src/__tests__/FinanceKitErrors.tests.js +60 -0
|
@@ -575,6 +575,23 @@ public struct PlaidFinanceKit {
|
|
|
575
575
|
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)
|
|
576
576
|
@available(iOS 17.4, *)
|
|
577
577
|
public static func sync(token: Swift.String, requestAuthorizationIfNeeded: Swift.Bool, syncBehavior: LinkKit.PlaidFinanceKit.SyncBehavior = .live) async throws
|
|
578
|
+
@available(iOS 17.4, *)
|
|
579
|
+
public enum Status {
|
|
580
|
+
case unavailable
|
|
581
|
+
case notDetermined
|
|
582
|
+
case denied
|
|
583
|
+
case authorized
|
|
584
|
+
case unknown
|
|
585
|
+
public static func == (a: LinkKit.PlaidFinanceKit.Status, b: LinkKit.PlaidFinanceKit.Status) -> Swift.Bool
|
|
586
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
587
|
+
public var hashValue: Swift.Int {
|
|
588
|
+
get
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
@available(iOS 17.4, *)
|
|
592
|
+
public static func status(completion: @escaping (LinkKit.PlaidFinanceKit.Status) -> Swift.Void)
|
|
593
|
+
@available(iOS 17.4, *)
|
|
594
|
+
public static func status() async -> LinkKit.PlaidFinanceKit.Status
|
|
578
595
|
}
|
|
579
596
|
public enum VerificationStatus : Swift.CustomStringConvertible, Swift.Codable {
|
|
580
597
|
case pendingAutomaticVerification
|
|
@@ -615,6 +632,8 @@ public enum AssetReportErrorCode : Swift.Error, Swift.CustomStringConvertible {
|
|
|
615
632
|
@_inheritsConvenienceInitializers @objc public class PLKPlaidFinanceKit : ObjectiveC.NSObject {
|
|
616
633
|
@available(iOS 17.4, *)
|
|
617
634
|
@objc public static func sync(token: Swift.String, requestAuthorizationIfNeeded: Swift.Bool, syncBehavior: LinkKit.PLKSyncBehavior, onSuccess: @escaping () -> Swift.Void, onError: @escaping (Foundation.NSError) -> Swift.Void)
|
|
635
|
+
@available(iOS 17.4, *)
|
|
636
|
+
@objc public static func status(completion: @escaping (LinkKit.PLKFinanceKitStatus) -> Swift.Void)
|
|
618
637
|
@objc override dynamic public init()
|
|
619
638
|
@objc deinit
|
|
620
639
|
}
|
|
@@ -648,6 +667,12 @@ public enum FinanceKitError : Foundation.LocalizedError {
|
|
|
648
667
|
case permissionError(message: Swift.String)
|
|
649
668
|
case linkApiError(message: Swift.String)
|
|
650
669
|
case permissionAccessError(message: Swift.String)
|
|
670
|
+
case permissionNotRequested(message: Swift.String)
|
|
671
|
+
case dataUnavailable(message: Swift.String)
|
|
672
|
+
case noAccounts(message: Swift.String)
|
|
673
|
+
case syncFailed(errorType: Swift.String, errorCode: Swift.String, message: Swift.String)
|
|
674
|
+
case channelClosed(message: Swift.String)
|
|
675
|
+
case syncTimedOut(message: Swift.String)
|
|
651
676
|
case unknown(error: any Swift.Error)
|
|
652
677
|
public var errorDescription: Swift.String? {
|
|
653
678
|
get
|
|
@@ -722,3 +747,7 @@ extension LinkKit.Product : Swift.Hashable {}
|
|
|
722
747
|
extension LinkKit.PlaidFinanceKit.SyncBehavior : Swift.Equatable {}
|
|
723
748
|
@available(iOS 17.4, *)
|
|
724
749
|
extension LinkKit.PlaidFinanceKit.SyncBehavior : Swift.Hashable {}
|
|
750
|
+
@available(iOS 17.4, *)
|
|
751
|
+
extension LinkKit.PlaidFinanceKit.Status : Swift.Equatable {}
|
|
752
|
+
@available(iOS 17.4, *)
|
|
753
|
+
extension LinkKit.PlaidFinanceKit.Status : Swift.Hashable {}
|
|
Binary file
|
|
@@ -575,6 +575,23 @@ public struct PlaidFinanceKit {
|
|
|
575
575
|
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)
|
|
576
576
|
@available(iOS 17.4, *)
|
|
577
577
|
public static func sync(token: Swift.String, requestAuthorizationIfNeeded: Swift.Bool, syncBehavior: LinkKit.PlaidFinanceKit.SyncBehavior = .live) async throws
|
|
578
|
+
@available(iOS 17.4, *)
|
|
579
|
+
public enum Status {
|
|
580
|
+
case unavailable
|
|
581
|
+
case notDetermined
|
|
582
|
+
case denied
|
|
583
|
+
case authorized
|
|
584
|
+
case unknown
|
|
585
|
+
public static func == (a: LinkKit.PlaidFinanceKit.Status, b: LinkKit.PlaidFinanceKit.Status) -> Swift.Bool
|
|
586
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
587
|
+
public var hashValue: Swift.Int {
|
|
588
|
+
get
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
@available(iOS 17.4, *)
|
|
592
|
+
public static func status(completion: @escaping (LinkKit.PlaidFinanceKit.Status) -> Swift.Void)
|
|
593
|
+
@available(iOS 17.4, *)
|
|
594
|
+
public static func status() async -> LinkKit.PlaidFinanceKit.Status
|
|
578
595
|
}
|
|
579
596
|
public enum VerificationStatus : Swift.CustomStringConvertible, Swift.Codable {
|
|
580
597
|
case pendingAutomaticVerification
|
|
@@ -615,6 +632,8 @@ public enum AssetReportErrorCode : Swift.Error, Swift.CustomStringConvertible {
|
|
|
615
632
|
@_inheritsConvenienceInitializers @objc public class PLKPlaidFinanceKit : ObjectiveC.NSObject {
|
|
616
633
|
@available(iOS 17.4, *)
|
|
617
634
|
@objc public static func sync(token: Swift.String, requestAuthorizationIfNeeded: Swift.Bool, syncBehavior: LinkKit.PLKSyncBehavior, onSuccess: @escaping () -> Swift.Void, onError: @escaping (Foundation.NSError) -> Swift.Void)
|
|
635
|
+
@available(iOS 17.4, *)
|
|
636
|
+
@objc public static func status(completion: @escaping (LinkKit.PLKFinanceKitStatus) -> Swift.Void)
|
|
618
637
|
@objc override dynamic public init()
|
|
619
638
|
@objc deinit
|
|
620
639
|
}
|
|
@@ -648,6 +667,12 @@ public enum FinanceKitError : Foundation.LocalizedError {
|
|
|
648
667
|
case permissionError(message: Swift.String)
|
|
649
668
|
case linkApiError(message: Swift.String)
|
|
650
669
|
case permissionAccessError(message: Swift.String)
|
|
670
|
+
case permissionNotRequested(message: Swift.String)
|
|
671
|
+
case dataUnavailable(message: Swift.String)
|
|
672
|
+
case noAccounts(message: Swift.String)
|
|
673
|
+
case syncFailed(errorType: Swift.String, errorCode: Swift.String, message: Swift.String)
|
|
674
|
+
case channelClosed(message: Swift.String)
|
|
675
|
+
case syncTimedOut(message: Swift.String)
|
|
651
676
|
case unknown(error: any Swift.Error)
|
|
652
677
|
public var errorDescription: Swift.String? {
|
|
653
678
|
get
|
|
@@ -722,3 +747,7 @@ extension LinkKit.Product : Swift.Hashable {}
|
|
|
722
747
|
extension LinkKit.PlaidFinanceKit.SyncBehavior : Swift.Equatable {}
|
|
723
748
|
@available(iOS 17.4, *)
|
|
724
749
|
extension LinkKit.PlaidFinanceKit.SyncBehavior : Swift.Hashable {}
|
|
750
|
+
@available(iOS 17.4, *)
|
|
751
|
+
extension LinkKit.PlaidFinanceKit.Status : Swift.Equatable {}
|
|
752
|
+
@available(iOS 17.4, *)
|
|
753
|
+
extension LinkKit.PlaidFinanceKit.Status : Swift.Hashable {}
|
|
Binary file
|
|
Binary file
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<dict>
|
|
7
7
|
<key>Headers/LinkKit-Swift.h</key>
|
|
8
8
|
<data>
|
|
9
|
-
|
|
9
|
+
6x66MdDPhzDpR9UVfgt5xYxDmEU=
|
|
10
10
|
</data>
|
|
11
11
|
<key>Headers/LinkKit.h</key>
|
|
12
12
|
<data>
|
|
@@ -18,51 +18,51 @@
|
|
|
18
18
|
</data>
|
|
19
19
|
<key>Headers/PLKPlaid.h</key>
|
|
20
20
|
<data>
|
|
21
|
-
|
|
21
|
+
Kqbah5nDWA66Zu8GMdaAUlR2aaM=
|
|
22
22
|
</data>
|
|
23
23
|
<key>Info.plist</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
OXi+Bh+OF8bgRl9RRS1SEqUUR8o=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
hG8qPVnDNR0JhbwMIH1FmS5oHiU=
|
|
30
30
|
</data>
|
|
31
31
|
<key>Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
hlIzDBMt83cEd02S8zBnprijLQY=
|
|
34
34
|
</data>
|
|
35
35
|
<key>Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
36
36
|
<data>
|
|
37
|
-
|
|
37
|
+
lKTFq4UcRqDQBmC8U/IYOW798FI=
|
|
38
38
|
</data>
|
|
39
39
|
<key>Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
40
40
|
<data>
|
|
41
|
-
|
|
41
|
+
hlIzDBMt83cEd02S8zBnprijLQY=
|
|
42
42
|
</data>
|
|
43
43
|
<key>Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
44
44
|
<data>
|
|
45
|
-
|
|
45
|
+
4uCoBQG5FdZkGNwFJgoRFILQywY=
|
|
46
46
|
</data>
|
|
47
47
|
<key>Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
48
48
|
<data>
|
|
49
|
-
|
|
49
|
+
hG8qPVnDNR0JhbwMIH1FmS5oHiU=
|
|
50
50
|
</data>
|
|
51
51
|
<key>Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
52
52
|
<data>
|
|
53
|
-
|
|
53
|
+
VRL0vb2Nl3VUK7zCZclUnpjOFDs=
|
|
54
54
|
</data>
|
|
55
55
|
<key>Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
56
56
|
<data>
|
|
57
|
-
|
|
57
|
+
3NieIiRr3Hs3XZY6UVhNxiAcsr4=
|
|
58
58
|
</data>
|
|
59
59
|
<key>Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
60
60
|
<data>
|
|
61
|
-
|
|
61
|
+
VRL0vb2Nl3VUK7zCZclUnpjOFDs=
|
|
62
62
|
</data>
|
|
63
63
|
<key>Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
64
64
|
<data>
|
|
65
|
-
|
|
65
|
+
OV9TFBbYYlSrKUZMVA0srQPjDH8=
|
|
66
66
|
</data>
|
|
67
67
|
<key>Modules/module.modulemap</key>
|
|
68
68
|
<data>
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
</data>
|
|
79
79
|
<key>Threads_Threads.bundle/Info.plist</key>
|
|
80
80
|
<data>
|
|
81
|
-
|
|
81
|
+
bNk5FrB5xc1djVmOh3tyrekXrOA=
|
|
82
82
|
</data>
|
|
83
83
|
</dict>
|
|
84
84
|
<key>files2</key>
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
<dict>
|
|
88
88
|
<key>hash2</key>
|
|
89
89
|
<data>
|
|
90
|
-
|
|
90
|
+
mP9wdd7Oy7mpvD1qxf0zdWuwgwVOtYxBk75NgblmyM4=
|
|
91
91
|
</data>
|
|
92
92
|
</dict>
|
|
93
93
|
<key>Headers/LinkKit.h</key>
|
|
@@ -108,77 +108,77 @@
|
|
|
108
108
|
<dict>
|
|
109
109
|
<key>hash2</key>
|
|
110
110
|
<data>
|
|
111
|
-
|
|
111
|
+
9DvUWsLVtfSMX1yUaBEteHF8DgobeP24TtjIBwOAoI4=
|
|
112
112
|
</data>
|
|
113
113
|
</dict>
|
|
114
114
|
<key>Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
115
115
|
<dict>
|
|
116
116
|
<key>hash2</key>
|
|
117
117
|
<data>
|
|
118
|
-
|
|
118
|
+
XSDexsEnI1XeRFDoiW6TY977j2Xam//WvbE7cWodsHk=
|
|
119
119
|
</data>
|
|
120
120
|
</dict>
|
|
121
121
|
<key>Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
122
122
|
<dict>
|
|
123
123
|
<key>hash2</key>
|
|
124
124
|
<data>
|
|
125
|
-
|
|
125
|
+
sqGSADcppncGfmMVeKV+5O5k2krQ96EoulA8LtfpdyA=
|
|
126
126
|
</data>
|
|
127
127
|
</dict>
|
|
128
128
|
<key>Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
129
129
|
<dict>
|
|
130
130
|
<key>hash2</key>
|
|
131
131
|
<data>
|
|
132
|
-
|
|
132
|
+
zS1xwbQJR8TfRFcWCBcV+qhP64DBvSY6CliCRL05cqs=
|
|
133
133
|
</data>
|
|
134
134
|
</dict>
|
|
135
135
|
<key>Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
136
136
|
<dict>
|
|
137
137
|
<key>hash2</key>
|
|
138
138
|
<data>
|
|
139
|
-
|
|
139
|
+
sqGSADcppncGfmMVeKV+5O5k2krQ96EoulA8LtfpdyA=
|
|
140
140
|
</data>
|
|
141
141
|
</dict>
|
|
142
142
|
<key>Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
143
143
|
<dict>
|
|
144
144
|
<key>hash2</key>
|
|
145
145
|
<data>
|
|
146
|
-
|
|
146
|
+
vczDZHbS/ruwe4P4geV6KhsuHto3tmbC8RSC2Q4xNYg=
|
|
147
147
|
</data>
|
|
148
148
|
</dict>
|
|
149
149
|
<key>Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
150
150
|
<dict>
|
|
151
151
|
<key>hash2</key>
|
|
152
152
|
<data>
|
|
153
|
-
|
|
153
|
+
XSDexsEnI1XeRFDoiW6TY977j2Xam//WvbE7cWodsHk=
|
|
154
154
|
</data>
|
|
155
155
|
</dict>
|
|
156
156
|
<key>Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
157
157
|
<dict>
|
|
158
158
|
<key>hash2</key>
|
|
159
159
|
<data>
|
|
160
|
-
|
|
160
|
+
EXiAaI5xt6PmZYInuyo3hfomFa+chZFeyVx5rhxtyg0=
|
|
161
161
|
</data>
|
|
162
162
|
</dict>
|
|
163
163
|
<key>Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
164
164
|
<dict>
|
|
165
165
|
<key>hash2</key>
|
|
166
166
|
<data>
|
|
167
|
-
|
|
167
|
+
fINQA5GDwmysVaGe1+cPvBgjW1mZEI+KSDk5tdNatPg=
|
|
168
168
|
</data>
|
|
169
169
|
</dict>
|
|
170
170
|
<key>Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
171
171
|
<dict>
|
|
172
172
|
<key>hash2</key>
|
|
173
173
|
<data>
|
|
174
|
-
|
|
174
|
+
EXiAaI5xt6PmZYInuyo3hfomFa+chZFeyVx5rhxtyg0=
|
|
175
175
|
</data>
|
|
176
176
|
</dict>
|
|
177
177
|
<key>Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
178
178
|
<dict>
|
|
179
179
|
<key>hash2</key>
|
|
180
180
|
<data>
|
|
181
|
-
|
|
181
|
+
KP62nAI31CYWrmdtBuPSJylDcU/ikSrYJjZlapjB6V8=
|
|
182
182
|
</data>
|
|
183
183
|
</dict>
|
|
184
184
|
<key>Modules/module.modulemap</key>
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
<dict>
|
|
207
207
|
<key>hash2</key>
|
|
208
208
|
<data>
|
|
209
|
-
|
|
209
|
+
1P7WoHY2K4B0NEI+KnPRC1+LocUNqjyMcouyJNgLn5U=
|
|
210
210
|
</data>
|
|
211
211
|
</dict>
|
|
212
212
|
</dict>
|
package/ios/RNLinksdk.mm
CHANGED
|
@@ -29,7 +29,7 @@ static NSString* const kRNLinkKitVersionConstant = @"version";
|
|
|
29
29
|
RCT_EXPORT_MODULE();
|
|
30
30
|
|
|
31
31
|
+ (NSString*)sdkVersion {
|
|
32
|
-
return @"12.8.
|
|
32
|
+
return @"12.8.9"; // SDK_VERSION
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
+ (NSString*)objCBridgeVersion {
|
|
@@ -239,11 +239,21 @@ RCT_EXPORT_METHOD(syncFinanceKit:(NSString *)token
|
|
|
239
239
|
}
|
|
240
240
|
onError:^(NSError *error) {
|
|
241
241
|
|
|
242
|
-
|
|
242
|
+
NSMutableDictionary *financeKitError = [@{
|
|
243
243
|
@"type": [NSNumber numberWithInteger: error.code],
|
|
244
244
|
@"message": error.localizedDescription
|
|
245
|
-
};
|
|
246
|
-
|
|
245
|
+
} mutableCopy];
|
|
246
|
+
|
|
247
|
+
// PLKPlaidFinanceKitErrorSyncFailed carries the API error the server ended the sync with.
|
|
248
|
+
id errorType = error.userInfo[kPLKFinanceKitErrorTypeKey];
|
|
249
|
+
id errorCode = error.userInfo[kPLKFinanceKitErrorCodeKey];
|
|
250
|
+
if ([errorType isKindOfClass:[NSString class]]) {
|
|
251
|
+
financeKitError[@"errorType"] = errorType;
|
|
252
|
+
}
|
|
253
|
+
if ([errorCode isKindOfClass:[NSString class]]) {
|
|
254
|
+
financeKitError[@"errorCode"] = errorCode;
|
|
255
|
+
}
|
|
256
|
+
|
|
247
257
|
onError(@[financeKitError]);
|
|
248
258
|
}
|
|
249
259
|
];
|
package/package.json
CHANGED
package/src/PlaidLink.tsx
CHANGED
package/src/Types.ts
CHANGED
|
@@ -591,7 +591,19 @@ export enum FinanceKitErrorType {
|
|
|
591
591
|
PermissionError = 1,
|
|
592
592
|
LinkApiError = 2,
|
|
593
593
|
PermissionAccessError = 3,
|
|
594
|
-
Unknown = 4
|
|
594
|
+
Unknown = 4,
|
|
595
|
+
/** The sync ended because Apple returned no accounts shared with this app. */
|
|
596
|
+
NoAccounts = 5,
|
|
597
|
+
/** The server ended the sync with another API error, given in `errorType` and `errorCode`. */
|
|
598
|
+
SyncFailed = 6,
|
|
599
|
+
/** FinanceKit access has not been requested yet and the sync was told not to request it. */
|
|
600
|
+
PermissionNotRequested = 7,
|
|
601
|
+
/** This device, region or OS version cannot provide FinanceKit data. The sync did not start. */
|
|
602
|
+
DataUnavailable = 8,
|
|
603
|
+
/** The server closed the sync before it completed. Start a new sync to retry. */
|
|
604
|
+
ChannelClosed = 9,
|
|
605
|
+
/** iOS was about to suspend the app, or an hour passed, before the sync finished. */
|
|
606
|
+
SyncTimedOut = 10
|
|
595
607
|
}
|
|
596
608
|
|
|
597
609
|
interface InvalidTokenError {
|
|
@@ -619,12 +631,52 @@ interface UnknownError {
|
|
|
619
631
|
message: string;
|
|
620
632
|
}
|
|
621
633
|
|
|
634
|
+
interface NoAccountsError {
|
|
635
|
+
type: FinanceKitErrorType.NoAccounts;
|
|
636
|
+
message: string;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
interface SyncFailedError {
|
|
640
|
+
type: FinanceKitErrorType.SyncFailed;
|
|
641
|
+
message: string;
|
|
642
|
+
/** The API error type the server ended the sync with, for example `ITEM_ERROR`. */
|
|
643
|
+
errorType: string;
|
|
644
|
+
/** The API error code the server ended the sync with. */
|
|
645
|
+
errorCode: string;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
interface PermissionNotRequestedError {
|
|
649
|
+
type: FinanceKitErrorType.PermissionNotRequested;
|
|
650
|
+
message: string;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
interface DataUnavailableError {
|
|
654
|
+
type: FinanceKitErrorType.DataUnavailable;
|
|
655
|
+
message: string;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
interface ChannelClosedError {
|
|
659
|
+
type: FinanceKitErrorType.ChannelClosed;
|
|
660
|
+
message: string;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
interface SyncTimedOutError {
|
|
664
|
+
type: FinanceKitErrorType.SyncTimedOut;
|
|
665
|
+
message: string;
|
|
666
|
+
}
|
|
667
|
+
|
|
622
668
|
export type FinanceKitError =
|
|
623
669
|
| InvalidTokenError
|
|
624
670
|
| PermissionError
|
|
625
671
|
| LinkApiError
|
|
626
672
|
| PermissionAccessError
|
|
627
|
-
| UnknownError
|
|
673
|
+
| UnknownError
|
|
674
|
+
| NoAccountsError
|
|
675
|
+
| SyncFailedError
|
|
676
|
+
| PermissionNotRequestedError
|
|
677
|
+
| DataUnavailableError
|
|
678
|
+
| ChannelClosedError
|
|
679
|
+
| SyncTimedOutError;
|
|
628
680
|
|
|
629
681
|
export interface SubmissionData {
|
|
630
682
|
phoneNumber?: string;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const Types = require('./../Types');
|
|
4
|
+
|
|
5
|
+
const root = path.resolve(__dirname, '../..');
|
|
6
|
+
const rnLinksdk = fs.readFileSync(path.join(root, 'ios/RNLinksdk.mm'), 'utf8');
|
|
7
|
+
const plaidLink = fs.readFileSync(path.join(root, 'src/PlaidLink.tsx'), 'utf8');
|
|
8
|
+
const linkKitHeader = fs.readFileSync(
|
|
9
|
+
path.join(
|
|
10
|
+
root,
|
|
11
|
+
'ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Headers/PLKPlaid.h',
|
|
12
|
+
),
|
|
13
|
+
'utf8',
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
// The codes the bundled LinkKit declares, e.g. { NoAccounts: 5 }.
|
|
17
|
+
const linkKitErrorCodes = () => {
|
|
18
|
+
const codes = {};
|
|
19
|
+
const pattern = /PLKPlaidFinanceKitError(\w+) = (\d+)/g;
|
|
20
|
+
let match = pattern.exec(linkKitHeader);
|
|
21
|
+
while (match !== null) {
|
|
22
|
+
codes[match[1]] = Number(match[2]);
|
|
23
|
+
match = pattern.exec(linkKitHeader);
|
|
24
|
+
}
|
|
25
|
+
return codes;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
describe('FinanceKit sync errors', () => {
|
|
29
|
+
test('FinanceKitErrorType has every code the bundled LinkKit reports', () => {
|
|
30
|
+
const codes = linkKitErrorCodes();
|
|
31
|
+
const names = Object.keys(codes);
|
|
32
|
+
|
|
33
|
+
expect(names.length).toBeGreaterThanOrEqual(11);
|
|
34
|
+
names.forEach(name => {
|
|
35
|
+
expect(Types.FinanceKitErrorType[name]).toBe(codes[name]);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
test('FinanceKitErrorType has no code LinkKit does not report', () => {
|
|
40
|
+
const codes = linkKitErrorCodes();
|
|
41
|
+
const names = Object.keys(Types.FinanceKitErrorType).filter(key =>
|
|
42
|
+
Number.isNaN(Number(key)),
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
names.forEach(name => {
|
|
46
|
+
expect(codes[name]).toBe(Types.FinanceKitErrorType[name]);
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
test('the bridge forwards the API error of a sync the server failed', () => {
|
|
51
|
+
expect(rnLinksdk).toContain('error.userInfo[kPLKFinanceKitErrorTypeKey]');
|
|
52
|
+
expect(rnLinksdk).toContain('error.userInfo[kPLKFinanceKitErrorCodeKey]');
|
|
53
|
+
expect(rnLinksdk).toContain('financeKitError[@"errorType"] = errorType;');
|
|
54
|
+
expect(rnLinksdk).toContain('financeKitError[@"errorCode"] = errorCode;');
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test('syncFinanceKit hands the native error to the caller unchanged', () => {
|
|
58
|
+
expect(plaidLink).toContain('completion(error)');
|
|
59
|
+
});
|
|
60
|
+
});
|