@taxbit/react-sdk 0.1.0 → 0.2.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 (129) hide show
  1. package/README.md +79 -243
  2. package/dist/App.d.ts +1 -1
  3. package/dist/basic.css +1 -1
  4. package/dist/components/ErrorMessage/ErrorMessage.d.ts +2 -2
  5. package/dist/components/Form/Form.d.ts +8 -0
  6. package/dist/components/Form/index.d.ts +1 -0
  7. package/dist/components/Notification/Notification.d.ts +2 -2
  8. package/dist/components/Row/Row.d.ts +2 -2
  9. package/dist/components/index.d.ts +7 -7
  10. package/dist/contexts/FormUI/index.d.ts +3 -3
  11. package/dist/contexts/FormUI/useFormUI.d.ts +17 -117
  12. package/dist/contexts/FormUI/useFormUIContext.d.ts +30 -626
  13. package/dist/contexts/TaxDocumentation/TaxBitFormProvider.d.ts +6 -4
  14. package/dist/contexts/TaxDocumentation/useTaxDocumentation.d.ts +11 -10
  15. package/dist/contexts/TaxDocumentation/useTaxDocumentationContext.d.ts +194 -110
  16. package/dist/entry/index.d.ts +5 -5
  17. package/dist/hooks/useTaxBit/useTaxBit.d.ts +108 -4
  18. package/dist/i18n/locales/bg-bg.d.ts +1 -1
  19. package/dist/i18n/locales/cs-cz.d.ts +1 -1
  20. package/dist/i18n/locales/da-dk.d.ts +2 -0
  21. package/dist/i18n/locales/de-at.d.ts +2 -0
  22. package/dist/i18n/locales/de-de.d.ts +1 -1
  23. package/dist/i18n/locales/el-cy.d.ts +2 -0
  24. package/dist/i18n/locales/el-gr.d.ts +1 -1
  25. package/dist/i18n/locales/en-gb.d.ts +1 -1
  26. package/dist/i18n/locales/en-us.d.ts +1 -1
  27. package/dist/i18n/locales/es-es.d.ts +1 -1
  28. package/dist/i18n/locales/et-ee.d.ts +1 -1
  29. package/dist/i18n/locales/fi-fi.d.ts +2 -0
  30. package/dist/i18n/locales/fr-fr.d.ts +1 -1
  31. package/dist/i18n/locales/fr-lu.d.ts +2 -0
  32. package/dist/i18n/locales/ga-ie.d.ts +2 -0
  33. package/dist/i18n/locales/hr-hr.d.ts +2 -0
  34. package/dist/i18n/locales/hu-hu.d.ts +1 -1
  35. package/dist/i18n/locales/index.d.ts +18 -7
  36. package/dist/i18n/locales/it-it.d.ts +1 -1
  37. package/dist/i18n/locales/lt-lt.d.ts +2 -0
  38. package/dist/i18n/locales/lv-lv.d.ts +2 -0
  39. package/dist/i18n/locales/mt-mt.d.ts +1 -1
  40. package/dist/i18n/locales/nl-be.d.ts +2 -0
  41. package/dist/i18n/locales/nl-nl.d.ts +1 -1
  42. package/dist/i18n/locales/no-no.d.ts +1 -1
  43. package/dist/i18n/locales/pl-pl.d.ts +2 -0
  44. package/dist/i18n/locales/pt-pt.d.ts +1 -1
  45. package/dist/i18n/locales/ro-ro.d.ts +1 -1
  46. package/dist/i18n/locales/sk-sk.d.ts +1 -1
  47. package/dist/i18n/locales/sl-si.d.ts +1 -1
  48. package/dist/i18n/locales/sv-se.d.ts +1 -1
  49. package/dist/i18n/types/LocalizationKey.d.ts +10 -11
  50. package/dist/inline.css +1 -1
  51. package/dist/lookups/toOptions.d.ts +3 -0
  52. package/dist/services/api.d.ts +3 -2
  53. package/dist/taxbit-react-sdk.es.js +16961 -10199
  54. package/dist/taxbit-react-sdk.umd.js +10 -10
  55. package/dist/test/Wrapper.d.ts +7 -0
  56. package/dist/test/getWrapper.d.ts +4 -0
  57. package/dist/test/index.d.ts +2 -0
  58. package/dist/types/Locale.d.ts +1 -1
  59. package/dist/types/TaxDocumentation.d.ts +8 -4
  60. package/dist/types/client/index.d.ts +6 -0
  61. package/dist/types/{external → server}/ComprehensiveTaxDocumentation.d.ts +3 -14
  62. package/dist/types/server/TaxDocumentationStatus.d.ts +9 -0
  63. package/dist/types/server/enums.d.ts +13 -0
  64. package/dist/types/server/index.d.ts +3 -0
  65. package/dist/ui/DateOfBirthInput/DateOfBirthInput.d.ts +1 -2
  66. package/dist/ui/DateOfBirthInput/__tests__/useDateOfBirthInput.test.d.ts +1 -0
  67. package/dist/ui/DateOfBirthInput/useDateOfBirthInput.d.ts +20 -0
  68. package/dist/ui/Password/Password.d.ts +2 -3
  69. package/dist/ui/RadioButtons/RadioButtons.d.ts +3 -3
  70. package/dist/ui/RadioButtons/__tests__/RadioButtons.test.d.ts +0 -0
  71. package/dist/utils/getFieldsState.d.ts +4 -3
  72. package/dist/utils/getHintKeyMap.d.ts +4 -2
  73. package/dist/utils/getPromptKeyMap.d.ts +6 -4
  74. package/dist/utils/index.d.ts +10 -15
  75. package/dist/utils/kebabCase.d.ts +1 -0
  76. package/dist/utils/{getForeignAccountType.d.ts → transformInbound/getForeignAccountType.d.ts} +1 -1
  77. package/dist/utils/{getForeignOtherClassification.d.ts → transformInbound/getForeignOtherClassification.d.ts} +1 -1
  78. package/dist/utils/{getForeignTrustClassification.d.ts → transformInbound/getForeignTrustClassification.d.ts} +1 -1
  79. package/dist/utils/{getLLCClassification.d.ts → transformInbound/getLLCClassification.d.ts} +1 -1
  80. package/dist/utils/{getUsAccountType.d.ts → transformInbound/getUsAccountType.d.ts} +1 -1
  81. package/dist/utils/transformInbound/index.d.ts +6 -0
  82. package/dist/utils/transformInbound/transformInbound.d.ts +3 -0
  83. package/dist/utils/transformOutbound/index.d.ts +6 -0
  84. package/dist/utils/transformOutbound/transformOutbound.d.ts +2 -2
  85. package/dist/utils/transformOutbound/transformToOutboundAccoutHolder.d.ts +3 -3
  86. package/dist/utils/transformOutbound/transformToOutboundAddress.d.ts +2 -2
  87. package/dist/utils/transformOutbound/transformToOutboundRegardedOwner.d.ts +2 -2
  88. package/dist/utils/transformOutbound/transformToOutboundTaxResidenceFields.d.ts +3 -4
  89. package/dist/validations/getInvalidFields.d.ts +3 -0
  90. package/dist/validations/getNotifiedFields.d.ts +10 -0
  91. package/dist/validations/getRequiredFields.d.ts +3 -0
  92. package/dist/validations/getSubmittableFields.d.ts +3 -0
  93. package/dist/{utils → validations}/getSupportedFields.d.ts +1 -1
  94. package/dist/validations/getVisibleFields.d.ts +3 -0
  95. package/dist/validations/index.d.ts +7 -2
  96. package/dist/validations/invalidFieldRules.d.ts +7 -0
  97. package/dist/validations/{requiredFields.d.ts → requiredFieldRules.d.ts} +3 -3
  98. package/dist/widgets/TaxBitForm/TaxBitDAC7Form.d.ts +4 -11
  99. package/dist/widgets/TaxBitForm/TaxBitForm.d.ts +7 -6
  100. package/dist/wizard/AddressInput/AddressInput.d.ts +3 -3
  101. package/dist/wizard/PlaceOfBirthInput/PlaceOfBirthInput.d.ts +1 -1
  102. package/dist/wizard/ResidenceInput/ResidenceInput.d.ts +3 -3
  103. package/dist/wizard/RowInput/ErrorRow/ErrorRow.d.ts +6 -0
  104. package/dist/wizard/RowInput/ErrorRow/index.d.ts +1 -0
  105. package/dist/wizard/RowInput/VisibleRow/VisibleRow.d.ts +2 -2
  106. package/dist/wizard/RowInput/index.d.ts +7 -6
  107. package/dist/wizard/TaxBitFormUI/AccountHolderClassification/AccountHolderClassification.d.ts +1 -1
  108. package/dist/wizard/TaxBitFormUI/AccountHolderContact/AccountHolderContact.d.ts +1 -1
  109. package/dist/wizard/TaxBitFormUI/AccountHolderTax/AccountHolderTax.d.ts +1 -1
  110. package/dist/wizard/TaxBitFormUI/AccountHolderTaxClarification/AccountHolderTaxClarification.d.ts +1 -1
  111. package/dist/wizard/TaxBitFormUI/Exemptions/Exemptions.d.ts +1 -1
  112. package/dist/wizard/TaxBitFormUI/RegardedOwnerClassification/RegardedOwnerClassification.d.ts +1 -1
  113. package/dist/wizard/TaxBitFormUI/RegardedOwnerContact/RegardedOwnerContact.d.ts +1 -1
  114. package/dist/wizard/TaxBitFormUI/RegardedOwnerTax/RegardedOwnerTax.d.ts +1 -1
  115. package/dist/wizard/TaxBitFormUI/Summary/Recap.d.ts +1 -1
  116. package/dist/wizard/TaxBitFormUI/Summary/Summary.d.ts +1 -1
  117. package/dist/wizard/TaxBitFormUI/TaxBitDAC7FormUI.d.ts +3 -9
  118. package/dist/wizard/TaxBitFormUI/TaxBitFormUI.d.ts +6 -6
  119. package/package.json +17 -10
  120. package/dist/components/Page/Page.d.ts +0 -8
  121. package/dist/components/Page/index.d.ts +0 -1
  122. package/dist/types/external/index.d.ts +0 -1
  123. package/dist/utils/getNotifications.d.ts +0 -10
  124. package/dist/utils/getRequiredFields.d.ts +0 -103
  125. package/dist/utils/getValidationMessages.d.ts +0 -104
  126. package/dist/utils/getVisibleQuestions.d.ts +0 -6
  127. package/dist/utils/transformInbound.d.ts +0 -3
  128. package/dist/validations/validations.d.ts +0 -7
  129. /package/dist/{taxbit-react-sdk.es.d.ts → index.d.ts} +0 -0
@@ -1,12 +1,14 @@
1
- import React from "react";
2
- import type { Locale, TaxForm, TaxDocumentation } from "../../types";
3
- import { ClientTaxDocumentation } from "../../types/external";
1
+ import React from 'react';
2
+ import type { Locale, TaxDocumentation, TaxForm } from '../../types';
3
+ import { ClientTaxDocumentation } from '../../types/client';
4
+ import { InputStep } from './useTaxDocumentation';
4
5
  type TaxDocumentationProviderProps = {
5
6
  data?: ClientTaxDocumentation;
6
7
  onSubmit: (data: TaxDocumentation) => void;
7
8
  language?: Locale;
8
9
  children: React.ReactNode;
9
10
  taxForms?: TaxForm[];
11
+ step?: InputStep;
10
12
  };
11
- export declare const TaxBitFormProvider: ({ data, onSubmit, language, taxForms, children, }: TaxDocumentationProviderProps) => React.JSX.Element;
13
+ export declare const TaxBitFormProvider: ({ data, onSubmit, language, taxForms, step, children, }: TaxDocumentationProviderProps) => React.JSX.Element;
12
14
  export {};
@@ -1,23 +1,24 @@
1
1
  /// <reference types="react" />
2
- import type { TaxForm, TaxDocumentation } from "types";
3
- import { Locale } from "types";
4
- import { ClientTaxDocumentation } from "../../types/external";
5
- type InputStep = "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary";
2
+ import type { TaxDocumentation, TaxForm } from 'types';
3
+ import { Locale } from 'types';
4
+ import { ClientTaxDocumentation } from '../../types/client';
5
+ export type InputStep = 'AccountHolderClassification' | 'AccountHolderContact' | 'AccountHolderTax' | 'AccountHolderTaxClarification' | 'Exemptions' | 'RegardedOwnerClassification' | 'RegardedOwnerContact' | 'RegardedOwnerTax' | 'Summary';
6
6
  type UseTaxDocumentationProps = {
7
7
  data: ClientTaxDocumentation;
8
- onSubmit: (transformedData: TaxDocumentation) => void;
9
8
  language?: Locale;
9
+ onSubmit: (transformedData: TaxDocumentation) => void;
10
+ step?: InputStep;
10
11
  taxForms?: TaxForm[];
11
12
  };
12
- export declare const useTaxDocumentation: ({ data: initialData, onSubmit, language: initialLanguage, taxForms: supportedForms, }: UseTaxDocumentationProps) => {
13
+ export declare const useTaxDocumentation: ({ data: initialData, language: initialLanguage, onSubmit, step: initialStep, taxForms: supportedForms, }: UseTaxDocumentationProps) => {
13
14
  isW9: boolean;
14
15
  isW8: boolean;
15
16
  isW8Ben: boolean;
16
17
  isW8BenE: boolean;
17
- isDac7: boolean;
18
+ isDac7: boolean | undefined;
18
19
  onPersistAccountHolderData: (newData: TaxDocumentation) => void;
19
20
  onPersistCollectedData: (newData: TaxDocumentation) => void;
20
- onSubmitTaxDocumentation: (newData: TaxDocumentation) => void;
21
+ onSubmitTaxDocumentation: (submitFields: TaxDocumentation) => void;
21
22
  onResetTaxDocumentation: (data: ClientTaxDocumentation) => void;
22
23
  editTo: (form: InputStep) => void;
23
24
  onCancel: (() => void) | undefined;
@@ -26,8 +27,8 @@ export declare const useTaxDocumentation: ({ data: initialData, onSubmit, langua
26
27
  goToNext: (data: TaxDocumentation) => void;
27
28
  stepName: InputStep;
28
29
  data: TaxDocumentation;
29
- setLanguage: import("react").Dispatch<import("react").SetStateAction<"bg-bg" | "cs-cz" | "de-de" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fr-fr" | "hu-hu" | "it-it" | "mt-mt" | "nl-nl" | "no-no" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se">>;
30
- language: "bg-bg" | "cs-cz" | "de-de" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fr-fr" | "hu-hu" | "it-it" | "mt-mt" | "nl-nl" | "no-no" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se";
30
+ setLanguage: import("react").Dispatch<import("react").SetStateAction<"bg-bg" | "cs-cz" | "da-dk" | "de-at" | "de-de" | "el-cy" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fi-fi" | "fr-fr" | "fr-lu" | "ga-ie" | "hr-hr" | "hu-hu" | "it-it" | "lt-lt" | "lv-lv" | "mt-mt" | "nl-be" | "nl-nl" | "no-no" | "pl-pl" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se">>;
31
+ language: "bg-bg" | "cs-cz" | "da-dk" | "de-at" | "de-de" | "el-cy" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fi-fi" | "fr-fr" | "fr-lu" | "ga-ie" | "hr-hr" | "hu-hu" | "it-it" | "lt-lt" | "lv-lv" | "mt-mt" | "nl-be" | "nl-nl" | "no-no" | "pl-pl" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se";
31
32
  supportedForms: TaxForm[];
32
33
  setSupportedForms: import("react").Dispatch<import("react").SetStateAction<TaxForm[]>>;
33
34
  };
@@ -4,71 +4,113 @@ export declare const useTaxDocumentationContext: () => {
4
4
  isW8: boolean;
5
5
  isW8Ben: boolean;
6
6
  isW8BenE: boolean;
7
- isDac7: boolean;
7
+ isDac7: boolean | undefined;
8
8
  onPersistAccountHolderData: (newData: import("../../types").TaxDocumentation) => void;
9
9
  onPersistCollectedData: (newData: import("../../types").TaxDocumentation) => void;
10
- onSubmitTaxDocumentation: (newData: import("../../types").TaxDocumentation) => void;
10
+ onSubmitTaxDocumentation: (submitFields: import("../../types").TaxDocumentation) => void;
11
11
  onResetTaxDocumentation: (data: {
12
- address?: {
13
- city?: string | undefined;
14
- country?: string | undefined;
15
- stateOrProvince?: string | undefined;
16
- firstLine?: string | undefined;
17
- secondLine?: string | undefined;
18
- postalCode?: string | undefined;
19
- } | undefined;
20
- countryOfCitizenship?: string | undefined;
21
- dateOfBirth?: string | undefined;
22
- dbaName?: string | undefined;
23
- mailingAddress?: {
24
- city?: string | undefined;
25
- country?: string | undefined;
26
- stateOrProvince?: string | undefined;
27
- firstLine?: string | undefined;
28
- secondLine?: string | undefined;
29
- postalCode?: string | undefined;
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;
30
62
  } | undefined;
31
- mailingAddressIsDifferent?: boolean | undefined;
32
- name?: string | undefined;
33
- cityOfBirth?: string | undefined;
34
- countryOfBirth?: string | undefined;
35
- financialAccountIdentifier?: string | undefined;
36
- financialAccountName?: string | undefined;
37
- ftin?: string | undefined;
38
- ftinNotLegallyRequired?: boolean | undefined;
39
- taxResidences?: {
40
- country?: string | 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;
41
87
  tin?: string | undefined;
42
- tinNotRequired?: boolean | undefined;
43
- }[] | undefined;
44
- showTaxResidence?: boolean[] | 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;
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;
62
104
  }) => void;
63
- editTo: (form: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary") => void;
105
+ editTo: (form: import("./useTaxDocumentation").InputStep) => void;
64
106
  onCancel: (() => void) | undefined;
65
- goTo: (form: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary") => void;
107
+ goTo: (form: import("./useTaxDocumentation").InputStep) => void;
66
108
  goBack: (() => void) | undefined;
67
109
  goToNext: (data: import("../../types").TaxDocumentation) => void;
68
- stepName: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary";
110
+ stepName: import("./useTaxDocumentation").InputStep;
69
111
  data: import("../../types").TaxDocumentation;
70
- setLanguage: import("react").Dispatch<import("react").SetStateAction<"bg-bg" | "cs-cz" | "de-de" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fr-fr" | "hu-hu" | "it-it" | "mt-mt" | "nl-nl" | "no-no" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se">>;
71
- language: "bg-bg" | "cs-cz" | "de-de" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fr-fr" | "hu-hu" | "it-it" | "mt-mt" | "nl-nl" | "no-no" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se";
112
+ setLanguage: import("react").Dispatch<import("react").SetStateAction<"bg-bg" | "cs-cz" | "da-dk" | "de-at" | "de-de" | "el-cy" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fi-fi" | "fr-fr" | "fr-lu" | "ga-ie" | "hr-hr" | "hu-hu" | "it-it" | "lt-lt" | "lv-lv" | "mt-mt" | "nl-be" | "nl-nl" | "no-no" | "pl-pl" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se">>;
113
+ language: "bg-bg" | "cs-cz" | "da-dk" | "de-at" | "de-de" | "el-cy" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fi-fi" | "fr-fr" | "fr-lu" | "ga-ie" | "hr-hr" | "hu-hu" | "it-it" | "lt-lt" | "lv-lv" | "mt-mt" | "nl-be" | "nl-nl" | "no-no" | "pl-pl" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se";
72
114
  supportedForms: import("../../types").TaxForm[];
73
115
  setSupportedForms: import("react").Dispatch<import("react").SetStateAction<import("../../types").TaxForm[]>>;
74
116
  }, TaxDocumentationContextProvider: import("react").Provider<{
@@ -76,71 +118,113 @@ export declare const useTaxDocumentationContext: () => {
76
118
  isW8: boolean;
77
119
  isW8Ben: boolean;
78
120
  isW8BenE: boolean;
79
- isDac7: boolean;
121
+ isDac7: boolean | undefined;
80
122
  onPersistAccountHolderData: (newData: import("../../types").TaxDocumentation) => void;
81
123
  onPersistCollectedData: (newData: import("../../types").TaxDocumentation) => void;
82
- onSubmitTaxDocumentation: (newData: import("../../types").TaxDocumentation) => void;
124
+ onSubmitTaxDocumentation: (submitFields: import("../../types").TaxDocumentation) => void;
83
125
  onResetTaxDocumentation: (data: {
84
- address?: {
85
- city?: string | undefined;
86
- country?: string | undefined;
87
- stateOrProvince?: string | undefined;
88
- firstLine?: string | undefined;
89
- secondLine?: string | undefined;
90
- postalCode?: string | undefined;
91
- } | undefined;
92
- countryOfCitizenship?: string | undefined;
93
- dateOfBirth?: string | undefined;
94
- dbaName?: string | undefined;
95
- mailingAddress?: {
96
- city?: string | undefined;
97
- country?: string | undefined;
98
- stateOrProvince?: string | undefined;
99
- firstLine?: string | undefined;
100
- secondLine?: string | undefined;
101
- postalCode?: string | undefined;
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;
102
176
  } | undefined;
103
- mailingAddressIsDifferent?: boolean | undefined;
104
- name?: string | undefined;
105
- cityOfBirth?: string | undefined;
106
- countryOfBirth?: string | undefined;
107
- financialAccountIdentifier?: string | undefined;
108
- financialAccountName?: string | undefined;
109
- ftin?: string | undefined;
110
- ftinNotLegallyRequired?: boolean | undefined;
111
- taxResidences?: {
112
- country?: string | 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;
113
201
  tin?: string | undefined;
114
- tinNotRequired?: boolean | undefined;
115
- }[] | undefined;
116
- showTaxResidence?: boolean[] | undefined;
117
- tin?: string | undefined;
118
- vatin?: string | undefined;
119
- vatinCountry?: string | undefined;
120
- vatinNotRequired?: boolean | undefined;
121
- exemptFatcaCode?: string | undefined;
122
- exemptPayeeCode?: string | undefined;
123
- isIndividual?: boolean | undefined;
124
- isEuResident?: boolean | undefined;
125
- isUsPerson?: boolean | undefined;
126
- usAccountType?: string | undefined;
127
- usSmllcElection?: boolean | undefined;
128
- usLlcClassification?: string | undefined;
129
- usOtherClassification?: string | undefined;
130
- usTrustEstateEin?: boolean | undefined;
131
- foreignAccountType?: string | undefined;
132
- foreignTrustClassification?: string | undefined;
133
- foreignOtherClassification?: 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;
134
218
  }) => void;
135
- editTo: (form: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary") => void;
219
+ editTo: (form: import("./useTaxDocumentation").InputStep) => void;
136
220
  onCancel: (() => void) | undefined;
137
- goTo: (form: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary") => void;
221
+ goTo: (form: import("./useTaxDocumentation").InputStep) => void;
138
222
  goBack: (() => void) | undefined;
139
223
  goToNext: (data: import("../../types").TaxDocumentation) => void;
140
- stepName: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary";
224
+ stepName: import("./useTaxDocumentation").InputStep;
141
225
  data: import("../../types").TaxDocumentation;
142
- setLanguage: import("react").Dispatch<import("react").SetStateAction<"bg-bg" | "cs-cz" | "de-de" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fr-fr" | "hu-hu" | "it-it" | "mt-mt" | "nl-nl" | "no-no" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se">>;
143
- language: "bg-bg" | "cs-cz" | "de-de" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fr-fr" | "hu-hu" | "it-it" | "mt-mt" | "nl-nl" | "no-no" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se";
226
+ setLanguage: import("react").Dispatch<import("react").SetStateAction<"bg-bg" | "cs-cz" | "da-dk" | "de-at" | "de-de" | "el-cy" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fi-fi" | "fr-fr" | "fr-lu" | "ga-ie" | "hr-hr" | "hu-hu" | "it-it" | "lt-lt" | "lv-lv" | "mt-mt" | "nl-be" | "nl-nl" | "no-no" | "pl-pl" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se">>;
227
+ language: "bg-bg" | "cs-cz" | "da-dk" | "de-at" | "de-de" | "el-cy" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fi-fi" | "fr-fr" | "fr-lu" | "ga-ie" | "hr-hr" | "hu-hu" | "it-it" | "lt-lt" | "lv-lv" | "mt-mt" | "nl-be" | "nl-nl" | "no-no" | "pl-pl" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se";
144
228
  supportedForms: import("../../types").TaxForm[];
145
229
  setSupportedForms: import("react").Dispatch<import("react").SetStateAction<import("../../types").TaxForm[]>>;
146
230
  } | undefined>;
@@ -1,5 +1,5 @@
1
- export * from "../wizard/TaxBitFormUI";
2
- export * from "../widgets/TaxBitForm";
3
- export * from "../hooks/useTaxBit";
4
- export { type TaxForm, type Locale } from "../types";
5
- export { type ClientTaxDocumentation } from "../types/external";
1
+ export * from '../hooks/useTaxBit';
2
+ export { type Locale, type TaxForm } from '../types';
3
+ export { type ClientTaxDocumentation, type ClientTaxDocumentationStatus, } from '../types/client';
4
+ export * from '../widgets/TaxBitForm';
5
+ export * from '../wizard/TaxBitFormUI';
@@ -1,5 +1,109 @@
1
- import { TaxDocumentation } from "types";
2
- export declare const useTaxBit: (bearerToken: string, staging?: true) => {
3
- submitForm: (taxDocumentation: TaxDocumentation) => void;
4
- formStatus: string | undefined;
1
+ import { TaxDocumentation } from 'types';
2
+ import { ComprehensiveStatusEnum } from 'types/server';
3
+ export declare const useTaxBit: (bearerToken: string, staging?: true, onSuccess?: ((data?: TaxDocumentation) => void) | undefined) => {
4
+ submitForm: (data: TaxDocumentation) => void;
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;
14
+ 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;
5
109
  };
@@ -1,2 +1,2 @@
1
- import { PropertyFile } from "../types/PropertyFile";
1
+ import { PropertyFile } from '../types/PropertyFile';
2
2
  export declare const bgBg: PropertyFile;
@@ -1,2 +1,2 @@
1
- import { PropertyFile } from "../types/PropertyFile";
1
+ import { PropertyFile } from '../types/PropertyFile';
2
2
  export declare const csCz: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from '../types/PropertyFile';
2
+ export declare const daDk: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from '../types/PropertyFile';
2
+ export declare const deAt: PropertyFile;
@@ -1,2 +1,2 @@
1
- import { PropertyFile } from "../types/PropertyFile";
1
+ import { PropertyFile } from '../types/PropertyFile';
2
2
  export declare const deDe: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from '../types/PropertyFile';
2
+ export declare const elCy: PropertyFile;
@@ -1,2 +1,2 @@
1
- import { PropertyFile } from "../types/PropertyFile";
1
+ import { PropertyFile } from '../types/PropertyFile';
2
2
  export declare const elGr: PropertyFile;
@@ -1,2 +1,2 @@
1
- import { PropertyFile } from "../types/PropertyFile";
1
+ import { PropertyFile } from '../types/PropertyFile';
2
2
  export declare const enGb: PropertyFile;
@@ -1,2 +1,2 @@
1
- import { PropertyFile } from "../types/PropertyFile";
1
+ import { PropertyFile } from '../types/PropertyFile';
2
2
  export declare const enUs: PropertyFile;
@@ -1,2 +1,2 @@
1
- import { PropertyFile } from "../types/PropertyFile";
1
+ import { PropertyFile } from '../types/PropertyFile';
2
2
  export declare const esEs: PropertyFile;
@@ -1,2 +1,2 @@
1
- import { PropertyFile } from "../types/PropertyFile";
1
+ import { PropertyFile } from '../types/PropertyFile';
2
2
  export declare const etEe: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from '../types/PropertyFile';
2
+ export declare const fiFi: PropertyFile;
@@ -1,2 +1,2 @@
1
- import { PropertyFile } from "../types/PropertyFile";
1
+ import { PropertyFile } from '../types/PropertyFile';
2
2
  export declare const frFr: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from '../types/PropertyFile';
2
+ export declare const frLu: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from '../types/PropertyFile';
2
+ export declare const gaIe: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from '../types/PropertyFile';
2
+ export declare const hrHr: PropertyFile;
@@ -1,2 +1,2 @@
1
- import { PropertyFile } from "../types/PropertyFile";
1
+ import { PropertyFile } from '../types/PropertyFile';
2
2
  export declare const huHu: PropertyFile;