@taxbit/react-sdk 2.2.0-beta.0 → 2.2.0-beta.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.
package/README.md CHANGED
@@ -157,9 +157,22 @@ The serverData object contains the currently saved tax documentation data for th
157
157
  The `useTaxbit` hook will return a `status` object that can be used to determine the status of the user's tax documentation. The `status` object will have the following shape:
158
158
 
159
159
  ```typescript
160
+ type QuestionnaireIssue = {
161
+ issueType:
162
+ | 'CARE_OF_PERMANENT_ADDRESS'
163
+ | 'PO_BOX_PERMANENT_ADDRESS'
164
+ | 'US_PERMANENT_ADDRESS'
165
+ | 'TREATY_COUNTRY_MISMATCH'
166
+ | 'US_INDICIA'
167
+ | 'WITHHOLDING_DOCUMENTATION'
168
+ | 'CHANGE_IN_CIRCUMSTANCES';
169
+ createdAt: string;
170
+ };
171
+
160
172
  type ClientTaxDocumentationStatus = {
161
173
  dpsQuestionnaire?: {
162
174
  dataCollectionStatus: 'COMPLETE' | 'INCOMPLETE';
175
+ expirationDate?: string;
163
176
  vatStatus?:
164
177
  | 'PENDING'
165
178
  | 'VALID'
@@ -168,12 +181,13 @@ type ClientTaxDocumentationStatus = {
168
181
  | 'NOT_REQUIRED'
169
182
  | 'NON_EU';
170
183
  vatValidationDate?: string;
171
- expirationDate?: string;
172
184
  };
173
185
  wFormQuestionnaire?: {
174
186
  dataCollectionStatus: 'COMPLETE' | 'INCOMPLETE';
175
187
  type: 'W-9' | 'W-8BEN' | 'W-8BEN-E' | 'W-8IMY';
176
188
  expirationDate?: string;
189
+ issues?: QuestionnaireIssue[];
190
+ needsResubmission?: boolean;
177
191
  tinStatus?:
178
192
  | 'PENDING'
179
193
  | 'FOREIGN'
@@ -185,11 +199,12 @@ type ClientTaxDocumentationStatus = {
185
199
  | 'TIN_NOT_ISSUED'
186
200
  | 'ERROR';
187
201
  tinValidationDate?: string;
188
- needsResubmission: boolean;
202
+ treatyClaimStatus?: 'VALID' | 'INVALID';
189
203
  };
190
204
  selfCertification?: {
191
205
  dataCollectionStatus: 'COMPLETE' | 'INCOMPLETE';
192
- needsResubmission: boolean;
206
+ issues?: QuestionnaireIssue[];
207
+ needsResubmission?: boolean;
193
208
  };
194
209
  };
195
210
  ```
@@ -331,6 +346,10 @@ type QuestionnaireType = 'DPS' | 'W-FORM' | 'SELF-CERT';
331
346
 
332
347
  ## Changelog
333
348
 
349
+ ### Version 2.2.0-beta.1
350
+
351
+ 1. Updating TaxDocumentationStatus type to include issues and treatyClaimStatus.
352
+
334
353
  ### Version 2.2.0-beta.0
335
354
 
336
355
  1. Adding SERR support for Australian residents.
@@ -1,20 +1,28 @@
1
+ type QuestionnaireIssue = {
2
+ issueType: 'CARE_OF_PERMANENT_ADDRESS' | 'PO_BOX_PERMANENT_ADDRESS' | 'US_PERMANENT_ADDRESS' | 'TREATY_COUNTRY_MISMATCH' | 'US_INDICIA' | 'WITHHOLDING_DOCUMENTATION' | 'CHANGE_IN_CIRCUMSTANCES';
3
+ createdAt: string;
4
+ };
1
5
  export type ClientTaxDocumentationStatus = {
2
6
  dpsQuestionnaire?: {
3
7
  dataCollectionStatus: 'COMPLETE' | 'INCOMPLETE';
8
+ expirationDate?: string;
4
9
  vatStatus?: 'PENDING' | 'VALID' | 'INVALID' | 'INSUFFICIENT_DATA' | 'NOT_REQUIRED' | 'NON_EU';
5
10
  vatValidationDate?: string;
6
- expirationDate?: string;
7
11
  };
8
12
  wFormQuestionnaire?: {
9
13
  dataCollectionStatus: 'COMPLETE' | 'INCOMPLETE';
10
- type: 'W-9' | 'W-8BEN' | 'W-8BEN-E';
14
+ type: 'W-9' | 'W-8BEN' | 'W-8BEN-E' | 'W-8IMY';
11
15
  expirationDate?: string;
16
+ issues?: QuestionnaireIssue[];
17
+ needsResubmission?: boolean;
12
18
  tinStatus?: 'PENDING' | 'FOREIGN' | 'INVALID_DATA' | 'VALID_SSN_MATCH' | 'VALID_EIN_MATCH' | 'VALID_SSN_EIN_MATCH' | 'MISMATCH' | 'TIN_NOT_ISSUED' | 'ERROR';
13
19
  tinValidationDate?: string;
14
- needsResubmission: boolean;
20
+ treatyClaimStatus?: 'VALID' | 'INVALID';
15
21
  };
16
22
  selfCertification?: {
17
23
  dataCollectionStatus: 'COMPLETE' | 'INCOMPLETE';
18
- needsResubmission: boolean;
24
+ issues?: QuestionnaireIssue[];
25
+ needsResubmission?: boolean;
19
26
  };
20
27
  };
28
+ export {};
@@ -1,20 +1,28 @@
1
+ type Issue = {
2
+ issue_type: 'CARE_OF_PERMANENT_ADDRESS' | 'PO_BOX_PERMANENT_ADDRESS' | 'US_PERMANENT_ADDRESS' | 'TREATY_COUNTRY_MISMATCH' | 'US_INDICIA' | 'WITHHOLDING_DOCUMENTATION' | 'CHANGE_IN_CIRCUMSTANCES';
3
+ created_at: string;
4
+ };
1
5
  export type TaxDocumentationStatus = {
2
6
  dps_questionnaire?: {
3
7
  data_collection_status: 'COMPLETE' | 'INCOMPLETE';
8
+ expiration_date?: string;
4
9
  vat_status?: 'PENDING' | 'VALID' | 'INVALID' | 'INSUFFICIENT_DATA' | 'NOT_REQUIRED' | 'NON_EU';
5
10
  vat_validation_date?: string;
6
- expiration_date?: string;
7
11
  };
8
12
  w_form_questionnaire?: {
9
13
  data_collection_status: 'COMPLETE' | 'INCOMPLETE';
10
- type: 'W-9' | 'W-8BEN' | 'W-8BEN-E';
14
+ type: 'W-9' | 'W-8BEN' | 'W-8BEN-E' | 'W-8IMY';
11
15
  expiration_date?: string;
16
+ issues?: Issue[];
17
+ needs_resubmission?: boolean;
12
18
  tin_status?: 'PENDING' | 'FOREIGN' | 'INVALID_DATA' | 'VALID_SSN_MATCH' | 'VALID_EIN_MATCH' | 'VALID_SSN_EIN_MATCH' | 'MISMATCH' | 'TIN_NOT_ISSUED' | 'ERROR';
13
19
  tin_validation_date?: string;
14
- needs_resubmission: boolean;
20
+ treaty_claim_status?: 'VALID' | 'INVALID';
15
21
  };
16
22
  self_certification: {
17
23
  data_collection_status: 'COMPLETE' | 'INCOMPLETE';
18
- needs_resubmission: boolean;
24
+ issues?: Issue[];
25
+ needs_resubmission?: boolean;
19
26
  };
20
27
  };
28
+ export {};
@@ -5283,7 +5283,7 @@ const Ei = (e, i, t, o) => {
5283
5283
  regardedOwnerEntityPaymentsCertified: "entityPaymentsCertified",
5284
5284
  regardedOwnerProvidesWithholdingStatementCertified: "providesWithholdingStatementCertified"
5285
5285
  };
5286
- }, zl = "2.2.0-beta.0", Oi = (e) => e === "yes", S = (e) => e === void 0 ? void 0 : e === "yes", Sl = (e) => ({
5286
+ }, zl = "2.2.0-beta.1", Oi = (e) => e === "yes", S = (e) => e === void 0 ? void 0 : e === "yes", Sl = (e) => ({
5287
5287
  // 14
5288
5288
  isQiCertified: S(
5289
5289
  e.accountHolderIsQiCertified || e.regardedOwnerIsQiCertified