@parafin/react 1.0.7 → 2.0.0

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 (3) hide show
  1. package/index.tsx +30 -17
  2. package/out/index.d.ts +29 -17
  3. package/package.json +2 -2
package/index.tsx CHANGED
@@ -1,35 +1,48 @@
1
1
  import { useEffect, useRef, useState } from 'react'
2
2
  import { openParafinDashboard } from '@parafin/core'
3
3
 
4
+ type Address = {
5
+ addressLine1: string
6
+ addressLine2?: string
7
+ city: string
8
+ state: string
9
+ postalCode: string
10
+ country: 'US' | 'CA'
11
+ }
12
+
4
13
  type OptInFields = {
5
14
  businessExternalId: string
6
- legalBusinessName: string
7
- dbaName?: string
8
- ownerFirstName: string
9
- ownerLastName: string
10
15
  accountManagers?: {
11
16
  name: string
12
17
  email: string
13
18
  }[]
14
- routingNumber?: string
15
- accountNumberLastFour: string
16
- bankAccountCurrencyCode?: string
17
- email: string
18
- phoneNumber: string
19
- address: {
20
- addressLine1: string
21
- addressLine2?: string
22
- city: string
23
- state: string
24
- postalCode: string
25
- country: string
19
+ owner: {
20
+ firstName: string
21
+ lastName: string
22
+ email: string
23
+ phoneNumber?: string
24
+ /** yyyy-mm-dd */
25
+ dateOfBirth?: string
26
+ address?: Address
27
+ }
28
+ business: {
29
+ legalName: string
30
+ dbaName?: string
31
+ address?: Address
32
+ /** yyyy-mm-dd */
33
+ dateEstablished?: string
34
+ }
35
+ bank?: {
36
+ routingNumber?: string
37
+ accountNumberLastFour?: string
38
+ currencyCode?: 'USD' | 'CAD'
26
39
  }
27
40
  }
28
41
 
29
42
  const ParafinWidget = (
30
43
  props: {
31
44
  token: string
32
- product: 'capital' | 'banking'
45
+ product: 'capital' | 'wallet'
33
46
  externalBusinessId?: string
34
47
  onExit?: () => void
35
48
  onOptIn?: () => Promise<OptInFields>
package/out/index.d.ts CHANGED
@@ -1,30 +1,42 @@
1
+ type Address = {
2
+ addressLine1: string;
3
+ addressLine2?: string;
4
+ city: string;
5
+ state: string;
6
+ postalCode: string;
7
+ country: 'US' | 'CA';
8
+ };
1
9
  type OptInFields = {
2
10
  businessExternalId: string;
3
- legalBusinessName: string;
4
- dbaName?: string;
5
- ownerFirstName: string;
6
- ownerLastName: string;
7
11
  accountManagers?: {
8
12
  name: string;
9
13
  email: string;
10
14
  }[];
11
- routingNumber?: string;
12
- accountNumberLastFour: string;
13
- bankAccountCurrencyCode?: string;
14
- email: string;
15
- phoneNumber: string;
16
- address: {
17
- addressLine1: string;
18
- addressLine2?: string;
19
- city: string;
20
- state: string;
21
- postalCode: string;
22
- country: string;
15
+ owner: {
16
+ firstName: string;
17
+ lastName: string;
18
+ email: string;
19
+ phoneNumber?: string;
20
+ /** yyyy-mm-dd */
21
+ dateOfBirth?: string;
22
+ address?: Address;
23
+ };
24
+ business: {
25
+ legalName: string;
26
+ dbaName?: string;
27
+ address?: Address;
28
+ /** yyyy-mm-dd */
29
+ dateEstablished?: string;
30
+ };
31
+ bank?: {
32
+ routingNumber?: string;
33
+ accountNumberLastFour?: string;
34
+ currencyCode?: 'USD' | 'CAD';
23
35
  };
24
36
  };
25
37
  declare const ParafinWidget: (props: {
26
38
  token: string;
27
- product: 'capital' | 'banking';
39
+ product: 'capital' | 'wallet';
28
40
  externalBusinessId?: string;
29
41
  onExit?: () => void;
30
42
  onOptIn?: () => Promise<OptInFields>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parafin/react",
3
- "version": "1.0.7",
3
+ "version": "2.0.0",
4
4
  "description": "Parafin React widget",
5
5
  "author": "Parafin (https://www.parafin.com)",
6
6
  "module": "out/index.js",
@@ -14,7 +14,7 @@
14
14
  "typescript": "^4.9.5"
15
15
  },
16
16
  "dependencies": {
17
- "@parafin/core": "^1.0.9",
17
+ "@parafin/core": "^1.0.10",
18
18
  "react": "^16.8.0"
19
19
  }
20
20
  }