@parafin/react 1.0.8 → 3.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 +107 -25
  2. package/out/index.d.ts +103 -24
  3. package/package.json +1 -1
package/index.tsx CHANGED
@@ -1,31 +1,6 @@
1
1
  import { useEffect, useRef, useState } from 'react'
2
2
  import { openParafinDashboard } from '@parafin/core'
3
3
 
4
- type OptInFields = {
5
- businessExternalId: string
6
- legalBusinessName: string
7
- dbaName?: string
8
- ownerFirstName: string
9
- ownerLastName: string
10
- accountManagers?: {
11
- name: string
12
- email: string
13
- }[]
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
26
- }
27
- }
28
-
29
4
  const ParafinWidget = (
30
5
  props: {
31
6
  token: string
@@ -110,3 +85,110 @@ const ParafinWidget = (
110
85
  }
111
86
 
112
87
  export { OptInFields, ParafinWidget }
88
+
89
+ // American states and Canadian provinces
90
+ type State = {
91
+ AL: 'AL'
92
+ AK: 'AK'
93
+ AZ: 'AZ'
94
+ AR: 'AR'
95
+ CA: 'CA'
96
+ CO: 'CO'
97
+ CT: 'CT'
98
+ DE: 'DE'
99
+ DC: 'DC'
100
+ FL: 'FL'
101
+ GA: 'GA'
102
+ HI: 'HI'
103
+ ID: 'ID'
104
+ IL: 'IL'
105
+ IN: 'IN'
106
+ IA: 'IA'
107
+ KS: 'KS'
108
+ KY: 'KY'
109
+ LA: 'LA'
110
+ ME: 'ME'
111
+ MD: 'MD'
112
+ MA: 'MA'
113
+ MI: 'MI'
114
+ MN: 'MN'
115
+ MS: 'MS'
116
+ MO: 'MO'
117
+ MT: 'MT'
118
+ NE: 'NE'
119
+ NV: 'NV'
120
+ NH: 'NH'
121
+ NJ: 'NJ'
122
+ NM: 'NM'
123
+ NY: 'NY'
124
+ NC: 'NC'
125
+ ND: 'ND'
126
+ OH: 'OH'
127
+ OK: 'OK'
128
+ OR: 'OR'
129
+ PA: 'PA'
130
+ PR: 'PR'
131
+ RI: 'RI'
132
+ SC: 'SC'
133
+ SD: 'SD'
134
+ TN: 'TN'
135
+ TX: 'TX'
136
+ UT: 'UT'
137
+ VT: 'VT'
138
+ VA: 'VA'
139
+ WA: 'WA'
140
+ WV: 'WV'
141
+ WI: 'WI'
142
+ WY: 'WY'
143
+ AB: 'AB'
144
+ BC: 'BC'
145
+ MB: 'MB'
146
+ NB: 'NB'
147
+ NL: 'NL'
148
+ NT: 'NT'
149
+ NS: 'NS'
150
+ NU: 'NU'
151
+ QC: 'QC'
152
+ ON: 'ON'
153
+ PE: 'PE'
154
+ SK: 'SK'
155
+ YT: 'YT'
156
+ }
157
+
158
+ type Address = {
159
+ addressLine1: string
160
+ addressLine2?: string
161
+ city: string
162
+ state: State
163
+ postalCode: string
164
+ country: 'US' | 'CA'
165
+ }
166
+
167
+ type OptInFields = {
168
+ businessExternalId: string
169
+ accountManagers?: {
170
+ name: string
171
+ email: string
172
+ }[]
173
+ owner: {
174
+ firstName: string
175
+ lastName: string
176
+ email: string
177
+ phoneNumber?: string
178
+ /** yyyy-mm-dd */
179
+ dateOfBirth?: string
180
+ address?: Address
181
+ }
182
+ business: {
183
+ legalName: string
184
+ dbaName?: string
185
+ address?: Address
186
+ /** yyyy-mm-dd */
187
+ dateEstablished?: string
188
+ }
189
+ bank?: {
190
+ routingNumber?: string
191
+ accountNumberLastFour?: string
192
+ currencyCode?: 'USD' | 'CAD'
193
+ }
194
+ }
package/out/index.d.ts CHANGED
@@ -1,27 +1,3 @@
1
- type OptInFields = {
2
- businessExternalId: string;
3
- legalBusinessName: string;
4
- dbaName?: string;
5
- ownerFirstName: string;
6
- ownerLastName: string;
7
- accountManagers?: {
8
- name: string;
9
- email: string;
10
- }[];
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;
23
- };
24
- };
25
1
  declare const ParafinWidget: (props: {
26
2
  token: string;
27
3
  product: 'capital' | 'wallet';
@@ -30,3 +6,106 @@ declare const ParafinWidget: (props: {
30
6
  onOptIn?: () => Promise<OptInFields>;
31
7
  } & Record<string, any>) => JSX.Element;
32
8
  export { OptInFields, ParafinWidget };
9
+ type State = {
10
+ AL: 'AL';
11
+ AK: 'AK';
12
+ AZ: 'AZ';
13
+ AR: 'AR';
14
+ CA: 'CA';
15
+ CO: 'CO';
16
+ CT: 'CT';
17
+ DE: 'DE';
18
+ DC: 'DC';
19
+ FL: 'FL';
20
+ GA: 'GA';
21
+ HI: 'HI';
22
+ ID: 'ID';
23
+ IL: 'IL';
24
+ IN: 'IN';
25
+ IA: 'IA';
26
+ KS: 'KS';
27
+ KY: 'KY';
28
+ LA: 'LA';
29
+ ME: 'ME';
30
+ MD: 'MD';
31
+ MA: 'MA';
32
+ MI: 'MI';
33
+ MN: 'MN';
34
+ MS: 'MS';
35
+ MO: 'MO';
36
+ MT: 'MT';
37
+ NE: 'NE';
38
+ NV: 'NV';
39
+ NH: 'NH';
40
+ NJ: 'NJ';
41
+ NM: 'NM';
42
+ NY: 'NY';
43
+ NC: 'NC';
44
+ ND: 'ND';
45
+ OH: 'OH';
46
+ OK: 'OK';
47
+ OR: 'OR';
48
+ PA: 'PA';
49
+ PR: 'PR';
50
+ RI: 'RI';
51
+ SC: 'SC';
52
+ SD: 'SD';
53
+ TN: 'TN';
54
+ TX: 'TX';
55
+ UT: 'UT';
56
+ VT: 'VT';
57
+ VA: 'VA';
58
+ WA: 'WA';
59
+ WV: 'WV';
60
+ WI: 'WI';
61
+ WY: 'WY';
62
+ AB: 'AB';
63
+ BC: 'BC';
64
+ MB: 'MB';
65
+ NB: 'NB';
66
+ NL: 'NL';
67
+ NT: 'NT';
68
+ NS: 'NS';
69
+ NU: 'NU';
70
+ QC: 'QC';
71
+ ON: 'ON';
72
+ PE: 'PE';
73
+ SK: 'SK';
74
+ YT: 'YT';
75
+ };
76
+ type Address = {
77
+ addressLine1: string;
78
+ addressLine2?: string;
79
+ city: string;
80
+ state: State;
81
+ postalCode: string;
82
+ country: 'US' | 'CA';
83
+ };
84
+ type OptInFields = {
85
+ businessExternalId: string;
86
+ accountManagers?: {
87
+ name: string;
88
+ email: string;
89
+ }[];
90
+ owner: {
91
+ firstName: string;
92
+ lastName: string;
93
+ email: string;
94
+ phoneNumber?: string;
95
+ /** yyyy-mm-dd */
96
+ dateOfBirth?: string;
97
+ address?: Address;
98
+ };
99
+ business: {
100
+ legalName: string;
101
+ dbaName?: string;
102
+ address?: Address;
103
+ /** yyyy-mm-dd */
104
+ dateEstablished?: string;
105
+ };
106
+ bank?: {
107
+ routingNumber?: string;
108
+ accountNumberLastFour?: string;
109
+ currencyCode?: 'USD' | 'CAD';
110
+ };
111
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parafin/react",
3
- "version": "1.0.8",
3
+ "version": "3.0.0",
4
4
  "description": "Parafin React widget",
5
5
  "author": "Parafin (https://www.parafin.com)",
6
6
  "module": "out/index.js",