@taxbit/react-sdk 0.2.1 → 0.2.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/dist/contexts/TaxDocumentation/TaxBitFormProvider.d.ts +2 -2
- package/dist/contexts/TaxDocumentation/useTaxDocumentation.d.ts +3 -4
- package/dist/contexts/TaxDocumentation/useTaxDocumentationContext.d.ts +2 -188
- package/dist/hooks/useTaxBit/useTaxBit.d.ts +5 -105
- package/dist/taxbit-react-sdk.es.js +1027 -1012
- package/dist/taxbit-react-sdk.umd.js +9 -9
- package/dist/types/Utilities.d.ts +2 -0
- package/dist/types/client/ClientTaxDocumentation.d.ts +79 -0
- package/dist/types/client/ClientTaxDocumentationStatus.d.ts +9 -0
- package/dist/types/client/index.d.ts +2 -4
- package/dist/types/server/ComprehensiveTaxDocumentation.d.ts +3 -0
- package/dist/utils/getHintKeyMap.d.ts +1 -1
- package/dist/utils/getPromptKeyMap.d.ts +1 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/snakeCaseKeys.d.ts +1 -0
- package/dist/utils/transformForClient/index.d.ts +1 -0
- package/dist/utils/transformForClient/transformForClient.d.ts +3 -0
- package/dist/utils/transformOutbound/transformOutbound.d.ts +2 -2
- package/dist/widgets/TaxBitForm/TaxBitForm.d.ts +3 -3
- package/dist/wizard/TaxBitFormUI/TaxBitDAC7FormUI.d.ts +1 -1
- package/dist/wizard/TaxBitFormUI/TaxBitFormUI.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { Locale,
|
|
2
|
+
import type { Locale, TaxForm } from '../../types';
|
|
3
3
|
import { ClientTaxDocumentation } from '../../types/client';
|
|
4
4
|
import { InputStep } from './useTaxDocumentation';
|
|
5
5
|
type TaxDocumentationProviderProps = {
|
|
6
6
|
data?: ClientTaxDocumentation;
|
|
7
|
-
onSubmit: (data:
|
|
7
|
+
onSubmit: (data: ClientTaxDocumentation) => void;
|
|
8
8
|
language?: Locale;
|
|
9
9
|
children: React.ReactNode;
|
|
10
10
|
taxForms?: TaxForm[];
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { TaxDocumentation, TaxForm } from 'types';
|
|
3
|
-
import {
|
|
4
|
-
import { ClientTaxDocumentation } from '../../types/client';
|
|
2
|
+
import type { Locale, TaxDocumentation, TaxForm } from 'types';
|
|
3
|
+
import { ClientTaxDocumentation } from 'types/client';
|
|
5
4
|
export type InputStep = 'AccountHolderClassification' | 'AccountHolderContact' | 'AccountHolderTax' | 'AccountHolderTaxClarification' | 'Exemptions' | 'RegardedOwnerClassification' | 'RegardedOwnerContact' | 'RegardedOwnerTax' | 'Summary';
|
|
6
5
|
type UseTaxDocumentationProps = {
|
|
7
6
|
data: ClientTaxDocumentation;
|
|
8
7
|
language?: Locale;
|
|
9
|
-
onSubmit: (
|
|
8
|
+
onSubmit: (data: ClientTaxDocumentation) => void;
|
|
10
9
|
step?: InputStep;
|
|
11
10
|
taxForms?: TaxForm[];
|
|
12
11
|
};
|
|
@@ -8,100 +8,7 @@ export declare const useTaxDocumentationContext: () => {
|
|
|
8
8
|
onPersistAccountHolderData: (newData: import("../../types").TaxDocumentation) => void;
|
|
9
9
|
onPersistCollectedData: (newData: import("../../types").TaxDocumentation) => void;
|
|
10
10
|
onSubmitTaxDocumentation: (submitFields: import("../../types").TaxDocumentation) => void;
|
|
11
|
-
onResetTaxDocumentation: (data:
|
|
12
|
-
accountHolder?: {
|
|
13
|
-
address?: {
|
|
14
|
-
city?: string | undefined;
|
|
15
|
-
country?: string | undefined;
|
|
16
|
-
stateOrProvince?: string | undefined;
|
|
17
|
-
firstLine?: string | undefined;
|
|
18
|
-
secondLine?: string | undefined;
|
|
19
|
-
postalCode?: string | undefined;
|
|
20
|
-
} | undefined;
|
|
21
|
-
countryOfCitizenship?: string | undefined;
|
|
22
|
-
dateOfBirth?: string | undefined;
|
|
23
|
-
dbaName?: string | undefined;
|
|
24
|
-
mailingAddress?: {
|
|
25
|
-
city?: string | undefined;
|
|
26
|
-
country?: string | undefined;
|
|
27
|
-
stateOrProvince?: string | undefined;
|
|
28
|
-
firstLine?: string | undefined;
|
|
29
|
-
secondLine?: string | undefined;
|
|
30
|
-
postalCode?: string | undefined;
|
|
31
|
-
} | undefined;
|
|
32
|
-
mailingAddressIsDifferent?: boolean | undefined;
|
|
33
|
-
name?: string | undefined;
|
|
34
|
-
cityOfBirth?: string | undefined;
|
|
35
|
-
countryOfBirth?: string | undefined;
|
|
36
|
-
financialAccountIdentifier?: string | undefined;
|
|
37
|
-
financialAccountName?: string | undefined;
|
|
38
|
-
ftin?: string | undefined;
|
|
39
|
-
ftinNotLegallyRequired?: boolean | undefined;
|
|
40
|
-
taxResidences?: {
|
|
41
|
-
country?: string | undefined;
|
|
42
|
-
tin?: string | undefined;
|
|
43
|
-
tinNotRequired?: boolean | undefined;
|
|
44
|
-
}[] | undefined;
|
|
45
|
-
tin?: string | undefined;
|
|
46
|
-
vatin?: string | undefined;
|
|
47
|
-
vatinCountry?: string | undefined;
|
|
48
|
-
vatinNotRequired?: boolean | undefined;
|
|
49
|
-
exemptFatcaCode?: string | undefined;
|
|
50
|
-
exemptPayeeCode?: string | undefined;
|
|
51
|
-
isIndividual?: boolean | undefined;
|
|
52
|
-
isEuResident?: boolean | undefined;
|
|
53
|
-
isUsPerson?: boolean | undefined;
|
|
54
|
-
usAccountType?: string | undefined;
|
|
55
|
-
usSmllcElection?: boolean | undefined;
|
|
56
|
-
usLlcClassification?: string | undefined;
|
|
57
|
-
usOtherClassification?: string | undefined;
|
|
58
|
-
usTrustEstateEin?: boolean | undefined;
|
|
59
|
-
foreignAccountType?: string | undefined;
|
|
60
|
-
foreignTrustClassification?: string | undefined;
|
|
61
|
-
foreignOtherClassification?: string | undefined;
|
|
62
|
-
} | undefined;
|
|
63
|
-
regardedOwner?: {
|
|
64
|
-
address?: {
|
|
65
|
-
city?: string | undefined;
|
|
66
|
-
country?: string | undefined;
|
|
67
|
-
stateOrProvince?: string | undefined;
|
|
68
|
-
firstLine?: string | undefined;
|
|
69
|
-
secondLine?: string | undefined;
|
|
70
|
-
postalCode?: string | undefined;
|
|
71
|
-
} | undefined;
|
|
72
|
-
countryOfCitizenship?: string | undefined;
|
|
73
|
-
dateOfBirth?: string | undefined;
|
|
74
|
-
dbaName?: string | undefined;
|
|
75
|
-
mailingAddress?: {
|
|
76
|
-
city?: string | undefined;
|
|
77
|
-
country?: string | undefined;
|
|
78
|
-
stateOrProvince?: string | undefined;
|
|
79
|
-
firstLine?: string | undefined;
|
|
80
|
-
secondLine?: string | undefined;
|
|
81
|
-
postalCode?: string | undefined;
|
|
82
|
-
} | undefined;
|
|
83
|
-
mailingAddressIsDifferent?: boolean | undefined;
|
|
84
|
-
name?: string | undefined;
|
|
85
|
-
ftin?: string | undefined;
|
|
86
|
-
ftinNotLegallyRequired?: boolean | undefined;
|
|
87
|
-
tin?: string | undefined;
|
|
88
|
-
exemptFatcaCode?: string | undefined;
|
|
89
|
-
exemptPayeeCode?: string | undefined;
|
|
90
|
-
isUsPerson?: boolean | undefined;
|
|
91
|
-
usAccountType?: string | undefined;
|
|
92
|
-
usLlcClassification?: string | undefined;
|
|
93
|
-
usOtherClassification?: string | undefined;
|
|
94
|
-
usTrustEstateEin?: boolean | undefined;
|
|
95
|
-
foreignAccountType?: string | undefined;
|
|
96
|
-
foreignTrustClassification?: string | undefined;
|
|
97
|
-
foreignOtherClassification?: string | undefined;
|
|
98
|
-
} | undefined;
|
|
99
|
-
hasCertified?: boolean | undefined;
|
|
100
|
-
isNotSubjectBackupWithholding?: boolean | undefined;
|
|
101
|
-
signature?: string | undefined;
|
|
102
|
-
documentType?: "COMPREHENSIVE" | undefined;
|
|
103
|
-
source?: string | undefined;
|
|
104
|
-
}) => void;
|
|
11
|
+
onResetTaxDocumentation: (data: import("../../entry").ClientTaxDocumentation) => void;
|
|
105
12
|
editTo: (form: import("./useTaxDocumentation").InputStep) => void;
|
|
106
13
|
onCancel: (() => void) | undefined;
|
|
107
14
|
goTo: (form: import("./useTaxDocumentation").InputStep) => void;
|
|
@@ -122,100 +29,7 @@ export declare const useTaxDocumentationContext: () => {
|
|
|
122
29
|
onPersistAccountHolderData: (newData: import("../../types").TaxDocumentation) => void;
|
|
123
30
|
onPersistCollectedData: (newData: import("../../types").TaxDocumentation) => void;
|
|
124
31
|
onSubmitTaxDocumentation: (submitFields: import("../../types").TaxDocumentation) => void;
|
|
125
|
-
onResetTaxDocumentation: (data:
|
|
126
|
-
accountHolder?: {
|
|
127
|
-
address?: {
|
|
128
|
-
city?: string | undefined;
|
|
129
|
-
country?: string | undefined;
|
|
130
|
-
stateOrProvince?: string | undefined;
|
|
131
|
-
firstLine?: string | undefined;
|
|
132
|
-
secondLine?: string | undefined;
|
|
133
|
-
postalCode?: string | undefined;
|
|
134
|
-
} | undefined;
|
|
135
|
-
countryOfCitizenship?: string | undefined;
|
|
136
|
-
dateOfBirth?: string | undefined;
|
|
137
|
-
dbaName?: string | undefined;
|
|
138
|
-
mailingAddress?: {
|
|
139
|
-
city?: string | undefined;
|
|
140
|
-
country?: string | undefined;
|
|
141
|
-
stateOrProvince?: string | undefined;
|
|
142
|
-
firstLine?: string | undefined;
|
|
143
|
-
secondLine?: string | undefined;
|
|
144
|
-
postalCode?: string | undefined;
|
|
145
|
-
} | undefined;
|
|
146
|
-
mailingAddressIsDifferent?: boolean | undefined;
|
|
147
|
-
name?: string | undefined;
|
|
148
|
-
cityOfBirth?: string | undefined;
|
|
149
|
-
countryOfBirth?: string | undefined;
|
|
150
|
-
financialAccountIdentifier?: string | undefined;
|
|
151
|
-
financialAccountName?: string | undefined;
|
|
152
|
-
ftin?: string | undefined;
|
|
153
|
-
ftinNotLegallyRequired?: boolean | undefined;
|
|
154
|
-
taxResidences?: {
|
|
155
|
-
country?: string | undefined;
|
|
156
|
-
tin?: string | undefined;
|
|
157
|
-
tinNotRequired?: boolean | undefined;
|
|
158
|
-
}[] | undefined;
|
|
159
|
-
tin?: string | undefined;
|
|
160
|
-
vatin?: string | undefined;
|
|
161
|
-
vatinCountry?: string | undefined;
|
|
162
|
-
vatinNotRequired?: boolean | undefined;
|
|
163
|
-
exemptFatcaCode?: string | undefined;
|
|
164
|
-
exemptPayeeCode?: string | undefined;
|
|
165
|
-
isIndividual?: boolean | undefined;
|
|
166
|
-
isEuResident?: boolean | undefined;
|
|
167
|
-
isUsPerson?: boolean | undefined;
|
|
168
|
-
usAccountType?: string | undefined;
|
|
169
|
-
usSmllcElection?: boolean | undefined;
|
|
170
|
-
usLlcClassification?: string | undefined;
|
|
171
|
-
usOtherClassification?: string | undefined;
|
|
172
|
-
usTrustEstateEin?: boolean | undefined;
|
|
173
|
-
foreignAccountType?: string | undefined;
|
|
174
|
-
foreignTrustClassification?: string | undefined;
|
|
175
|
-
foreignOtherClassification?: string | undefined;
|
|
176
|
-
} | undefined;
|
|
177
|
-
regardedOwner?: {
|
|
178
|
-
address?: {
|
|
179
|
-
city?: string | undefined;
|
|
180
|
-
country?: string | undefined;
|
|
181
|
-
stateOrProvince?: string | undefined;
|
|
182
|
-
firstLine?: string | undefined;
|
|
183
|
-
secondLine?: string | undefined;
|
|
184
|
-
postalCode?: string | undefined;
|
|
185
|
-
} | undefined;
|
|
186
|
-
countryOfCitizenship?: string | undefined;
|
|
187
|
-
dateOfBirth?: string | undefined;
|
|
188
|
-
dbaName?: string | undefined;
|
|
189
|
-
mailingAddress?: {
|
|
190
|
-
city?: string | undefined;
|
|
191
|
-
country?: string | undefined;
|
|
192
|
-
stateOrProvince?: string | undefined;
|
|
193
|
-
firstLine?: string | undefined;
|
|
194
|
-
secondLine?: string | undefined;
|
|
195
|
-
postalCode?: string | undefined;
|
|
196
|
-
} | undefined;
|
|
197
|
-
mailingAddressIsDifferent?: boolean | undefined;
|
|
198
|
-
name?: string | undefined;
|
|
199
|
-
ftin?: string | undefined;
|
|
200
|
-
ftinNotLegallyRequired?: boolean | undefined;
|
|
201
|
-
tin?: string | undefined;
|
|
202
|
-
exemptFatcaCode?: string | undefined;
|
|
203
|
-
exemptPayeeCode?: string | undefined;
|
|
204
|
-
isUsPerson?: boolean | undefined;
|
|
205
|
-
usAccountType?: string | undefined;
|
|
206
|
-
usLlcClassification?: string | undefined;
|
|
207
|
-
usOtherClassification?: string | undefined;
|
|
208
|
-
usTrustEstateEin?: boolean | undefined;
|
|
209
|
-
foreignAccountType?: string | undefined;
|
|
210
|
-
foreignTrustClassification?: string | undefined;
|
|
211
|
-
foreignOtherClassification?: string | undefined;
|
|
212
|
-
} | undefined;
|
|
213
|
-
hasCertified?: boolean | undefined;
|
|
214
|
-
isNotSubjectBackupWithholding?: boolean | undefined;
|
|
215
|
-
signature?: string | undefined;
|
|
216
|
-
documentType?: "COMPREHENSIVE" | undefined;
|
|
217
|
-
source?: string | undefined;
|
|
218
|
-
}) => void;
|
|
32
|
+
onResetTaxDocumentation: (data: import("../../entry").ClientTaxDocumentation) => void;
|
|
219
33
|
editTo: (form: import("./useTaxDocumentation").InputStep) => void;
|
|
220
34
|
onCancel: (() => void) | undefined;
|
|
221
35
|
goTo: (form: import("./useTaxDocumentation").InputStep) => void;
|
|
@@ -1,109 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ClientTaxDocumentation, ClientTaxDocumentationStatus } from 'types/client';
|
|
2
2
|
import { ComprehensiveStatusEnum } from 'types/server';
|
|
3
|
-
export declare const useTaxBit: (bearerToken: string, staging?: true
|
|
4
|
-
|
|
3
|
+
export declare const useTaxBit: (bearerToken: string, staging?: true) => {
|
|
4
|
+
postData: (data: ClientTaxDocumentation) => Promise<void>;
|
|
5
5
|
formStatus: ComprehensiveStatusEnum.NotSubmitted | import("types/server").ComprehensiveFormStatusEnum.Complete | import("types/server").ComprehensiveFormStatusEnum.Incomplete | undefined;
|
|
6
|
-
status:
|
|
7
|
-
status: ComprehensiveStatusEnum.Undocumented | ComprehensiveStatusEnum.Undetermined;
|
|
8
|
-
submissionStatus: ComprehensiveStatusEnum.Submitted | ComprehensiveStatusEnum.NotSubmitted;
|
|
9
|
-
DAC7Interview?: {
|
|
10
|
-
dataCollectionStatus: import("types/server").ComprehensiveFormStatusEnum.Complete | import("types/server").ComprehensiveFormStatusEnum.Incomplete;
|
|
11
|
-
expirationDate: string;
|
|
12
|
-
} | undefined;
|
|
13
|
-
} | undefined;
|
|
6
|
+
status: ClientTaxDocumentationStatus | undefined;
|
|
14
7
|
formSubmitted: boolean;
|
|
15
|
-
serverData:
|
|
16
|
-
accountHolder?: {
|
|
17
|
-
address?: {
|
|
18
|
-
city?: string | undefined;
|
|
19
|
-
country?: string | undefined;
|
|
20
|
-
stateOrProvince?: string | undefined;
|
|
21
|
-
firstLine?: string | undefined;
|
|
22
|
-
secondLine?: string | undefined;
|
|
23
|
-
postalCode?: string | undefined;
|
|
24
|
-
} | undefined;
|
|
25
|
-
countryOfCitizenship?: string | undefined;
|
|
26
|
-
dateOfBirth?: string | undefined;
|
|
27
|
-
dbaName?: string | undefined;
|
|
28
|
-
mailingAddress?: {
|
|
29
|
-
city?: string | undefined;
|
|
30
|
-
country?: string | undefined;
|
|
31
|
-
stateOrProvince?: string | undefined;
|
|
32
|
-
firstLine?: string | undefined;
|
|
33
|
-
secondLine?: string | undefined;
|
|
34
|
-
postalCode?: string | undefined;
|
|
35
|
-
} | undefined;
|
|
36
|
-
mailingAddressIsDifferent?: boolean | undefined;
|
|
37
|
-
name?: string | undefined;
|
|
38
|
-
cityOfBirth?: string | undefined;
|
|
39
|
-
countryOfBirth?: string | undefined;
|
|
40
|
-
financialAccountIdentifier?: string | undefined;
|
|
41
|
-
financialAccountName?: string | undefined;
|
|
42
|
-
ftin?: string | undefined;
|
|
43
|
-
ftinNotLegallyRequired?: boolean | undefined;
|
|
44
|
-
taxResidences?: {
|
|
45
|
-
country?: string | undefined;
|
|
46
|
-
tin?: string | undefined;
|
|
47
|
-
tinNotRequired?: boolean | undefined;
|
|
48
|
-
}[] | undefined;
|
|
49
|
-
tin?: string | undefined;
|
|
50
|
-
vatin?: string | undefined;
|
|
51
|
-
vatinCountry?: string | undefined;
|
|
52
|
-
vatinNotRequired?: boolean | undefined;
|
|
53
|
-
exemptFatcaCode?: string | undefined;
|
|
54
|
-
exemptPayeeCode?: string | undefined;
|
|
55
|
-
isIndividual?: boolean | undefined;
|
|
56
|
-
isEuResident?: boolean | undefined;
|
|
57
|
-
isUsPerson?: boolean | undefined;
|
|
58
|
-
usAccountType?: string | undefined;
|
|
59
|
-
usSmllcElection?: boolean | undefined;
|
|
60
|
-
usLlcClassification?: string | undefined;
|
|
61
|
-
usOtherClassification?: string | undefined;
|
|
62
|
-
usTrustEstateEin?: boolean | undefined;
|
|
63
|
-
foreignAccountType?: string | undefined;
|
|
64
|
-
foreignTrustClassification?: string | undefined;
|
|
65
|
-
foreignOtherClassification?: string | undefined;
|
|
66
|
-
} | undefined;
|
|
67
|
-
regardedOwner?: {
|
|
68
|
-
address?: {
|
|
69
|
-
city?: string | undefined;
|
|
70
|
-
country?: string | undefined;
|
|
71
|
-
stateOrProvince?: string | undefined;
|
|
72
|
-
firstLine?: string | undefined;
|
|
73
|
-
secondLine?: string | undefined;
|
|
74
|
-
postalCode?: string | undefined;
|
|
75
|
-
} | undefined;
|
|
76
|
-
countryOfCitizenship?: string | undefined;
|
|
77
|
-
dateOfBirth?: string | undefined;
|
|
78
|
-
dbaName?: string | undefined;
|
|
79
|
-
mailingAddress?: {
|
|
80
|
-
city?: string | undefined;
|
|
81
|
-
country?: string | undefined;
|
|
82
|
-
stateOrProvince?: string | undefined;
|
|
83
|
-
firstLine?: string | undefined;
|
|
84
|
-
secondLine?: string | undefined;
|
|
85
|
-
postalCode?: string | undefined;
|
|
86
|
-
} | undefined;
|
|
87
|
-
mailingAddressIsDifferent?: boolean | undefined;
|
|
88
|
-
name?: string | undefined;
|
|
89
|
-
ftin?: string | undefined;
|
|
90
|
-
ftinNotLegallyRequired?: boolean | undefined;
|
|
91
|
-
tin?: string | undefined;
|
|
92
|
-
exemptFatcaCode?: string | undefined;
|
|
93
|
-
exemptPayeeCode?: string | undefined;
|
|
94
|
-
isUsPerson?: boolean | undefined;
|
|
95
|
-
usAccountType?: string | undefined;
|
|
96
|
-
usLlcClassification?: string | undefined;
|
|
97
|
-
usOtherClassification?: string | undefined;
|
|
98
|
-
usTrustEstateEin?: boolean | undefined;
|
|
99
|
-
foreignAccountType?: string | undefined;
|
|
100
|
-
foreignTrustClassification?: string | undefined;
|
|
101
|
-
foreignOtherClassification?: string | undefined;
|
|
102
|
-
} | undefined;
|
|
103
|
-
hasCertified?: boolean | undefined;
|
|
104
|
-
isNotSubjectBackupWithholding?: boolean | undefined;
|
|
105
|
-
signature?: string | undefined;
|
|
106
|
-
documentType?: "COMPREHENSIVE" | undefined;
|
|
107
|
-
source?: string | undefined;
|
|
108
|
-
} | undefined;
|
|
8
|
+
serverData: ClientTaxDocumentation | undefined;
|
|
109
9
|
};
|