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/src/index.ts
CHANGED
|
@@ -30,152 +30,118 @@ function cleanupListeners() {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export async function createPlaidLinkSession(
|
|
33
|
-
config: LinkTokenConfiguration
|
|
33
|
+
config: LinkTokenConfiguration,
|
|
34
34
|
): Promise<PlaidLinkSession> {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
(success
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
35
|
+
cleanupListeners();
|
|
36
|
+
|
|
37
|
+
successSub = NativePlaidModule.addListener(
|
|
38
|
+
"PlaidLink.onSuccess",
|
|
39
|
+
(success: LinkSuccess) => {
|
|
40
|
+
config.onSuccess(success);
|
|
41
|
+
cleanupListeners();
|
|
42
|
+
},
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
exitSub = NativePlaidModule.addListener(
|
|
46
|
+
"PlaidLink.onExit",
|
|
47
|
+
(exit: LinkExit) => {
|
|
47
48
|
config.onExit(exit);
|
|
48
49
|
cleanupListeners();
|
|
49
|
-
}
|
|
50
|
+
},
|
|
51
|
+
);
|
|
50
52
|
|
|
51
|
-
|
|
53
|
+
eventSub = NativePlaidModule.addListener(
|
|
54
|
+
"PlaidLink.onEvent",
|
|
55
|
+
(event: LinkEvent) => {
|
|
52
56
|
config.onEvent(event);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
await NativePlaidModule.createPlaidLinkSession(config.token);
|
|
57
|
+
},
|
|
58
|
+
);
|
|
56
59
|
|
|
57
|
-
|
|
60
|
+
await NativePlaidModule.createPlaidLinkSession(config.token);
|
|
58
61
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return NativePlaidModule.openLinkSession(fullScreen);
|
|
63
|
-
},
|
|
64
|
-
};
|
|
65
|
-
} catch (e) {
|
|
66
|
-
console.error("[PlaidLink] createPlaidLinkSession failed:", e);
|
|
67
|
-
throw e;
|
|
68
|
-
}
|
|
62
|
+
return {
|
|
63
|
+
open: (fullScreen = false) => NativePlaidModule.openLinkSession(fullScreen),
|
|
64
|
+
};
|
|
69
65
|
}
|
|
70
66
|
|
|
71
67
|
export async function createPlaidLayerSession(
|
|
72
|
-
config: LayerTokenConfiguration
|
|
68
|
+
config: LayerTokenConfiguration,
|
|
73
69
|
): Promise<PlaidLayerSession> {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
config.onSuccess(success);
|
|
88
|
-
cleanupListeners();
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
|
|
92
|
-
exitSub = NativePlaidModule.addListener("PlaidLink.onExit", (exit: LinkExit) => {
|
|
93
|
-
console.log("[PlaidLink] JS received onExit event");
|
|
70
|
+
cleanupListeners();
|
|
71
|
+
|
|
72
|
+
successSub = NativePlaidModule.addListener(
|
|
73
|
+
"PlaidLink.onSuccess",
|
|
74
|
+
(success: LinkSuccess) => {
|
|
75
|
+
config.onSuccess(success);
|
|
76
|
+
cleanupListeners();
|
|
77
|
+
},
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
exitSub = NativePlaidModule.addListener(
|
|
81
|
+
"PlaidLink.onExit",
|
|
82
|
+
(exit: LinkExit) => {
|
|
94
83
|
config.onExit?.(exit);
|
|
95
84
|
cleanupListeners();
|
|
96
|
-
}
|
|
85
|
+
},
|
|
86
|
+
);
|
|
97
87
|
|
|
98
|
-
|
|
99
|
-
|
|
88
|
+
eventSub = NativePlaidModule.addListener(
|
|
89
|
+
"PlaidLink.onEvent",
|
|
90
|
+
(event: LinkEvent) => {
|
|
100
91
|
config.onEvent?.(event);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return NativePlaidModule.submitLayerData(
|
|
116
|
-
data.phoneNumber,
|
|
117
|
-
data.dateOfBirth,
|
|
118
|
-
data.params
|
|
119
|
-
);
|
|
120
|
-
},
|
|
121
|
-
};
|
|
122
|
-
} catch (e) {
|
|
123
|
-
console.error("[PlaidLink] createPlaidLayerSession failed:", e);
|
|
124
|
-
throw e;
|
|
125
|
-
}
|
|
92
|
+
},
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
await NativePlaidModule.createPlaidLayerSession(config.token);
|
|
96
|
+
|
|
97
|
+
return {
|
|
98
|
+
open: () => NativePlaidModule.openLayerSession(),
|
|
99
|
+
submit: (data: SubmissionData) =>
|
|
100
|
+
NativePlaidModule.submitLayerData(
|
|
101
|
+
data.phoneNumber,
|
|
102
|
+
data.dateOfBirth,
|
|
103
|
+
data.params,
|
|
104
|
+
),
|
|
105
|
+
};
|
|
126
106
|
}
|
|
127
107
|
|
|
128
108
|
export async function createPlaidHeadlessSession(
|
|
129
|
-
config: LinkTokenConfiguration
|
|
109
|
+
config: LinkTokenConfiguration,
|
|
130
110
|
): Promise<PlaidHeadlessSession> {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
);
|
|
146
|
-
|
|
147
|
-
exitSub = NativePlaidModule.addListener("PlaidLink.onExit", (exit: LinkExit) => {
|
|
148
|
-
console.log("[PlaidLink] JS received onExit event");
|
|
111
|
+
cleanupListeners();
|
|
112
|
+
|
|
113
|
+
successSub = NativePlaidModule.addListener(
|
|
114
|
+
"PlaidLink.onSuccess",
|
|
115
|
+
(success: LinkSuccess) => {
|
|
116
|
+
config.onSuccess(success);
|
|
117
|
+
cleanupListeners();
|
|
118
|
+
},
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
exitSub = NativePlaidModule.addListener(
|
|
122
|
+
"PlaidLink.onExit",
|
|
123
|
+
(exit: LinkExit) => {
|
|
149
124
|
config.onExit(exit);
|
|
150
125
|
cleanupListeners();
|
|
151
|
-
}
|
|
126
|
+
},
|
|
127
|
+
);
|
|
152
128
|
|
|
153
|
-
|
|
154
|
-
|
|
129
|
+
eventSub = NativePlaidModule.addListener(
|
|
130
|
+
"PlaidLink.onEvent",
|
|
131
|
+
(event: LinkEvent) => {
|
|
155
132
|
config.onEvent(event);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
console.log("[PlaidLink] createPlaidHeadlessSession - returning session");
|
|
164
|
-
|
|
165
|
-
if (config.onLoad) {
|
|
166
|
-
config.onLoad();
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
return {
|
|
170
|
-
start: () => {
|
|
171
|
-
console.log("[PlaidLink] headless start called");
|
|
172
|
-
return NativePlaidModule.startHeadlessSession();
|
|
173
|
-
},
|
|
174
|
-
};
|
|
175
|
-
} catch (e) {
|
|
176
|
-
console.error("[PlaidLink] createPlaidHeadlessSession failed:", e);
|
|
177
|
-
throw e;
|
|
133
|
+
},
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
await NativePlaidModule.createPlaidHeadlessSession(config.token);
|
|
137
|
+
|
|
138
|
+
if (config.onLoad) {
|
|
139
|
+
config.onLoad();
|
|
178
140
|
}
|
|
141
|
+
|
|
142
|
+
return {
|
|
143
|
+
start: () => NativePlaidModule.startHeadlessSession(),
|
|
144
|
+
};
|
|
179
145
|
}
|
|
180
146
|
|
|
181
147
|
export async function syncFinanceKit(config: {
|
|
@@ -187,18 +153,11 @@ export async function syncFinanceKit(config: {
|
|
|
187
153
|
throw new Error("FinanceKit is only available on iOS");
|
|
188
154
|
}
|
|
189
155
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
config.syncBehavior ?? FinanceKitSyncBehavior.LIVE
|
|
196
|
-
);
|
|
197
|
-
console.log("[PlaidLink] syncFinanceKit completed successfully");
|
|
198
|
-
} catch (e) {
|
|
199
|
-
console.error("[PlaidLink] syncFinanceKit failed:", e);
|
|
200
|
-
throw e;
|
|
201
|
-
}
|
|
156
|
+
await NativePlaidModule.syncFinanceKit(
|
|
157
|
+
config.token,
|
|
158
|
+
config.requestAuthorizationIfNeeded ?? true,
|
|
159
|
+
config.syncBehavior ?? FinanceKitSyncBehavior.LIVE,
|
|
160
|
+
);
|
|
202
161
|
}
|
|
203
162
|
|
|
204
163
|
export {
|
package/.eslintrc.js
DELETED
package/.gitattributes
DELETED
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
20.19.4
|
package/eslint.config.js
DELETED