react-native-plaid-link-sdk 12.8.2 → 12.8.4

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 (49) hide show
  1. package/README.md +2 -0
  2. package/android/src/main/AndroidManifest.xml +1 -1
  3. package/android/src/main/java/com/plaid/PlaidModule.kt +60 -8
  4. package/dist/EmbeddedLink/EmbeddedLinkView.d.ts +13 -0
  5. package/dist/{build/EmbeddedLink → EmbeddedLink}/EmbeddedLinkView.js +0 -1
  6. package/dist/EmbeddedLink/EmbeddedLinkView.web.d.ts +1 -0
  7. package/dist/EmbeddedLink/EmbeddedLinkView.web.js +1 -0
  8. package/dist/{build/EmbeddedLink → EmbeddedLink}/NativeEmbeddedLinkView.js +0 -1
  9. package/dist/PlaidLink.d.ts +27 -0
  10. package/dist/{build/PlaidLink.js → PlaidLink.js} +8 -21
  11. package/dist/Types.d.ts +539 -0
  12. package/dist/{build/Types.js → Types.js} +0 -8
  13. package/dist/fabric/EmbeddedLinkViewNativeComponent.d.ts +15 -0
  14. package/dist/{build/fabric → fabric}/EmbeddedLinkViewNativeComponent.js +0 -1
  15. package/dist/fabric/NativePlaidLinkModuleAndroid.d.ts +14 -0
  16. package/dist/{build/fabric → fabric}/NativePlaidLinkModuleAndroid.js +0 -1
  17. package/dist/fabric/NativePlaidLinkModuleiOS.d.ts +15 -0
  18. package/dist/{build/fabric → fabric}/NativePlaidLinkModuleiOS.js +0 -1
  19. package/dist/fabric/fabricUtils.d.ts +1 -0
  20. package/dist/index.d.ts +4 -0
  21. package/dist/index.js +6 -0
  22. package/dist/scripts/check-package-entrypoints.d.ts +1 -0
  23. package/dist/scripts/check-package-entrypoints.js +61 -0
  24. package/ios/RNLinksdk.mm +1 -1
  25. package/package.json +10 -5
  26. package/react-native-plaid-link-sdk.podspec +1 -1
  27. package/dist/build/EmbeddedLink/EmbeddedLinkView.d.ts +0 -2
  28. package/dist/build/EmbeddedLink/EmbeddedLinkView.web.d.ts +0 -1
  29. package/dist/build/EmbeddedLink/EmbeddedLinkView.web.js +0 -2
  30. package/dist/build/PlaidEmbeddedSearchView.d.ts +0 -2
  31. package/dist/build/PlaidEmbeddedSearchView.js +0 -25
  32. package/dist/build/PlaidLink.d.ts +0 -7
  33. package/dist/build/ReactNativePlaidLinkSdk.types.d.ts +0 -108
  34. package/dist/build/ReactNativePlaidLinkSdk.types.js +0 -469
  35. package/dist/build/ReactNativePlaidLinkSdkModule.d.ts +0 -2
  36. package/dist/build/ReactNativePlaidLinkSdkModule.js +0 -4
  37. package/dist/build/ReactNativePlaidLinkSdkView.d.ts +0 -2
  38. package/dist/build/ReactNativePlaidLinkSdkView.js +0 -7
  39. package/dist/build/Types.d.ts +0 -108
  40. package/dist/build/fabric/EmbeddedLinkViewNativeComponent.d.ts +0 -2
  41. package/dist/build/fabric/NativePlaidLinkModuleAndroid.d.ts +0 -2
  42. package/dist/build/fabric/NativePlaidLinkModuleiOS.d.ts +0 -2
  43. package/dist/build/fabric/fabricUtils.js +0 -2
  44. package/dist/build/index.d.ts +0 -14
  45. package/dist/build/index.js +0 -154
  46. package/dist/{build/EmbeddedLink → EmbeddedLink}/NativeEmbeddedLinkView.d.ts +1 -1
  47. /package/dist/{src/__tests__ → __tests__}/Types.tests.d.ts +0 -0
  48. /package/dist/{src/__tests__ → __tests__}/Types.tests.js +0 -0
  49. /package/dist/{build/fabric/fabricUtils.d.ts → fabric/fabricUtils.js} +0 -0
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ const { execFileSync } = require('child_process');
3
+ const fs = require('fs');
4
+ const os = require('os');
5
+ const path = require('path');
6
+ const root = path.resolve(__dirname, '..');
7
+ const packageJsonPath = path.join(root, 'package.json');
8
+ const packageJson = require(packageJsonPath);
9
+ function fail(message) {
10
+ console.error(`Package entrypoint check failed: ${message}`);
11
+ process.exit(1);
12
+ }
13
+ function assertPackageFieldExists(fieldName) {
14
+ const fieldValue = packageJson[fieldName];
15
+ if (typeof fieldValue !== 'string' || fieldValue.length === 0) {
16
+ fail(`package.json field "${fieldName}" must be a non-empty string.`);
17
+ }
18
+ const absolutePath = path.join(root, fieldValue);
19
+ if (!fs.existsSync(absolutePath)) {
20
+ fail(`package.json field "${fieldName}" points to a missing file: ${fieldValue}`);
21
+ }
22
+ return fieldValue;
23
+ }
24
+ const main = assertPackageFieldExists('main');
25
+ const types = assertPackageFieldExists('types');
26
+ try {
27
+ const resolved = require.resolve(root);
28
+ const expected = path.join(root, main);
29
+ if (resolved !== expected) {
30
+ fail(`require.resolve('.') resolved to ${path.relative(root, resolved)}, expected ${main}`);
31
+ }
32
+ }
33
+ catch (error) {
34
+ fail(`require.resolve('.') failed: ${error.message}`);
35
+ }
36
+ let packOutput;
37
+ try {
38
+ packOutput = execFileSync('npm', ['pack', '--dry-run', '--json'], {
39
+ cwd: root,
40
+ encoding: 'utf8',
41
+ env: Object.assign(Object.assign({}, process.env), { npm_config_cache: path.join(os.tmpdir(), 'react-native-plaid-link-sdk-npm-cache') }),
42
+ });
43
+ }
44
+ catch (error) {
45
+ fail(`npm pack --dry-run --json failed:\n${error.stderr || error.message}`);
46
+ }
47
+ let packResult;
48
+ try {
49
+ packResult = JSON.parse(packOutput);
50
+ }
51
+ catch (error) {
52
+ fail(`npm pack did not return valid JSON: ${error.message}`);
53
+ }
54
+ const packedFiles = (packResult[0] && packResult[0].files) || [];
55
+ const files = new Set(packedFiles.map(file => file.path));
56
+ for (const entrypoint of [main, types]) {
57
+ if (!files.has(entrypoint)) {
58
+ fail(`packed package does not include ${entrypoint}`);
59
+ }
60
+ }
61
+ console.log(`Package entrypoints are valid: ${main}, ${types}`);
package/ios/RNLinksdk.mm CHANGED
@@ -28,7 +28,7 @@ static NSString* const kRNLinkKitVersionConstant = @"version";
28
28
  RCT_EXPORT_MODULE();
29
29
 
30
30
  + (NSString*)sdkVersion {
31
- return @"12.8.2"; // SDK_VERSION
31
+ return @"12.8.4"; // SDK_VERSION
32
32
  }
33
33
 
34
34
  + (NSString*)objCBridgeVersion {
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "react-native-plaid-link-sdk",
3
- "version": "12.8.2",
3
+ "version": "12.8.4",
4
4
  "description": "React Native Plaid Link SDK",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
5
+ "main": "dist/src/index.js",
6
+ "types": "dist/src/index.d.ts",
7
7
  "react-native": "src/index.ts",
8
8
  "files": [
9
9
  "dist/**/*",
@@ -13,7 +13,9 @@
13
13
  "src/**/*"
14
14
  ],
15
15
  "scripts": {
16
- "lint": "eslint \"./**/*.{js,jsx}\" --fix",
16
+ "build": "tsc",
17
+ "check:package": "node scripts/check-package-entrypoints.js",
18
+ "lint": "eslint \"*.js\" \"scripts/**/*.js\" --fix",
17
19
  "prettier": "prettier \"./**/*.{js,jsx}\" --write",
18
20
  "test": "jest"
19
21
  },
@@ -36,7 +38,10 @@
36
38
  "jest": {
37
39
  "testPathIgnorePatterns": [
38
40
  "/node_modules/",
39
- "/example/"
41
+ "/dist/",
42
+ "/example/",
43
+ "/FabricExample/",
44
+ "/exampleReactNative76/"
40
45
  ]
41
46
  },
42
47
  "author": "Plaid",
@@ -36,5 +36,5 @@ Pod::Spec.new do |s|
36
36
  end
37
37
 
38
38
  s.dependency 'React-Core'
39
- s.dependency 'Plaid', '~> 6.4.3'
39
+ s.dependency 'Plaid', '~> 6.4.7'
40
40
  end
@@ -1,2 +0,0 @@
1
- export function EmbeddedLinkView(props: any): React.JSX.Element;
2
- import React from 'react';
@@ -1 +0,0 @@
1
- export function EmbeddedLinkView(): null;
@@ -1,2 +0,0 @@
1
- export const EmbeddedLinkView = () => null;
2
- //# sourceMappingURL=EmbeddedLinkView.web.js.map
@@ -1,2 +0,0 @@
1
- export function PlaidEmbeddedSearchView(props: any): React.JSX.Element | null;
2
- import * as React from "react";
@@ -1,25 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import { requireNativeViewManager } from "expo-modules-core";
13
- import * as React from "react";
14
- import { Platform } from "react-native";
15
- const NativeView = Platform.OS === "ios"
16
- ? requireNativeViewManager("ReactNativePlaidLinkSdk")
17
- : () => null;
18
- export function PlaidEmbeddedSearchView(props) {
19
- if (Platform.OS !== "ios") {
20
- return null;
21
- }
22
- const { onSuccess, onExit, onEvent, onLoad } = props, restProps = __rest(props, ["onSuccess", "onExit", "onEvent", "onLoad"]);
23
- return (<NativeView {...restProps} onSuccess={(event) => onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(event.nativeEvent)} onExit={(event) => onExit === null || onExit === void 0 ? void 0 : onExit(event.nativeEvent)} onEvent={(event) => onEvent === null || onEvent === void 0 ? void 0 : onEvent(event.nativeEvent)} onLoad={(event) => onLoad === null || onLoad === void 0 ? void 0 : onLoad()}/>);
24
- }
25
- //# sourceMappingURL=PlaidEmbeddedSearchView.js.map
@@ -1,7 +0,0 @@
1
- export function usePlaidEmitter(linkEventListener: any): void;
2
- export function create(props: any): void;
3
- export function open(props: any): void;
4
- export function destroy(): Promise<void>;
5
- export function dismissLink(): void;
6
- export function submit(data: any): void;
7
- export function syncFinanceKit(token: string, requestAuthorizationIfNeeded: boolean, simulatedBehavior: any, completion: Function): void;
@@ -1,108 +0,0 @@
1
- export const PlaidEnvironment: any;
2
- export const PlaidProduct: any;
3
- export const LinkAccountType: any;
4
- export const LinkAccountSubtypes: any;
5
- export class LinkAccountSubtypeCredit {
6
- static ALL: LinkAccountSubtypeCredit;
7
- static CREDIT_CARD: LinkAccountSubtypeCredit;
8
- static PAYPAL: LinkAccountSubtypeCredit;
9
- constructor(type: any, subtype: any);
10
- type: any;
11
- subtype: any;
12
- }
13
- export class LinkAccountSubtypeDepository {
14
- static ALL: LinkAccountSubtypeDepository;
15
- static CASH_MANAGEMENT: LinkAccountSubtypeDepository;
16
- static CD: LinkAccountSubtypeDepository;
17
- static CHECKING: LinkAccountSubtypeDepository;
18
- static EBT: LinkAccountSubtypeDepository;
19
- static HSA: LinkAccountSubtypeDepository;
20
- static MONEY_MARKET: LinkAccountSubtypeDepository;
21
- static PAYPAL: LinkAccountSubtypeDepository;
22
- static PREPAID: LinkAccountSubtypeDepository;
23
- static SAVINGS: LinkAccountSubtypeDepository;
24
- constructor(type: any, subtype: any);
25
- type: any;
26
- subtype: any;
27
- }
28
- export class LinkAccountSubtypeInvestment {
29
- static ALL: LinkAccountSubtypeInvestment;
30
- static BROKERAGE: LinkAccountSubtypeInvestment;
31
- static CASH_ISA: LinkAccountSubtypeInvestment;
32
- static EDUCATION_SAVINGS_ACCOUNT: LinkAccountSubtypeInvestment;
33
- static FIXED_ANNUNITY: LinkAccountSubtypeInvestment;
34
- static GIC: LinkAccountSubtypeInvestment;
35
- static HEALTH_REIMBURSEMENT_ARRANGEMENT: LinkAccountSubtypeInvestment;
36
- static HSA: LinkAccountSubtypeInvestment;
37
- static INVESTMENT_401A: LinkAccountSubtypeInvestment;
38
- static INVESTMENT_401K: LinkAccountSubtypeInvestment;
39
- static INVESTMENT_403B: LinkAccountSubtypeInvestment;
40
- static INVESTMENT_457B: LinkAccountSubtypeInvestment;
41
- static INVESTMENT_529: LinkAccountSubtypeInvestment;
42
- static IRA: LinkAccountSubtypeInvestment;
43
- static ISA: LinkAccountSubtypeInvestment;
44
- static KEOGH: LinkAccountSubtypeInvestment;
45
- static LIF: LinkAccountSubtypeInvestment;
46
- static LIRA: LinkAccountSubtypeInvestment;
47
- static LRIF: LinkAccountSubtypeInvestment;
48
- static LRSP: LinkAccountSubtypeInvestment;
49
- static MUTUAL_FUND: LinkAccountSubtypeInvestment;
50
- static NON_TAXABLE_BROKERAGE_ACCOUNT: LinkAccountSubtypeInvestment;
51
- static PENSION: LinkAccountSubtypeInvestment;
52
- static PLAN: LinkAccountSubtypeInvestment;
53
- static PRIF: LinkAccountSubtypeInvestment;
54
- static PROFIT_SHARING_PLAN: LinkAccountSubtypeInvestment;
55
- static RDSP: LinkAccountSubtypeInvestment;
56
- static RESP: LinkAccountSubtypeInvestment;
57
- static RETIREMENT: LinkAccountSubtypeInvestment;
58
- static RLIF: LinkAccountSubtypeInvestment;
59
- static ROTH: LinkAccountSubtypeInvestment;
60
- static ROTH_401K: LinkAccountSubtypeInvestment;
61
- static RRIF: LinkAccountSubtypeInvestment;
62
- static RRSP: LinkAccountSubtypeInvestment;
63
- static SARSEP: LinkAccountSubtypeInvestment;
64
- static SEP_IRA: LinkAccountSubtypeInvestment;
65
- static SIMPLE_IRA: LinkAccountSubtypeInvestment;
66
- static SIIP: LinkAccountSubtypeInvestment;
67
- static STOCK_PLAN: LinkAccountSubtypeInvestment;
68
- static TFSA: LinkAccountSubtypeInvestment;
69
- static THRIFT_SAVINGS_PLAN: LinkAccountSubtypeInvestment;
70
- static TRUST: LinkAccountSubtypeInvestment;
71
- static UGMA: LinkAccountSubtypeInvestment;
72
- static UTMA: LinkAccountSubtypeInvestment;
73
- static VARIABLE_ANNUITY: LinkAccountSubtypeInvestment;
74
- constructor(type: any, subtype: any);
75
- type: any;
76
- subtype: any;
77
- }
78
- export class LinkAccountSubtypeLoan {
79
- static ALL: LinkAccountSubtypeLoan;
80
- static AUTO: LinkAccountSubtypeLoan;
81
- static BUSINESS: LinkAccountSubtypeLoan;
82
- static COMMERCIAL: LinkAccountSubtypeLoan;
83
- static CONSTRUCTION: LinkAccountSubtypeLoan;
84
- static CONSUMER: LinkAccountSubtypeLoan;
85
- static HOME_EQUITY: LinkAccountSubtypeLoan;
86
- static LINE_OF_CREDIT: LinkAccountSubtypeLoan;
87
- static LOAN: LinkAccountSubtypeLoan;
88
- static MORTGAGE: LinkAccountSubtypeLoan;
89
- static OVERDRAFT: LinkAccountSubtypeLoan;
90
- static STUDENT: LinkAccountSubtypeLoan;
91
- constructor(type: any, subtype: any);
92
- type: any;
93
- subtype: any;
94
- }
95
- export class LinkAccountSubtypeUnknown {
96
- constructor(type: any, subtype: any);
97
- type: any;
98
- subtype: any;
99
- }
100
- export const LinkAccountVerificationStatus: any;
101
- export const LinkExitMetadataStatus: any;
102
- export const LinkErrorCode: any;
103
- export const LinkErrorType: any;
104
- export const LinkEventName: any;
105
- export const LinkEventViewName: any;
106
- export const LinkIOSPresentationStyle: any;
107
- export const FinanceKitSyncBehavior: any;
108
- export const FinanceKitErrorType: any;