react-native-plaid-link-sdk 12.8.3 → 13.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/CHANGELOG.md +1470 -0
  2. package/README.md +217 -239
  3. package/V13_MIGRATION_GUIDE.md +470 -0
  4. package/android/build.gradle +30 -98
  5. package/android/src/main/AndroidManifest.xml +1 -8
  6. package/android/src/main/java/expo/modules/plaidlinksdk/PlaidEmbeddedResultDispatcher.kt +19 -0
  7. package/android/src/main/java/expo/modules/plaidlinksdk/PlaidResultMappers.kt +217 -0
  8. package/android/src/main/java/expo/modules/plaidlinksdk/RNPlaidLinkSdkVersion.kt +5 -0
  9. package/android/src/main/java/expo/modules/plaidlinksdk/ReactNativePlaidLinkSdkModule.kt +183 -0
  10. package/android/src/main/java/expo/modules/plaidlinksdk/ReactNativePlaidLinkSdkView.kt +69 -0
  11. package/build/PlaidEmbeddedSearchView.d.ts +12 -0
  12. package/build/PlaidEmbeddedSearchView.d.ts.map +1 -0
  13. package/build/PlaidEmbeddedSearchView.js +8 -0
  14. package/build/PlaidEmbeddedSearchView.js.map +1 -0
  15. package/{dist/src/Types.d.ts → build/ReactNativePlaidLinkSdk.types.d.ts} +78 -47
  16. package/build/ReactNativePlaidLinkSdk.types.d.ts.map +1 -0
  17. package/{dist/build → build}/ReactNativePlaidLinkSdk.types.js +82 -71
  18. package/build/ReactNativePlaidLinkSdk.types.js.map +1 -0
  19. package/build/ReactNativePlaidLinkSdkModule.d.ts +16 -0
  20. package/build/ReactNativePlaidLinkSdkModule.d.ts.map +1 -0
  21. package/{dist/build → build}/ReactNativePlaidLinkSdkModule.js +1 -1
  22. package/build/ReactNativePlaidLinkSdkModule.js.map +1 -0
  23. package/build/index.d.ts +13 -0
  24. package/build/index.d.ts.map +1 -0
  25. package/build/index.js +82 -0
  26. package/build/index.js.map +1 -0
  27. package/expo-module.config.json +9 -0
  28. package/ios/Frameworks/LinkKit.xcframework/Info.plist +44 -0
  29. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Headers/LinkKit-Swift.h +327 -0
  30. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Headers/LinkKit.h +22 -0
  31. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Info.plist +0 -0
  32. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/LinkKit +0 -0
  33. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.abi.json +53695 -0
  34. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.private.swiftinterface +759 -0
  35. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  36. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftinterface +759 -0
  37. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
  38. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/module.modulemap +11 -0
  39. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/PrivacyInfo.xcprivacy +32 -0
  40. package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/_CodeSignature/CodeResources +201 -0
  41. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Headers/LinkKit-Swift.h +650 -0
  42. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Headers/LinkKit.h +22 -0
  43. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Info.plist +0 -0
  44. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/LinkKit +0 -0
  45. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.abi.json +53695 -0
  46. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +759 -0
  47. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  48. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +759 -0
  49. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftmodule +0 -0
  50. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +53695 -0
  51. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +759 -0
  52. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  53. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +759 -0
  54. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule +0 -0
  55. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/module.modulemap +11 -0
  56. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/PrivacyInfo.xcprivacy +32 -0
  57. package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/_CodeSignature/CodeResources +256 -0
  58. package/ios/ReactNativePlaidLinkSdk.podspec +29 -0
  59. package/ios/src/PlaidEmbeddedSearchView.swift +101 -0
  60. package/ios/src/RNPlaidLinkSdkVersion.swift +19 -0
  61. package/ios/src/ReactNativePlaidLinkSdkModule.swift +555 -0
  62. package/package.json +65 -73
  63. package/src/PlaidEmbeddedSearchView.tsx +35 -0
  64. package/src/ReactNativePlaidLinkSdk.types.ts +894 -0
  65. package/src/ReactNativePlaidLinkSdkModule.ts +31 -0
  66. package/src/index.ts +166 -22
  67. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  68. package/android/gradle/wrapper/gradle-wrapper.properties +0 -6
  69. package/android/gradle.properties +0 -31
  70. package/android/gradlew +0 -174
  71. package/android/gradlew.bat +0 -89
  72. package/android/src/main/java/com/plaid/ActivityResultHandler.java +0 -7
  73. package/android/src/main/java/com/plaid/ActivityResultManager.java +0 -15
  74. package/android/src/main/java/com/plaid/GlobalFunctions.kt +0 -42
  75. package/android/src/main/java/com/plaid/PLKEmbeddedView.kt +0 -161
  76. package/android/src/main/java/com/plaid/PLKEmbeddedViewManager.kt +0 -50
  77. package/android/src/main/java/com/plaid/PlaidModule.kt +0 -291
  78. package/android/src/main/java/com/plaid/PlaidPackage.java +0 -117
  79. package/android/src/main/java/com/plaid/gson/PlaidJsonConverter.kt +0 -94
  80. package/android/src/main/java/com/plaid/gson/RNAccountAdapter.kt +0 -48
  81. package/android/src/main/java/com/plaid/gson/RNEventMetadataAdapter.kt +0 -49
  82. package/android/src/main/java/com/plaid/gson/RNLinkInstitutionAdapter.kt +0 -34
  83. package/android/src/main/res/layout/plk_embedded_view.xml +0 -5
  84. package/android/src/paper/java/com/facebook/react/viewmanagers/PLKEmbeddedViewManagerDelegate.java +0 -35
  85. package/android/src/paper/java/com/facebook/react/viewmanagers/PLKEmbeddedViewManagerInterface.java +0 -18
  86. package/android/src/paper/java/com/plaid/NativePlaidLinkModuleAndroidSpec.java +0 -64
  87. package/android/src/paper/java/com/plaid/NativePlaidLinkModuleiOSSpec.java +0 -59
  88. package/dist/build/EmbeddedLink/EmbeddedLinkView.d.ts +0 -2
  89. package/dist/build/EmbeddedLink/EmbeddedLinkView.js +0 -56
  90. package/dist/build/EmbeddedLink/EmbeddedLinkView.web.d.ts +0 -1
  91. package/dist/build/EmbeddedLink/EmbeddedLinkView.web.js +0 -2
  92. package/dist/build/EmbeddedLink/NativeEmbeddedLinkView.d.ts +0 -2
  93. package/dist/build/EmbeddedLink/NativeEmbeddedLinkView.js +0 -3
  94. package/dist/build/PlaidEmbeddedSearchView.d.ts +0 -2
  95. package/dist/build/PlaidEmbeddedSearchView.js +0 -25
  96. package/dist/build/PlaidLink.d.ts +0 -7
  97. package/dist/build/PlaidLink.js +0 -137
  98. package/dist/build/ReactNativePlaidLinkSdk.types.d.ts +0 -108
  99. package/dist/build/ReactNativePlaidLinkSdkModule.d.ts +0 -2
  100. package/dist/build/ReactNativePlaidLinkSdkView.d.ts +0 -2
  101. package/dist/build/ReactNativePlaidLinkSdkView.js +0 -7
  102. package/dist/build/Types.d.ts +0 -108
  103. package/dist/build/Types.js +0 -462
  104. package/dist/build/fabric/EmbeddedLinkViewNativeComponent.d.ts +0 -2
  105. package/dist/build/fabric/EmbeddedLinkViewNativeComponent.js +0 -3
  106. package/dist/build/fabric/NativePlaidLinkModuleAndroid.d.ts +0 -2
  107. package/dist/build/fabric/NativePlaidLinkModuleAndroid.js +0 -5
  108. package/dist/build/fabric/NativePlaidLinkModuleiOS.d.ts +0 -2
  109. package/dist/build/fabric/NativePlaidLinkModuleiOS.js +0 -5
  110. package/dist/build/fabric/fabricUtils.d.ts +0 -1
  111. package/dist/build/fabric/fabricUtils.js +0 -2
  112. package/dist/build/index.d.ts +0 -14
  113. package/dist/build/index.js +0 -154
  114. package/dist/scripts/check-package-entrypoints.d.ts +0 -1
  115. package/dist/scripts/check-package-entrypoints.js +0 -61
  116. package/dist/src/EmbeddedLink/EmbeddedLinkView.d.ts +0 -13
  117. package/dist/src/EmbeddedLink/EmbeddedLinkView.js +0 -55
  118. package/dist/src/EmbeddedLink/EmbeddedLinkView.web.d.ts +0 -1
  119. package/dist/src/EmbeddedLink/EmbeddedLinkView.web.js +0 -1
  120. package/dist/src/EmbeddedLink/NativeEmbeddedLinkView.d.ts +0 -2
  121. package/dist/src/EmbeddedLink/NativeEmbeddedLinkView.js +0 -2
  122. package/dist/src/PlaidLink.d.ts +0 -34
  123. package/dist/src/PlaidLink.js +0 -136
  124. package/dist/src/Types.js +0 -463
  125. package/dist/src/__tests__/Types.tests.d.ts +0 -1
  126. package/dist/src/__tests__/Types.tests.js +0 -14
  127. package/dist/src/fabric/EmbeddedLinkViewNativeComponent.d.ts +0 -15
  128. package/dist/src/fabric/EmbeddedLinkViewNativeComponent.js +0 -2
  129. package/dist/src/fabric/NativePlaidLinkModuleAndroid.d.ts +0 -15
  130. package/dist/src/fabric/NativePlaidLinkModuleAndroid.js +0 -4
  131. package/dist/src/fabric/NativePlaidLinkModuleiOS.d.ts +0 -15
  132. package/dist/src/fabric/NativePlaidLinkModuleiOS.js +0 -4
  133. package/dist/src/fabric/fabricUtils.d.ts +0 -1
  134. package/dist/src/fabric/fabricUtils.js +0 -1
  135. package/dist/src/index.d.ts +0 -4
  136. package/dist/src/index.js +0 -5
  137. package/ios/PLKEmbeddedView.m +0 -7
  138. package/ios/PLKEmbeddedView.swift +0 -116
  139. package/ios/PLKEmbeddedViewComponentView.h +0 -28
  140. package/ios/PLKEmbeddedViewComponentView.mm +0 -91
  141. package/ios/PLKEmbeddedViewManager.swift +0 -14
  142. package/ios/PLKFabricHelpers.h +0 -116
  143. package/ios/RNLinksdk-Bridging-Header.h +0 -8
  144. package/ios/RNLinksdk.h +0 -19
  145. package/ios/RNLinksdk.mm +0 -732
  146. package/ios/RNPlaidHelper.h +0 -15
  147. package/ios/RNPlaidHelper.m +0 -33
  148. package/ios/react_native_plaid_link_sdk.h +0 -2
  149. package/react-native-plaid-link-sdk.podspec +0 -40
  150. package/src/EmbeddedLink/EmbeddedLinkView.tsx +0 -95
  151. package/src/EmbeddedLink/EmbeddedLinkView.web.tsx +0 -5
  152. package/src/EmbeddedLink/NativeEmbeddedLinkView.tsx +0 -3
  153. package/src/PlaidLink.tsx +0 -167
  154. package/src/Types.ts +0 -634
  155. package/src/__tests__/Types.tests.ts +0 -15
  156. package/src/fabric/EmbeddedLinkViewNativeComponent.ts +0 -24
  157. package/src/fabric/NativePlaidLinkModuleAndroid.ts +0 -32
  158. package/src/fabric/NativePlaidLinkModuleiOS.ts +0 -33
  159. package/src/fabric/fabricUtils.ts +0 -2
@@ -0,0 +1,31 @@
1
+ import { NativeModule, requireNativeModule } from "expo";
2
+
3
+ import {
4
+ ReactNativePlaidLinkSdkModuleEvents,
5
+ FinanceKitSyncBehavior,
6
+ } from "./ReactNativePlaidLinkSdk.types";
7
+
8
+ declare class ReactNativePlaidLinkSdkModule extends NativeModule<ReactNativePlaidLinkSdkModuleEvents> {
9
+ sdkVersion: string;
10
+ createPlaidLinkSession(token: string): Promise<void>;
11
+ createPlaidLayerSession(token: string): Promise<void>;
12
+ createPlaidHeadlessSession(token: string): Promise<void>;
13
+ openLinkSession(fullScreen: boolean): Promise<void>;
14
+ openLayerSession(): Promise<void>;
15
+ startHeadlessSession(): Promise<void>;
16
+ submitLayerData(
17
+ phoneNumber?: string,
18
+ dateOfBirth?: string,
19
+ params?: Record<string, string>,
20
+ ): Promise<void>;
21
+ syncFinanceKit(
22
+ token: string,
23
+ requestAuthorizationIfNeeded: boolean,
24
+ syncBehavior: FinanceKitSyncBehavior,
25
+ ): Promise<void>;
26
+ }
27
+
28
+ // This call loads the native module object from the JSI.
29
+ export default requireNativeModule<ReactNativePlaidLinkSdkModule>(
30
+ "ReactNativePlaidLinkSdk",
31
+ );
package/src/index.ts CHANGED
@@ -1,24 +1,168 @@
1
+ import { Platform } from "react-native";
2
+
1
3
  import {
2
- create,
3
- open,
4
- destroy,
5
- dismissLink,
6
- usePlaidEmitter,
7
- syncFinanceKit,
8
- submit,
9
- } from './PlaidLink';
10
-
11
- export * from './Types';
4
+ LinkExit,
5
+ LinkEvent,
6
+ LinkSuccess,
7
+ LinkTokenConfiguration,
8
+ PlaidLinkSession,
9
+ LayerTokenConfiguration,
10
+ PlaidLayerSession,
11
+ PlaidHeadlessSession,
12
+ SubmissionData,
13
+ FinanceKitSyncBehavior,
14
+ } from "./ReactNativePlaidLinkSdk.types";
15
+ import NativePlaidModule from "./ReactNativePlaidLinkSdkModule";
16
+
17
+ type Subscription = ReturnType<typeof NativePlaidModule.addListener>;
18
+
19
+ let successSub: Subscription | null = null;
20
+ let exitSub: Subscription | null = null;
21
+ let eventSub: Subscription | null = null;
22
+
23
+ function cleanupListeners() {
24
+ successSub?.remove();
25
+ exitSub?.remove();
26
+ eventSub?.remove();
27
+ successSub = null;
28
+ exitSub = null;
29
+ eventSub = null;
30
+ }
31
+
32
+ export async function createPlaidLinkSession(
33
+ config: LinkTokenConfiguration,
34
+ ): Promise<PlaidLinkSession> {
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) => {
48
+ config.onExit(exit);
49
+ cleanupListeners();
50
+ },
51
+ );
52
+
53
+ eventSub = NativePlaidModule.addListener(
54
+ "PlaidLink.onEvent",
55
+ (event: LinkEvent) => {
56
+ config.onEvent(event);
57
+ },
58
+ );
59
+
60
+ await NativePlaidModule.createPlaidLinkSession(config.token);
61
+
62
+ return {
63
+ open: (fullScreen = false) => NativePlaidModule.openLinkSession(fullScreen),
64
+ };
65
+ }
66
+
67
+ export async function createPlaidLayerSession(
68
+ config: LayerTokenConfiguration,
69
+ ): Promise<PlaidLayerSession> {
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) => {
83
+ config.onExit?.(exit);
84
+ cleanupListeners();
85
+ },
86
+ );
87
+
88
+ eventSub = NativePlaidModule.addListener(
89
+ "PlaidLink.onEvent",
90
+ (event: LinkEvent) => {
91
+ config.onEvent?.(event);
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
+ };
106
+ }
107
+
108
+ export async function createPlaidHeadlessSession(
109
+ config: LinkTokenConfiguration,
110
+ ): Promise<PlaidHeadlessSession> {
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) => {
124
+ config.onExit(exit);
125
+ cleanupListeners();
126
+ },
127
+ );
128
+
129
+ eventSub = NativePlaidModule.addListener(
130
+ "PlaidLink.onEvent",
131
+ (event: LinkEvent) => {
132
+ config.onEvent(event);
133
+ },
134
+ );
135
+
136
+ await NativePlaidModule.createPlaidHeadlessSession(config.token);
137
+
138
+ if (config.onLoad) {
139
+ config.onLoad();
140
+ }
141
+
142
+ return {
143
+ start: () => NativePlaidModule.startHeadlessSession(),
144
+ };
145
+ }
146
+
147
+ export async function syncFinanceKit(config: {
148
+ token: string;
149
+ requestAuthorizationIfNeeded?: boolean;
150
+ syncBehavior?: FinanceKitSyncBehavior;
151
+ }): Promise<void> {
152
+ if (Platform.OS === "android") {
153
+ throw new Error("FinanceKit is only available on iOS");
154
+ }
155
+
156
+ await NativePlaidModule.syncFinanceKit(
157
+ config.token,
158
+ config.requestAuthorizationIfNeeded ?? true,
159
+ config.syncBehavior ?? FinanceKitSyncBehavior.LIVE,
160
+ );
161
+ }
162
+
12
163
  export {
13
- create,
14
- open,
15
- destroy,
16
- dismissLink,
17
- usePlaidEmitter,
18
- syncFinanceKit,
19
- submit,
20
- };
21
-
22
- // Components
23
-
24
- export { EmbeddedLinkView } from './EmbeddedLink/EmbeddedLinkView';
164
+ PlaidEmbeddedSearchView,
165
+ type PlaidEmbeddedSearchViewProps,
166
+ } from "./PlaidEmbeddedSearchView";
167
+ export { default } from "./ReactNativePlaidLinkSdkModule";
168
+ export * from "./ReactNativePlaidLinkSdk.types";
@@ -1,6 +0,0 @@
1
- #Thu Nov 09 09:41:09 PST 2023
2
- distributionBase=GRADLE_USER_HOME
3
- distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip
4
- distributionPath=wrapper/dists
5
- zipStorePath=wrapper/dists
6
- zipStoreBase=GRADLE_USER_HOME
@@ -1,31 +0,0 @@
1
- #
2
- # Copyright (c) 2020 Plaid Technologies, Inc. <support@plaid.com>
3
- #
4
-
5
- # Project-wide Gradle settings.
6
- # IDE (e.g. Android Studio) users:
7
- # Gradle settings configured through the IDE *will override*
8
- # any settings specified in this file.
9
- # For more details on how to configure your build environment visit
10
- # http://www.gradle.org/docs/current/userguide/build_environment.html
11
- # Specifies the JVM arguments used for the daemon process.
12
- # The setting is particularly useful for tweaking memory settings.
13
- org.gradle.jvmargs=-Xmx1536m
14
- # When configured, Gradle will run in incubating parallel mode.
15
- # This option should only be used with decoupled projects. More details, visit
16
- # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17
- # org.gradle.parallel=true
18
- # AndroidX package structure to make it clearer which packages are bundled with the
19
- # Android operating system, and which are packaged with your app's APK
20
- # https://developer.android.com/topic/libraries/support-library/androidx-rn
21
- android.useAndroidX=true
22
- # Automatically convert third-party libraries to use AndroidX
23
- android.enableJetifier=true
24
- # Kotlin code style for this project: "official" or "obsolete":
25
- kotlin.code.style=official
26
-
27
- org.gradle.parallel=true
28
- org.gradle.configureondemand=true
29
-
30
- # Version of flipper SDK to use with React Native
31
- FLIPPER_VERSION=0.99.0
package/android/gradlew DELETED
@@ -1,174 +0,0 @@
1
- #!/usr/bin/env sh
2
-
3
- ##############################################################################
4
- ##
5
- ## Gradle start up script for UN*X
6
- ##
7
- ##############################################################################
8
-
9
- # Attempt to set APP_HOME
10
- # Resolve links: $0 may be a link
11
- PRG="$0"
12
- # Need this for relative symlinks.
13
- while [ -h "$PRG" ] ; do
14
- ls=`ls -ld "$PRG"`
15
- link=`expr "$ls" : '.*-> \(.*\)$'`
16
- if expr "$link" : '/.*' > /dev/null; then
17
- PRG="$link"
18
- else
19
- PRG=`dirname "$PRG"`"/$link"
20
- fi
21
- done
22
- SAVED="`pwd`"
23
- cd "`dirname \"$PRG\"`/" >/dev/null
24
- APP_HOME="`pwd -P`"
25
- cd "$SAVED" >/dev/null
26
-
27
- APP_NAME="Gradle"
28
- APP_BASE_NAME=`basename "$0"`
29
-
30
- # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31
- DEFAULT_JVM_OPTS=""
32
-
33
- # Use the maximum available, or set MAX_FD != -1 to use that value.
34
- MAX_FD="maximum"
35
-
36
- warn () {
37
- echo "$*"
38
- }
39
-
40
- die () {
41
- echo
42
- echo "$*"
43
- echo
44
- exit 1
45
- }
46
-
47
- # OS specific support (must be 'true' or 'false').
48
- cygwin=false
49
- msys=false
50
- darwin=false
51
- nonstop=false
52
- case "`uname`" in
53
- CYGWIN* )
54
- cygwin=true
55
- ;;
56
- Darwin* )
57
- darwin=true
58
- ;;
59
- MINGW* )
60
- msys=true
61
- ;;
62
- NONSTOP* )
63
- nonstop=true
64
- ;;
65
- esac
66
-
67
- CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68
-
69
-
70
- # Determine the Java command to use to start the JVM.
71
- if [ -n "$JAVA_HOME" ] ; then
72
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73
- # IBM's JDK on AIX uses strange locations for the executables
74
- JAVACMD="$JAVA_HOME/jre/sh/java"
75
- else
76
- JAVACMD="$JAVA_HOME/bin/java"
77
- fi
78
- if [ ! -x "$JAVACMD" ] ; then
79
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80
-
81
- Please set the JAVA_HOME variable in your environment to match the
82
- location of your Java installation."
83
- fi
84
- else
85
- JAVACMD="java"
86
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87
-
88
- Please set the JAVA_HOME variable in your environment to match the
89
- location of your Java installation."
90
- fi
91
-
92
- # Increase the maximum file descriptors if we can.
93
- if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
94
- MAX_FD_LIMIT=`ulimit -H -n`
95
- if [ $? -eq 0 ] ; then
96
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97
- MAX_FD="$MAX_FD_LIMIT"
98
- fi
99
- ulimit -n $MAX_FD
100
- if [ $? -ne 0 ] ; then
101
- warn "Could not set maximum file descriptor limit: $MAX_FD"
102
- fi
103
- else
104
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105
- fi
106
- fi
107
-
108
- # For Darwin, add options to specify how the application appears in the dock
109
- if $darwin; then
110
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111
- fi
112
-
113
- # For Cygwin, switch paths to Windows format before running java
114
- if $cygwin ; then
115
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117
-
118
- JAVACMD=`cygpath --unix "$JAVACMD"`
119
-
120
- # We build the pattern for arguments to be converted via cygpath
121
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
122
- SEP=""
123
- for dir in $ROOTDIRSRAW ; do
124
- ROOTDIRS="$ROOTDIRS$SEP$dir"
125
- SEP="|"
126
- done
127
- OURCYGPATTERN="(^($ROOTDIRS))"
128
- # Add a user-defined pattern to the cygpath arguments
129
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
130
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
131
- fi
132
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
133
- i=0
134
- for arg in "$@" ; do
135
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
136
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
137
-
138
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
139
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
140
- else
141
- eval `echo args$i`="\"$arg\""
142
- fi
143
- i=$((i+1))
144
- done
145
- case $i in
146
- (0) set -- ;;
147
- (1) set -- "$args0" ;;
148
- (2) set -- "$args0" "$args1" ;;
149
- (3) set -- "$args0" "$args1" "$args2" ;;
150
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
151
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
152
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
153
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
154
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
155
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
156
- esac
157
- fi
158
-
159
- # Escape application args
160
- save () {
161
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
162
- echo " "
163
- }
164
- APP_ARGS=$(save "$@")
165
-
166
- # Collect all arguments for the java command, following the shell quoting and substitution rules
167
- eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
168
-
169
- # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
170
- if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
171
- cd "$(dirname "$0")"
172
- fi
173
-
174
- exec "$JAVACMD" "$@"
@@ -1,89 +0,0 @@
1
- @rem
2
- @rem Copyright 2015 the original author or authors.
3
- @rem
4
- @rem Licensed under the Apache License, Version 2.0 (the "License");
5
- @rem you may not use this file except in compliance with the License.
6
- @rem You may obtain a copy of the License at
7
- @rem
8
- @rem https://www.apache.org/licenses/LICENSE-2.0
9
- @rem
10
- @rem Unless required by applicable law or agreed to in writing, software
11
- @rem distributed under the License is distributed on an "AS IS" BASIS,
12
- @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- @rem See the License for the specific language governing permissions and
14
- @rem limitations under the License.
15
- @rem
16
-
17
- @if "%DEBUG%" == "" @echo off
18
- @rem ##########################################################################
19
- @rem
20
- @rem Gradle startup script for Windows
21
- @rem
22
- @rem ##########################################################################
23
-
24
- @rem Set local scope for the variables with windows NT shell
25
- if "%OS%"=="Windows_NT" setlocal
26
-
27
- set DIRNAME=%~dp0
28
- if "%DIRNAME%" == "" set DIRNAME=.
29
- set APP_BASE_NAME=%~n0
30
- set APP_HOME=%DIRNAME%
31
-
32
- @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33
- for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34
-
35
- @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36
- set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37
-
38
- @rem Find java.exe
39
- if defined JAVA_HOME goto findJavaFromJavaHome
40
-
41
- set JAVA_EXE=java.exe
42
- %JAVA_EXE% -version >NUL 2>&1
43
- if "%ERRORLEVEL%" == "0" goto execute
44
-
45
- echo.
46
- echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47
- echo.
48
- echo Please set the JAVA_HOME variable in your environment to match the
49
- echo location of your Java installation.
50
-
51
- goto fail
52
-
53
- :findJavaFromJavaHome
54
- set JAVA_HOME=%JAVA_HOME:"=%
55
- set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56
-
57
- if exist "%JAVA_EXE%" goto execute
58
-
59
- echo.
60
- echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61
- echo.
62
- echo Please set the JAVA_HOME variable in your environment to match the
63
- echo location of your Java installation.
64
-
65
- goto fail
66
-
67
- :execute
68
- @rem Setup the command line
69
-
70
- set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71
-
72
-
73
- @rem Execute Gradle
74
- "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75
-
76
- :end
77
- @rem End local scope for the variables with windows NT shell
78
- if "%ERRORLEVEL%"=="0" goto mainEnd
79
-
80
- :fail
81
- rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82
- rem the _cmd.exe /c_ return code!
83
- if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84
- exit /b 1
85
-
86
- :mainEnd
87
- if "%OS%"=="Windows_NT" endlocal
88
-
89
- :omega
@@ -1,7 +0,0 @@
1
- package com.plaid;
2
-
3
- import android.content.Intent;
4
-
5
- public interface ActivityResultHandler {
6
- void handleActivityResult(int requestCode, int resultCode, Intent data);
7
- }
@@ -1,15 +0,0 @@
1
- package com.plaid;
2
-
3
- import android.content.Intent;
4
-
5
- import java.util.HashMap;
6
-
7
- public class ActivityResultManager extends HashMap<Integer, ActivityResultHandler> {
8
-
9
- public void dispatch(int requestCode, int resultCode, Intent data) {
10
- ActivityResultHandler handler = get(requestCode);
11
- if (handler != null) {
12
- handler.handleActivityResult(requestCode, resultCode, data);
13
- }
14
- }
15
- }
@@ -1,42 +0,0 @@
1
- package com.plaid
2
-
3
- import com.facebook.react.bridge.WritableArray
4
- import com.facebook.react.bridge.WritableMap
5
- import com.facebook.react.bridge.WritableNativeArray
6
- import com.facebook.react.bridge.WritableNativeMap
7
- import org.json.JSONArray
8
- import org.json.JSONObject
9
-
10
- fun convertJsonToMap(jsonObject: JSONObject): WritableMap {
11
- val map: WritableMap = WritableNativeMap()
12
- val iterator = jsonObject.keys()
13
- while (iterator.hasNext()) {
14
- val key = iterator.next()
15
- when (val value = jsonObject[key]) {
16
- is JSONObject -> map.putMap(key, convertJsonToMap(value))
17
- is JSONArray -> map.putArray(key, convertJsonToArray(value))
18
- is Boolean -> map.putBoolean(key, value)
19
- is Int -> map.putInt(key, value)
20
- is Double -> map.putDouble(key, value)
21
- is String -> map.putString(key, value)
22
- else -> map.putString(key, value.toString())
23
- }
24
- }
25
- return map
26
- }
27
-
28
- fun convertJsonToArray(jsonArray: JSONArray): WritableArray {
29
- val array: WritableArray = WritableNativeArray()
30
- for (i in 0 until jsonArray.length()) {
31
- when (val value = jsonArray[i]) {
32
- is JSONObject -> array.pushMap(convertJsonToMap(value))
33
- is JSONArray -> array.pushArray(convertJsonToArray(value))
34
- is Boolean -> array.pushBoolean(value)
35
- is Int -> array.pushInt(value)
36
- is Double -> array.pushDouble(value)
37
- is String -> array.pushString(value)
38
- else -> array.pushString(value.toString())
39
- }
40
- }
41
- return array
42
- }