react-native-plaid-link-sdk 13.0.0 → 13.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +61 -0
- package/README.md +246 -7
- package/android/src/main/AndroidManifest.xml +6 -1
- package/android/src/main/java/expo/modules/plaidlinksdk/RNPlaidLinkSdkVersion.kt +1 -1
- package/build/ReactNativePlaidLinkSdkModule.js.map +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +49 -101
- package/build/index.js.map +1 -1
- package/ios/Frameworks/LinkKit.xcframework/Info.plist +0 -17
- 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 +14 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.private.swiftinterface +3 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftinterface +3 -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 +9 -13
- 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 +14 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +3 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +3 -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 +14 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +3 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +3 -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 +17 -17
- package/ios/ReactNativePlaidLinkSdk.podspec +0 -2
- package/ios/src/RNPlaidLinkSdkVersion.swift +1 -1
- package/package.json +40 -3
- package/src/ReactNativePlaidLinkSdkModule.ts +3 -3
- package/src/index.ts +93 -134
- package/.eslintrc.js +0 -5
- package/.gitattributes +0 -3
- package/.nvmrc +0 -1
- package/eslint.config.js +0 -3
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Headers/LinkKit-Swift.h +0 -650
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Headers/LinkKit.h +0 -22
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/LinkKit +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/arm64-apple-ios-macabi.abi.json +0 -52299
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/arm64-apple-ios-macabi.private.swiftinterface +0 -751
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/arm64-apple-ios-macabi.swiftdoc +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/arm64-apple-ios-macabi.swiftinterface +0 -751
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/arm64-apple-ios-macabi.swiftmodule +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/x86_64-apple-ios-macabi.abi.json +0 -52299
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/x86_64-apple-ios-macabi.private.swiftinterface +0 -751
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/x86_64-apple-ios-macabi.swiftdoc +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/x86_64-apple-ios-macabi.swiftinterface +0 -751
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/x86_64-apple-ios-macabi.swiftmodule +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/module.modulemap +0 -11
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Resources/Info.plist +0 -59
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Resources/PrivacyInfo.xcprivacy +0 -32
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/_CodeSignature/CodeResources +0 -230
- package/jest.config.js +0 -21
- package/jest.setup.js +0 -7
- package/scripts/check-package-entrypoints.js +0 -146
- package/scripts/extract-rn-enums.js +0 -49
- package/tsconfig.json +0 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,66 @@
|
|
|
1
1
|
# RELEASES
|
|
2
2
|
|
|
3
|
+
## LinkKit V13.0.2 — 2026-07-01
|
|
4
|
+
|
|
5
|
+
### Changes
|
|
6
|
+
|
|
7
|
+
- Updates the bundled iOS SDK to LinkKit 7.0.1, which restores native React
|
|
8
|
+
Native wrapper detection for v13 apps.
|
|
9
|
+
- Restores Android manifest metadata so the native Android SDK reports React
|
|
10
|
+
Native wrapper usage instead of plain Android.
|
|
11
|
+
|
|
12
|
+
### Android
|
|
13
|
+
|
|
14
|
+
Android SDK [6.0.0](https://github.com/plaid/plaid-link-android)
|
|
15
|
+
|
|
16
|
+
### Additions
|
|
17
|
+
|
|
18
|
+
- Adds native session APIs for Standard Link, Layer, and Headless Link.
|
|
19
|
+
- Adds Embedded Search continuation support.
|
|
20
|
+
- Adds Layer submit support.
|
|
21
|
+
|
|
22
|
+
### Changes
|
|
23
|
+
|
|
24
|
+
- Updates Android integration to `com.plaid.link:sdk-core:6.0.0`.
|
|
25
|
+
|
|
26
|
+
### Removals
|
|
27
|
+
|
|
28
|
+
- Removes the legacy React Native Android bridge implementation.
|
|
29
|
+
|
|
30
|
+
#### Requirements
|
|
31
|
+
|
|
32
|
+
| Name | Version |
|
|
33
|
+
| -------------- | ---------------------------------- |
|
|
34
|
+
| Android Studio | 4.0+ |
|
|
35
|
+
| Kotlin | 1.9.25+ (Kotlin integrations only) |
|
|
36
|
+
|
|
37
|
+
### iOS
|
|
38
|
+
|
|
39
|
+
iOS SDK [7.0.1](https://github.com/plaid/plaid-link-ios/releases/tag/7.0.1)
|
|
40
|
+
|
|
41
|
+
### Changes
|
|
42
|
+
|
|
43
|
+
- Fix React Native Version Parsing
|
|
44
|
+
|
|
45
|
+
#### Requirements
|
|
46
|
+
|
|
47
|
+
| Name | Version |
|
|
48
|
+
| ----- | --------- |
|
|
49
|
+
| Xcode | >= 16.1.0 |
|
|
50
|
+
| iOS | >= 15.0 |
|
|
51
|
+
|
|
52
|
+
## LinkKit V13.0.1 — 2026-06-30
|
|
53
|
+
|
|
54
|
+
### Changes
|
|
55
|
+
|
|
56
|
+
- Fixes Expo SDK 56 iOS prebuild failures caused by the npm-packed
|
|
57
|
+
`LinkKit.xcframework` including an unsupported Mac Catalyst slice whose
|
|
58
|
+
framework symlinks were not preserved during packaging.
|
|
59
|
+
- Ships an iOS-only `LinkKit.xcframework` with supported device and simulator
|
|
60
|
+
slices.
|
|
61
|
+
- Adds package and CI validation for LinkKit XCFramework slices, signatures, and
|
|
62
|
+
Expo SDK 56 iOS prebuild compatibility.
|
|
63
|
+
|
|
3
64
|
## LinkKit V13.0.0 — 2026-06-26
|
|
4
65
|
|
|
5
66
|
#### Requirements
|
package/README.md
CHANGED
|
@@ -1,11 +1,54 @@
|
|
|
1
1
|
# Plaid React Native SDK
|
|
2
2
|
|
|
3
|
-
React Native SDK for Plaid Link, built on Expo Modules for the v13 native
|
|
3
|
+
React Native SDK for Plaid Link, built on Expo Modules for the v13 native
|
|
4
|
+
architecture. The SDK supports Expo apps and bare React Native apps through the
|
|
5
|
+
same session-based JavaScript API.
|
|
4
6
|
|
|
5
7
|
## API documentation
|
|
6
8
|
|
|
7
9
|
- [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/react-native-plaid-link-sdk/)
|
|
8
10
|
- [Documentation for the main branch](https://docs.expo.dev/versions/unversioned/sdk/react-native-plaid-link-sdk/)
|
|
11
|
+
- [Plaid Link documentation](https://plaid.com/docs/link/)
|
|
12
|
+
|
|
13
|
+
## Requirements
|
|
14
|
+
|
|
15
|
+
### React Native and Expo
|
|
16
|
+
|
|
17
|
+
- React Native 0.76 or newer
|
|
18
|
+
- Expo 52 or newer, or bare React Native with Expo Modules installed
|
|
19
|
+
- A development build, custom native build, or bare native app
|
|
20
|
+
|
|
21
|
+
Expo Go is not supported because Plaid Link includes custom native code. Expo
|
|
22
|
+
apps should use a development build or another app build that includes this
|
|
23
|
+
native module.
|
|
24
|
+
|
|
25
|
+
### iOS
|
|
26
|
+
|
|
27
|
+
- iOS 15.1 or newer
|
|
28
|
+
- Xcode 16.1 or newer
|
|
29
|
+
- CocoaPods for installing native dependencies
|
|
30
|
+
|
|
31
|
+
### Android
|
|
32
|
+
|
|
33
|
+
- Android Studio 4.0 or newer
|
|
34
|
+
- Kotlin 1.9.25 or newer for Kotlin integrations
|
|
35
|
+
- A package name registered in the Plaid Dashboard for Android OAuth flows
|
|
36
|
+
|
|
37
|
+
## Compatibility
|
|
38
|
+
|
|
39
|
+
The SDK supports React Native 0.76 or newer and Expo 52 or newer. Expo support
|
|
40
|
+
requires a development build, custom native build, or bare native app; Expo Go is
|
|
41
|
+
not supported.
|
|
42
|
+
|
|
43
|
+
| Lane | React Native | Expo | CI coverage |
|
|
44
|
+
| ----------------- | ------------ | ---- | ----------------------------------------------------------------------------------- |
|
|
45
|
+
| Minimum supported | 0.76 | 52 | Peer install and package export smoke test |
|
|
46
|
+
| Current example | 0.83 | 55 | Peer install and package export smoke test, Android unit tests, iOS simulator build |
|
|
47
|
+
| Latest Expo | 0.85 | 56 | Packed SDK install and iOS prebuild smoke test |
|
|
48
|
+
|
|
49
|
+
The root package unit tests run against the repository's development
|
|
50
|
+
dependencies, while the example app validates the current native integration on
|
|
51
|
+
both platforms.
|
|
9
52
|
|
|
10
53
|
## Migration guides
|
|
11
54
|
|
|
@@ -15,25 +58,221 @@ React Native SDK for Plaid Link, built on Expo Modules for the v13 native archit
|
|
|
15
58
|
|
|
16
59
|
### Expo projects
|
|
17
60
|
|
|
18
|
-
Install the package
|
|
61
|
+
Install the package in an Expo project, then run the app in a development build
|
|
62
|
+
or another custom native runtime.
|
|
19
63
|
|
|
20
64
|
```sh
|
|
21
65
|
npm install react-native-plaid-link-sdk
|
|
22
66
|
```
|
|
23
67
|
|
|
68
|
+
If you are adding the SDK to an existing Expo app, rebuild the native app after
|
|
69
|
+
installation so the Plaid native module is included.
|
|
70
|
+
|
|
24
71
|
### Bare React Native projects
|
|
25
72
|
|
|
26
|
-
Bare React Native apps must install and configure the
|
|
73
|
+
Bare React Native apps must install and configure the `expo` package before
|
|
74
|
+
using this SDK.
|
|
27
75
|
|
|
28
76
|
```sh
|
|
29
|
-
npm install react-native-plaid-link-sdk
|
|
77
|
+
npm install react-native-plaid-link-sdk expo
|
|
30
78
|
npx pod-install
|
|
31
79
|
```
|
|
32
80
|
|
|
33
|
-
|
|
81
|
+
Follow Expo's guide for
|
|
82
|
+
[installing Expo Modules in an existing React Native app](https://docs.expo.dev/bare/installing-expo-modules/)
|
|
83
|
+
if your bare app does not already use Expo Modules.
|
|
84
|
+
|
|
85
|
+
## Plaid Dashboard setup
|
|
86
|
+
|
|
87
|
+
Configure the native app identifiers that your app will use with Link:
|
|
88
|
+
|
|
89
|
+
- Android package names
|
|
90
|
+
- iOS bundle identifiers
|
|
91
|
+
- OAuth redirect URIs for every environment your app supports
|
|
92
|
+
|
|
93
|
+
The link token passed to this SDK must be created by your server with the Link
|
|
94
|
+
configuration for the flow you want to launch. Do not create link tokens in the
|
|
95
|
+
mobile app.
|
|
96
|
+
|
|
97
|
+
## Standard Link
|
|
98
|
+
|
|
99
|
+
Create a Link session with a link token, then open it from your UI.
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
import { createPlaidLinkSession } from "react-native-plaid-link-sdk";
|
|
103
|
+
|
|
104
|
+
const session = await createPlaidLinkSession({
|
|
105
|
+
token: "#GENERATED_LINK_TOKEN#",
|
|
106
|
+
onSuccess: (success) => {
|
|
107
|
+
console.log("Success", success);
|
|
108
|
+
},
|
|
109
|
+
onExit: (exit) => {
|
|
110
|
+
console.log("Exit", exit);
|
|
111
|
+
},
|
|
112
|
+
onEvent: (event) => {
|
|
113
|
+
console.log("Event", event);
|
|
114
|
+
},
|
|
115
|
+
onLoad: () => {
|
|
116
|
+
console.log("Link loaded");
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
await session.open();
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Pass `true` to `session.open(true)` to request full-screen presentation on iOS.
|
|
124
|
+
The default presentation is used when this argument is omitted or `false`.
|
|
125
|
+
|
|
126
|
+
## Layer
|
|
127
|
+
|
|
128
|
+
Layer uses a dedicated session object. Submit user data once the Layer session is
|
|
129
|
+
ready, then open Link when the Layer flow emits the ready event.
|
|
130
|
+
|
|
131
|
+
```ts
|
|
132
|
+
import {
|
|
133
|
+
LinkEventName,
|
|
134
|
+
PlaidLayerSession,
|
|
135
|
+
createPlaidLayerSession,
|
|
136
|
+
} from "react-native-plaid-link-sdk";
|
|
137
|
+
|
|
138
|
+
let session: PlaidLayerSession;
|
|
139
|
+
|
|
140
|
+
session = await createPlaidLayerSession({
|
|
141
|
+
token: "#GENERATED_LINK_TOKEN#",
|
|
142
|
+
onSuccess: (success) => {
|
|
143
|
+
console.log("Success", success);
|
|
144
|
+
},
|
|
145
|
+
onExit: (exit) => {
|
|
146
|
+
console.log("Exit", exit);
|
|
147
|
+
},
|
|
148
|
+
onEvent: async (event) => {
|
|
149
|
+
if (event.eventName === LinkEventName.LAYER_READY) {
|
|
150
|
+
await session.open();
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
await session.submit({
|
|
156
|
+
phoneNumber: "415-555-0017",
|
|
157
|
+
dateOfBirth: "1975-01-18",
|
|
158
|
+
});
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Headless Link
|
|
162
|
+
|
|
163
|
+
Headless Link creates a session that starts without presenting the standard Link
|
|
164
|
+
UI.
|
|
165
|
+
|
|
166
|
+
```ts
|
|
167
|
+
import { createPlaidHeadlessSession } from "react-native-plaid-link-sdk";
|
|
168
|
+
|
|
169
|
+
const session = await createPlaidHeadlessSession({
|
|
170
|
+
token: "#GENERATED_LINK_TOKEN#",
|
|
171
|
+
onSuccess: (success) => {
|
|
172
|
+
console.log("Success", success);
|
|
173
|
+
},
|
|
174
|
+
onExit: (exit) => {
|
|
175
|
+
console.log("Exit", exit);
|
|
176
|
+
},
|
|
177
|
+
onEvent: (event) => {
|
|
178
|
+
console.log("Event", event);
|
|
179
|
+
},
|
|
180
|
+
onLoad: () => {
|
|
181
|
+
console.log("Headless session loaded");
|
|
182
|
+
},
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
await session.start();
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Embedded Search
|
|
189
|
+
|
|
190
|
+
Embedded Search is available on iOS and Android through
|
|
191
|
+
`PlaidEmbeddedSearchView`.
|
|
192
|
+
|
|
193
|
+
```tsx
|
|
194
|
+
import { PlaidEmbeddedSearchView } from "react-native-plaid-link-sdk";
|
|
195
|
+
|
|
196
|
+
export function EmbeddedSearch() {
|
|
197
|
+
return (
|
|
198
|
+
<PlaidEmbeddedSearchView
|
|
199
|
+
token="#GENERATED_LINK_TOKEN#"
|
|
200
|
+
style={{ height: 500 }}
|
|
201
|
+
onLoad={() => {
|
|
202
|
+
console.log("Embedded Search loaded");
|
|
203
|
+
}}
|
|
204
|
+
onSuccess={(success) => {
|
|
205
|
+
console.log("Success", success);
|
|
206
|
+
}}
|
|
207
|
+
onExit={(exit) => {
|
|
208
|
+
console.log("Exit", exit);
|
|
209
|
+
}}
|
|
210
|
+
onEvent={(event) => {
|
|
211
|
+
console.log("Event", event);
|
|
212
|
+
}}
|
|
213
|
+
/>
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## FinanceKit
|
|
219
|
+
|
|
220
|
+
FinanceKit is available on iOS only. Calling `syncFinanceKit` on Android rejects
|
|
221
|
+
with an error.
|
|
222
|
+
|
|
223
|
+
```ts
|
|
224
|
+
import {
|
|
225
|
+
FinanceKitSyncBehavior,
|
|
226
|
+
syncFinanceKit,
|
|
227
|
+
} from "react-native-plaid-link-sdk";
|
|
228
|
+
|
|
229
|
+
try {
|
|
230
|
+
await syncFinanceKit({
|
|
231
|
+
token: "#GENERATED_LINK_TOKEN#",
|
|
232
|
+
requestAuthorizationIfNeeded: true,
|
|
233
|
+
syncBehavior: FinanceKitSyncBehavior.LIVE,
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
console.log("FinanceKit sync complete");
|
|
237
|
+
} catch (error) {
|
|
238
|
+
console.log("FinanceKit error", error);
|
|
239
|
+
}
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## Troubleshooting
|
|
243
|
+
|
|
244
|
+
### Expo Go cannot load the native module
|
|
245
|
+
|
|
246
|
+
Expo Go does not include Plaid Link's native code. Use an Expo development
|
|
247
|
+
build, another custom native runtime, or a bare React Native app.
|
|
248
|
+
|
|
249
|
+
### iOS build cannot find LinkKit
|
|
250
|
+
|
|
251
|
+
Run `npx pod-install` after installing or upgrading the package. v13 ships the
|
|
252
|
+
required `LinkKit.xcframework` in the npm package.
|
|
253
|
+
|
|
254
|
+
### Android OAuth redirects fail
|
|
255
|
+
|
|
256
|
+
Confirm that the Android package name in your app matches the package name
|
|
257
|
+
configured in the Plaid Dashboard for the environment you are testing.
|
|
258
|
+
|
|
259
|
+
### iOS OAuth redirects fail
|
|
260
|
+
|
|
261
|
+
Confirm that the iOS bundle identifier and redirect URI are configured in the
|
|
262
|
+
Plaid Dashboard for the environment you are testing.
|
|
263
|
+
|
|
264
|
+
### Import path fails after upgrading to v13
|
|
265
|
+
|
|
266
|
+
Import from the package root only:
|
|
267
|
+
|
|
268
|
+
```ts
|
|
269
|
+
import { createPlaidLinkSession } from "react-native-plaid-link-sdk";
|
|
270
|
+
```
|
|
34
271
|
|
|
35
|
-
|
|
272
|
+
Do not import from `build/`, `src/`, `ios/`, or `android/` directly.
|
|
36
273
|
|
|
37
274
|
## Contributing
|
|
38
275
|
|
|
39
|
-
Issues and pull requests are welcome in this repository.
|
|
276
|
+
Issues and pull requests are welcome in this repository. Include the SDK
|
|
277
|
+
version, React Native version, Expo SDK version if applicable, platform, device
|
|
278
|
+
or simulator, and Link Session ID when reporting bugs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactNativePlaidLinkSdkModule.js","sourceRoot":"","sources":["../src/ReactNativePlaidLinkSdkModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,MAAM,CAAC;AA2BzD,yDAAyD;AACzD,eAAe,mBAAmB,CAChC,yBAAyB,CAC1B,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from \"expo\";\n\nimport {\n ReactNativePlaidLinkSdkModuleEvents,\n FinanceKitSyncBehavior,\n} from \"./ReactNativePlaidLinkSdk.types\";\n\ndeclare class ReactNativePlaidLinkSdkModule extends NativeModule<ReactNativePlaidLinkSdkModuleEvents> {\n sdkVersion: string;\n createPlaidLinkSession(token: string): Promise<void>;\n createPlaidLayerSession(token: string): Promise<void>;\n createPlaidHeadlessSession(token: string): Promise<void>;\n openLinkSession(fullScreen: boolean): Promise<void>;\n openLayerSession(): Promise<void>;\n startHeadlessSession(): Promise<void>;\n submitLayerData(\n phoneNumber?: string,\n dateOfBirth?: string,\n params?: Record<string, string
|
|
1
|
+
{"version":3,"file":"ReactNativePlaidLinkSdkModule.js","sourceRoot":"","sources":["../src/ReactNativePlaidLinkSdkModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,MAAM,CAAC;AA2BzD,yDAAyD;AACzD,eAAe,mBAAmB,CAChC,yBAAyB,CAC1B,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from \"expo\";\n\nimport {\n ReactNativePlaidLinkSdkModuleEvents,\n FinanceKitSyncBehavior,\n} from \"./ReactNativePlaidLinkSdk.types\";\n\ndeclare class ReactNativePlaidLinkSdkModule extends NativeModule<ReactNativePlaidLinkSdkModuleEvents> {\n sdkVersion: string;\n createPlaidLinkSession(token: string): Promise<void>;\n createPlaidLayerSession(token: string): Promise<void>;\n createPlaidHeadlessSession(token: string): Promise<void>;\n openLinkSession(fullScreen: boolean): Promise<void>;\n openLayerSession(): Promise<void>;\n startHeadlessSession(): Promise<void>;\n submitLayerData(\n phoneNumber?: string,\n dateOfBirth?: string,\n params?: Record<string, string>,\n ): Promise<void>;\n syncFinanceKit(\n token: string,\n requestAuthorizationIfNeeded: boolean,\n syncBehavior: FinanceKitSyncBehavior,\n ): Promise<void>;\n}\n\n// This call loads the native module object from the JSI.\nexport default requireNativeModule<ReactNativePlaidLinkSdkModule>(\n \"ReactNativePlaidLinkSdk\",\n);\n"]}
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,sBAAsB,EACtB,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EAEpB,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AAkBzC,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,sBAAsB,EACtB,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EAEpB,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AAkBzC,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,gBAAgB,CAAC,CA+B3B;AAED,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,iBAAiB,CAAC,CAqC5B;AAED,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,oBAAoB,CAAC,CAmC/B;AAED,wBAAsB,cAAc,CAAC,MAAM,EAAE;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,YAAY,CAAC,EAAE,sBAAsB,CAAC;CACvC,GAAG,OAAO,CAAC,IAAI,CAAC,CAUhB;AAED,OAAO,EACL,uBAAuB,EACvB,KAAK,4BAA4B,GAClC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC1D,cAAc,iCAAiC,CAAC"}
|
package/build/index.js
CHANGED
|
@@ -13,120 +13,68 @@ function cleanupListeners() {
|
|
|
13
13
|
eventSub = null;
|
|
14
14
|
}
|
|
15
15
|
export async function createPlaidLinkSession(config) {
|
|
16
|
-
|
|
16
|
+
cleanupListeners();
|
|
17
|
+
successSub = NativePlaidModule.addListener("PlaidLink.onSuccess", (success) => {
|
|
18
|
+
config.onSuccess(success);
|
|
17
19
|
cleanupListeners();
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
console.log("[PlaidLink] createPlaidLinkSession - returning session");
|
|
31
|
-
return {
|
|
32
|
-
open: (fullScreen = false) => {
|
|
33
|
-
console.log("[PlaidLink] open called", fullScreen);
|
|
34
|
-
return NativePlaidModule.openLinkSession(fullScreen);
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
catch (e) {
|
|
39
|
-
console.error("[PlaidLink] createPlaidLinkSession failed:", e);
|
|
40
|
-
throw e;
|
|
41
|
-
}
|
|
20
|
+
});
|
|
21
|
+
exitSub = NativePlaidModule.addListener("PlaidLink.onExit", (exit) => {
|
|
22
|
+
config.onExit(exit);
|
|
23
|
+
cleanupListeners();
|
|
24
|
+
});
|
|
25
|
+
eventSub = NativePlaidModule.addListener("PlaidLink.onEvent", (event) => {
|
|
26
|
+
config.onEvent(event);
|
|
27
|
+
});
|
|
28
|
+
await NativePlaidModule.createPlaidLinkSession(config.token);
|
|
29
|
+
return {
|
|
30
|
+
open: (fullScreen = false) => NativePlaidModule.openLinkSession(fullScreen),
|
|
31
|
+
};
|
|
42
32
|
}
|
|
43
33
|
export async function createPlaidLayerSession(config) {
|
|
44
|
-
|
|
34
|
+
cleanupListeners();
|
|
35
|
+
successSub = NativePlaidModule.addListener("PlaidLink.onSuccess", (success) => {
|
|
36
|
+
config.onSuccess(success);
|
|
45
37
|
cleanupListeners();
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
console.log("[PlaidLink] JS received onEvent:", event.eventName);
|
|
60
|
-
config.onEvent?.(event);
|
|
61
|
-
});
|
|
62
|
-
console.log("[PlaidLink] Listeners registered, creating native session");
|
|
63
|
-
await NativePlaidModule.createPlaidLayerSession(config.token);
|
|
64
|
-
console.log("[PlaidLink] createPlaidLayerSession - returning session");
|
|
65
|
-
return {
|
|
66
|
-
open: () => {
|
|
67
|
-
console.log("[PlaidLink] layer open called");
|
|
68
|
-
return NativePlaidModule.openLayerSession();
|
|
69
|
-
},
|
|
70
|
-
submit: (data) => {
|
|
71
|
-
console.log("[PlaidLink] layer submit called", data);
|
|
72
|
-
return NativePlaidModule.submitLayerData(data.phoneNumber, data.dateOfBirth, data.params);
|
|
73
|
-
},
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
catch (e) {
|
|
77
|
-
console.error("[PlaidLink] createPlaidLayerSession failed:", e);
|
|
78
|
-
throw e;
|
|
79
|
-
}
|
|
38
|
+
});
|
|
39
|
+
exitSub = NativePlaidModule.addListener("PlaidLink.onExit", (exit) => {
|
|
40
|
+
config.onExit?.(exit);
|
|
41
|
+
cleanupListeners();
|
|
42
|
+
});
|
|
43
|
+
eventSub = NativePlaidModule.addListener("PlaidLink.onEvent", (event) => {
|
|
44
|
+
config.onEvent?.(event);
|
|
45
|
+
});
|
|
46
|
+
await NativePlaidModule.createPlaidLayerSession(config.token);
|
|
47
|
+
return {
|
|
48
|
+
open: () => NativePlaidModule.openLayerSession(),
|
|
49
|
+
submit: (data) => NativePlaidModule.submitLayerData(data.phoneNumber, data.dateOfBirth, data.params),
|
|
50
|
+
};
|
|
80
51
|
}
|
|
81
52
|
export async function createPlaidHeadlessSession(config) {
|
|
82
|
-
|
|
53
|
+
cleanupListeners();
|
|
54
|
+
successSub = NativePlaidModule.addListener("PlaidLink.onSuccess", (success) => {
|
|
55
|
+
config.onSuccess(success);
|
|
83
56
|
cleanupListeners();
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
eventSub = NativePlaidModule.addListener("PlaidLink.onEvent", (event) => {
|
|
96
|
-
console.log("[PlaidLink] JS received onEvent:", event.eventName);
|
|
97
|
-
config.onEvent(event);
|
|
98
|
-
});
|
|
99
|
-
console.log("[PlaidLink] Listeners registered, creating native headless session");
|
|
100
|
-
await NativePlaidModule.createPlaidHeadlessSession(config.token);
|
|
101
|
-
console.log("[PlaidLink] createPlaidHeadlessSession - returning session");
|
|
102
|
-
if (config.onLoad) {
|
|
103
|
-
config.onLoad();
|
|
104
|
-
}
|
|
105
|
-
return {
|
|
106
|
-
start: () => {
|
|
107
|
-
console.log("[PlaidLink] headless start called");
|
|
108
|
-
return NativePlaidModule.startHeadlessSession();
|
|
109
|
-
},
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
catch (e) {
|
|
113
|
-
console.error("[PlaidLink] createPlaidHeadlessSession failed:", e);
|
|
114
|
-
throw e;
|
|
57
|
+
});
|
|
58
|
+
exitSub = NativePlaidModule.addListener("PlaidLink.onExit", (exit) => {
|
|
59
|
+
config.onExit(exit);
|
|
60
|
+
cleanupListeners();
|
|
61
|
+
});
|
|
62
|
+
eventSub = NativePlaidModule.addListener("PlaidLink.onEvent", (event) => {
|
|
63
|
+
config.onEvent(event);
|
|
64
|
+
});
|
|
65
|
+
await NativePlaidModule.createPlaidHeadlessSession(config.token);
|
|
66
|
+
if (config.onLoad) {
|
|
67
|
+
config.onLoad();
|
|
115
68
|
}
|
|
69
|
+
return {
|
|
70
|
+
start: () => NativePlaidModule.startHeadlessSession(),
|
|
71
|
+
};
|
|
116
72
|
}
|
|
117
73
|
export async function syncFinanceKit(config) {
|
|
118
74
|
if (Platform.OS === "android") {
|
|
119
75
|
throw new Error("FinanceKit is only available on iOS");
|
|
120
76
|
}
|
|
121
|
-
|
|
122
|
-
console.log("[PlaidLink] syncFinanceKit called");
|
|
123
|
-
await NativePlaidModule.syncFinanceKit(config.token, config.requestAuthorizationIfNeeded ?? true, config.syncBehavior ?? FinanceKitSyncBehavior.LIVE);
|
|
124
|
-
console.log("[PlaidLink] syncFinanceKit completed successfully");
|
|
125
|
-
}
|
|
126
|
-
catch (e) {
|
|
127
|
-
console.error("[PlaidLink] syncFinanceKit failed:", e);
|
|
128
|
-
throw e;
|
|
129
|
-
}
|
|
77
|
+
await NativePlaidModule.syncFinanceKit(config.token, config.requestAuthorizationIfNeeded ?? true, config.syncBehavior ?? FinanceKitSyncBehavior.LIVE);
|
|
130
78
|
}
|
|
131
79
|
export { PlaidEmbeddedSearchView, } from "./PlaidEmbeddedSearchView";
|
|
132
80
|
export { default } from "./ReactNativePlaidLinkSdkModule";
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAUL,sBAAsB,GACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,iBAAiB,MAAM,iCAAiC,CAAC;AAIhE,IAAI,UAAU,GAAwB,IAAI,CAAC;AAC3C,IAAI,OAAO,GAAwB,IAAI,CAAC;AACxC,IAAI,QAAQ,GAAwB,IAAI,CAAC;AAEzC,SAAS,gBAAgB;IACvB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,GAAG,IAAI,CAAC;IAClB,OAAO,GAAG,IAAI,CAAC;IACf,QAAQ,GAAG,IAAI,CAAC;AAClB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,MAA8B;IAE9B,IAAI,CAAC;QACH,gBAAgB,EAAE,CAAC;QAEnB,UAAU,GAAG,iBAAiB,CAAC,WAAW,CACxC,qBAAqB,EACrB,CAAC,OAAoB,EAAE,EAAE;YACvB,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;YAC1B,gBAAgB,EAAE,CAAC;QACrB,CAAC,CACF,CAAC;QAEF,OAAO,GAAG,iBAAiB,CAAC,WAAW,CAAC,kBAAkB,EAAE,CAAC,IAAc,EAAE,EAAE;YAC7E,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACpB,gBAAgB,EAAE,CAAC;QACrB,CAAC,CAAC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AAM,CAAC,CAAC;IACV,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,MAIpC;IACC,IAAI,QAAQ,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACzD,CAAC;IAED,IAAI,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;QACjD,MAAM,iBAAiB,CAAC,cAAc,CACpC,MAAM,CAAC,KAAK,EACZ,MAAM,CAAC,4BAA4B,IAAI,IAAI,EAC3C,MAAM,CAAC,YAAY,IAAI,sBAAsB,CAAC,IAAI,CACnD,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,mDAAmD,CAAC,CAAC;IACnE,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,CAAC,KAAK,CAAC,oCAAoC,EAAE,CAAC,CAAC,CAAC;QACvD,MAAM,CAAC,CAAC;IACV,CAAC;AACH,CAAC;AAED,OAAO,EACL,uBAAuB,GAExB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC1D,cAAc,iCAAiC,CAAC","sourcesContent":["import { Platform } from \"react-native\";\n\nimport {\n LinkExit,\n LinkEvent,\n LinkSuccess,\n LinkTokenConfiguration,\n PlaidLinkSession,\n LayerTokenConfiguration,\n PlaidLayerSession,\n PlaidHeadlessSession,\n SubmissionData,\n FinanceKitSyncBehavior,\n} from \"./ReactNativePlaidLinkSdk.types\";\nimport NativePlaidModule from \"./ReactNativePlaidLinkSdkModule\";\n\ntype Subscription = ReturnType<typeof NativePlaidModule.addListener>;\n\nlet successSub: Subscription | null = null;\nlet exitSub: Subscription | null = null;\nlet eventSub: Subscription | null = null;\n\nfunction cleanupListeners() {\n successSub?.remove();\n exitSub?.remove();\n eventSub?.remove();\n successSub = null;\n exitSub = null;\n eventSub = null;\n}\n\nexport async function createPlaidLinkSession(\n config: LinkTokenConfiguration\n): Promise<PlaidLinkSession> {\n try {\n cleanupListeners();\n\n successSub = NativePlaidModule.addListener(\n \"PlaidLink.onSuccess\",\n (success: LinkSuccess) => {\n config.onSuccess(success);\n cleanupListeners();\n }\n );\n\n exitSub = NativePlaidModule.addListener(\"PlaidLink.onExit\", (exit: LinkExit) => {\n config.onExit(exit);\n cleanupListeners();\n });\n\n eventSub = NativePlaidModule.addListener(\"PlaidLink.onEvent\", (event: LinkEvent) => {\n config.onEvent(event);\n });\n\n await NativePlaidModule.createPlaidLinkSession(config.token);\n\n console.log(\"[PlaidLink] createPlaidLinkSession - returning session\");\n\n return {\n open: (fullScreen = false) => {\n console.log(\"[PlaidLink] open called\", fullScreen);\n return NativePlaidModule.openLinkSession(fullScreen);\n },\n };\n } catch (e) {\n console.error(\"[PlaidLink] createPlaidLinkSession failed:\", e);\n throw e;\n }\n}\n\nexport async function createPlaidLayerSession(\n config: LayerTokenConfiguration\n): Promise<PlaidLayerSession> {\n try {\n cleanupListeners();\n\n console.log(\"[PlaidLink] createPlaidLayerSession - setting up listeners\");\n console.log(\n \"[PlaidLink] onEvent callback provided:\",\n typeof config.onEvent\n );\n\n successSub = NativePlaidModule.addListener(\n \"PlaidLink.onSuccess\",\n (success: LinkSuccess) => {\n console.log(\"[PlaidLink] JS received onSuccess event\");\n config.onSuccess(success);\n cleanupListeners();\n }\n );\n\n exitSub = NativePlaidModule.addListener(\"PlaidLink.onExit\", (exit: LinkExit) => {\n console.log(\"[PlaidLink] JS received onExit event\");\n config.onExit?.(exit);\n cleanupListeners();\n });\n\n eventSub = NativePlaidModule.addListener(\"PlaidLink.onEvent\", (event: LinkEvent) => {\n console.log(\"[PlaidLink] JS received onEvent:\", event.eventName);\n config.onEvent?.(event);\n });\n\n console.log(\"[PlaidLink] Listeners registered, creating native session\");\n await NativePlaidModule.createPlaidLayerSession(config.token);\n\n console.log(\"[PlaidLink] createPlaidLayerSession - returning session\");\n\n return {\n open: () => {\n console.log(\"[PlaidLink] layer open called\");\n return NativePlaidModule.openLayerSession();\n },\n submit: (data: SubmissionData) => {\n console.log(\"[PlaidLink] layer submit called\", data);\n return NativePlaidModule.submitLayerData(\n data.phoneNumber,\n data.dateOfBirth,\n data.params\n );\n },\n };\n } catch (e) {\n console.error(\"[PlaidLink] createPlaidLayerSession failed:\", e);\n throw e;\n }\n}\n\nexport async function createPlaidHeadlessSession(\n config: LinkTokenConfiguration\n): Promise<PlaidHeadlessSession> {\n try {\n cleanupListeners();\n\n console.log(\n \"[PlaidLink] createPlaidHeadlessSession - setting up listeners\"\n );\n\n successSub = NativePlaidModule.addListener(\n \"PlaidLink.onSuccess\",\n (success: LinkSuccess) => {\n console.log(\"[PlaidLink] JS received onSuccess event\");\n config.onSuccess(success);\n cleanupListeners();\n }\n );\n\n exitSub = NativePlaidModule.addListener(\"PlaidLink.onExit\", (exit: LinkExit) => {\n console.log(\"[PlaidLink] JS received onExit event\");\n config.onExit(exit);\n cleanupListeners();\n });\n\n eventSub = NativePlaidModule.addListener(\"PlaidLink.onEvent\", (event: LinkEvent) => {\n console.log(\"[PlaidLink] JS received onEvent:\", event.eventName);\n config.onEvent(event);\n });\n\n console.log(\n \"[PlaidLink] Listeners registered, creating native headless session\"\n );\n await NativePlaidModule.createPlaidHeadlessSession(config.token);\n\n console.log(\"[PlaidLink] createPlaidHeadlessSession - returning session\");\n\n if (config.onLoad) {\n config.onLoad();\n }\n\n return {\n start: () => {\n console.log(\"[PlaidLink] headless start called\");\n return NativePlaidModule.startHeadlessSession();\n },\n };\n } catch (e) {\n console.error(\"[PlaidLink] createPlaidHeadlessSession failed:\", e);\n throw e;\n }\n}\n\nexport async function syncFinanceKit(config: {\n token: string;\n requestAuthorizationIfNeeded?: boolean;\n syncBehavior?: FinanceKitSyncBehavior;\n}): Promise<void> {\n if (Platform.OS === \"android\") {\n throw new Error(\"FinanceKit is only available on iOS\");\n }\n\n try {\n console.log(\"[PlaidLink] syncFinanceKit called\");\n await NativePlaidModule.syncFinanceKit(\n config.token,\n config.requestAuthorizationIfNeeded ?? true,\n config.syncBehavior ?? FinanceKitSyncBehavior.LIVE\n );\n console.log(\"[PlaidLink] syncFinanceKit completed successfully\");\n } catch (e) {\n console.error(\"[PlaidLink] syncFinanceKit failed:\", e);\n throw e;\n }\n}\n\nexport {\n PlaidEmbeddedSearchView,\n type PlaidEmbeddedSearchViewProps,\n} from \"./PlaidEmbeddedSearchView\";\nexport { default } from \"./ReactNativePlaidLinkSdkModule\";\nexport * from \"./ReactNativePlaidLinkSdk.types\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAUL,sBAAsB,GACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,iBAAiB,MAAM,iCAAiC,CAAC;AAIhE,IAAI,UAAU,GAAwB,IAAI,CAAC;AAC3C,IAAI,OAAO,GAAwB,IAAI,CAAC;AACxC,IAAI,QAAQ,GAAwB,IAAI,CAAC;AAEzC,SAAS,gBAAgB;IACvB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,GAAG,IAAI,CAAC;IAClB,OAAO,GAAG,IAAI,CAAC;IACf,QAAQ,GAAG,IAAI,CAAC;AAClB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,MAA8B;IAE9B,gBAAgB,EAAE,CAAC;IAEnB,UAAU,GAAG,iBAAiB,CAAC,WAAW,CACxC,qBAAqB,EACrB,CAAC,OAAoB,EAAE,EAAE;QACvB,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC1B,gBAAgB,EAAE,CAAC;IACrB,CAAC,CACF,CAAC;IAEF,OAAO,GAAG,iBAAiB,CAAC,WAAW,CACrC,kBAAkB,EAClB,CAAC,IA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,cAAc,CACpC,MAAM,CAAC,KAAK,EACZ,MAAM,CAAC,4BAA4B,IAAI,IAAI,EAC3C,MAAM,CAAC,YAAY,IAAI,sBAAsB,CAAC,IAAI,CACnD,CAAC;AACJ,CAAC;AAED,OAAO,EACL,uBAAuB,GAExB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC1D,cAAc,iCAAiC,CAAC","sourcesContent":["import { Platform } from \"react-native\";\n\nimport {\n LinkExit,\n LinkEvent,\n LinkSuccess,\n LinkTokenConfiguration,\n PlaidLinkSession,\n LayerTokenConfiguration,\n PlaidLayerSession,\n PlaidHeadlessSession,\n SubmissionData,\n FinanceKitSyncBehavior,\n} from \"./ReactNativePlaidLinkSdk.types\";\nimport NativePlaidModule from \"./ReactNativePlaidLinkSdkModule\";\n\ntype Subscription = ReturnType<typeof NativePlaidModule.addListener>;\n\nlet successSub: Subscription | null = null;\nlet exitSub: Subscription | null = null;\nlet eventSub: Subscription | null = null;\n\nfunction cleanupListeners() {\n successSub?.remove();\n exitSub?.remove();\n eventSub?.remove();\n successSub = null;\n exitSub = null;\n eventSub = null;\n}\n\nexport async function createPlaidLinkSession(\n config: LinkTokenConfiguration,\n): Promise<PlaidLinkSession> {\n cleanupListeners();\n\n successSub = NativePlaidModule.addListener(\n \"PlaidLink.onSuccess\",\n (success: LinkSuccess) => {\n config.onSuccess(success);\n cleanupListeners();\n },\n );\n\n exitSub = NativePlaidModule.addListener(\n \"PlaidLink.onExit\",\n (exit: LinkExit) => {\n config.onExit(exit);\n cleanupListeners();\n },\n );\n\n eventSub = NativePlaidModule.addListener(\n \"PlaidLink.onEvent\",\n (event: LinkEvent) => {\n config.onEvent(event);\n },\n );\n\n await NativePlaidModule.createPlaidLinkSession(config.token);\n\n return {\n open: (fullScreen = false) => NativePlaidModule.openLinkSession(fullScreen),\n };\n}\n\nexport async function createPlaidLayerSession(\n config: LayerTokenConfiguration,\n): Promise<PlaidLayerSession> {\n cleanupListeners();\n\n successSub = NativePlaidModule.addListener(\n \"PlaidLink.onSuccess\",\n (success: LinkSuccess) => {\n config.onSuccess(success);\n cleanupListeners();\n },\n );\n\n exitSub = NativePlaidModule.addListener(\n \"PlaidLink.onExit\",\n (exit: LinkExit) => {\n config.onExit?.(exit);\n cleanupListeners();\n },\n );\n\n eventSub = NativePlaidModule.addListener(\n \"PlaidLink.onEvent\",\n (event: LinkEvent) => {\n config.onEvent?.(event);\n },\n );\n\n await NativePlaidModule.createPlaidLayerSession(config.token);\n\n return {\n open: () => NativePlaidModule.openLayerSession(),\n submit: (data: SubmissionData) =>\n NativePlaidModule.submitLayerData(\n data.phoneNumber,\n data.dateOfBirth,\n data.params,\n ),\n };\n}\n\nexport async function createPlaidHeadlessSession(\n config: LinkTokenConfiguration,\n): Promise<PlaidHeadlessSession> {\n cleanupListeners();\n\n successSub = NativePlaidModule.addListener(\n \"PlaidLink.onSuccess\",\n (success: LinkSuccess) => {\n config.onSuccess(success);\n cleanupListeners();\n },\n );\n\n exitSub = NativePlaidModule.addListener(\n \"PlaidLink.onExit\",\n (exit: LinkExit) => {\n config.onExit(exit);\n cleanupListeners();\n },\n );\n\n eventSub = NativePlaidModule.addListener(\n \"PlaidLink.onEvent\",\n (event: LinkEvent) => {\n config.onEvent(event);\n },\n );\n\n await NativePlaidModule.createPlaidHeadlessSession(config.token);\n\n if (config.onLoad) {\n config.onLoad();\n }\n\n return {\n start: () => NativePlaidModule.startHeadlessSession(),\n };\n}\n\nexport async function syncFinanceKit(config: {\n token: string;\n requestAuthorizationIfNeeded?: boolean;\n syncBehavior?: FinanceKitSyncBehavior;\n}): Promise<void> {\n if (Platform.OS === \"android\") {\n throw new Error(\"FinanceKit is only available on iOS\");\n }\n\n await NativePlaidModule.syncFinanceKit(\n config.token,\n config.requestAuthorizationIfNeeded ?? true,\n config.syncBehavior ?? FinanceKitSyncBehavior.LIVE,\n );\n}\n\nexport {\n PlaidEmbeddedSearchView,\n type PlaidEmbeddedSearchViewProps,\n} from \"./PlaidEmbeddedSearchView\";\nexport { default } from \"./ReactNativePlaidLinkSdkModule\";\nexport * from \"./ReactNativePlaidLinkSdk.types\";\n"]}
|
|
@@ -18,23 +18,6 @@
|
|
|
18
18
|
<key>SupportedPlatform</key>
|
|
19
19
|
<string>ios</string>
|
|
20
20
|
</dict>
|
|
21
|
-
<dict>
|
|
22
|
-
<key>BinaryPath</key>
|
|
23
|
-
<string>LinkKit.framework/Versions/A/LinkKit</string>
|
|
24
|
-
<key>LibraryIdentifier</key>
|
|
25
|
-
<string>ios-arm64_x86_64-maccatalyst</string>
|
|
26
|
-
<key>LibraryPath</key>
|
|
27
|
-
<string>LinkKit.framework</string>
|
|
28
|
-
<key>SupportedArchitectures</key>
|
|
29
|
-
<array>
|
|
30
|
-
<string>arm64</string>
|
|
31
|
-
<string>x86_64</string>
|
|
32
|
-
</array>
|
|
33
|
-
<key>SupportedPlatform</key>
|
|
34
|
-
<string>ios</string>
|
|
35
|
-
<key>SupportedPlatformVariant</key>
|
|
36
|
-
<string>maccatalyst</string>
|
|
37
|
-
</dict>
|
|
38
21
|
<dict>
|
|
39
22
|
<key>BinaryPath</key>
|
|
40
23
|
<string>LinkKit.framework/LinkKit</string>
|
|
Binary file
|
|
Binary file
|
|
@@ -52599,6 +52599,20 @@
|
|
|
52599
52599
|
"length": 23,
|
|
52600
52600
|
"value": "\"plaid_link_sheet_root\""
|
|
52601
52601
|
},
|
|
52602
|
+
{
|
|
52603
|
+
"filePath": "\/opt\/homebrew\/var\/buildkite-agent\/builds\/i-0926a7a7701540b80-2\/plaid\/client-ci\/link\/apple\/Sources\/Internal\/DefaultDeviceMetadataProvider.swift",
|
|
52604
|
+
"kind": "StringLiteral",
|
|
52605
|
+
"offset": 1634,
|
|
52606
|
+
"length": 2,
|
|
52607
|
+
"value": "\"\""
|
|
52608
|
+
},
|
|
52609
|
+
{
|
|
52610
|
+
"filePath": "\/opt\/homebrew\/var\/buildkite-agent\/builds\/i-0926a7a7701540b80-2\/plaid\/client-ci\/link\/apple\/Sources\/Internal\/DefaultDeviceMetadataProvider.swift",
|
|
52611
|
+
"kind": "IntegerLiteral",
|
|
52612
|
+
"offset": 1726,
|
|
52613
|
+
"length": 1,
|
|
52614
|
+
"value": "0"
|
|
52615
|
+
},
|
|
52602
52616
|
{
|
|
52603
52617
|
"filePath": "\/opt\/homebrew\/var\/buildkite-agent\/builds\/i-0926a7a7701540b80-2\/plaid\/client-ci\/link\/apple\/Sources\/Public\/Models\/Structs\/LinkEvent.swift",
|
|
52604
52618
|
"kind": "StringLiteral",
|
|
@@ -206,6 +206,9 @@ public enum AccountSubtype : Swift.Codable, Swift.Equatable, Swift.CustomStringC
|
|
|
206
206
|
}
|
|
207
207
|
public init(from decoder: any Swift.Decoder) throws
|
|
208
208
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
209
|
+
public var type: Swift.String {
|
|
210
|
+
get
|
|
211
|
+
}
|
|
209
212
|
public static func == (a: LinkKit.AccountSubtype, b: LinkKit.AccountSubtype) -> Swift.Bool
|
|
210
213
|
}
|
|
211
214
|
extension LinkKit.AccountSubtype {
|