@taxbit/react-sdk 1.1.0-beta.1 → 1.2.0-beta.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 (126) hide show
  1. package/README.md +13 -4
  2. package/dist/src/contexts/QuestionnaireStep/getLocal.d.ts +4 -3
  3. package/dist/src/contexts/QuestionnaireStep/shiftControllingPerson.d.ts +3 -0
  4. package/dist/src/contexts/QuestionnaireStep/shiftResidence.d.ts +1 -1
  5. package/dist/src/contexts/QuestionnaireStep/useQuestionnaireStep.d.ts +2 -1
  6. package/dist/src/contexts/QuestionnaireStep/useQuestionnaireStepContext.d.ts +4 -2
  7. package/dist/src/contexts/TaxDocumentation/useTaxDocumentation.d.ts +5 -5
  8. package/dist/src/contexts/TaxDocumentation/useTaxDocumentationContext.d.ts +6 -6
  9. package/dist/src/hooks/useTaxbit/useTaxbit.d.ts +2 -2
  10. package/dist/src/hooks/useTaxbit/useTaxbitStatus.d.ts +2 -2
  11. package/dist/src/i18n/locales/de.d.ts +2 -2
  12. package/dist/src/i18n/locales/el.d.ts +2 -2
  13. package/dist/src/i18n/locales/ga.d.ts +1 -3
  14. package/dist/src/i18n/locales/lt.d.ts +2 -2
  15. package/dist/src/i18n/locales/pl.d.ts +2 -2
  16. package/dist/src/i18n/types/LocalizationKey.d.ts +6 -6
  17. package/dist/src/i18n/types/PropertyFile.d.ts +15 -14
  18. package/dist/src/index.d.ts +2 -2
  19. package/dist/src/lookups/activeNonFinancialEntityTypeOptions.d.ts +3 -0
  20. package/dist/src/lookups/controllingPersonRoleOptions.d.ts +3 -0
  21. package/dist/src/lookups/entityTypeOptions.d.ts +3 -0
  22. package/dist/src/lookups/financialInstitutionTypeOptions.d.ts +3 -0
  23. package/dist/src/lookups/index.d.ts +7 -0
  24. package/dist/src/lookups/payeeCodeOptions.d.ts +1 -1
  25. package/dist/src/lookups/selfCertificationAccountTypeOptions.d.ts +3 -0
  26. package/dist/src/lookups/signatureCapacityOptions.d.ts +3 -0
  27. package/dist/src/lookups/tinNotRequiredReasonOptions.d.ts +3 -0
  28. package/dist/src/services/api.d.ts +5 -2
  29. package/dist/src/services/msw.d.ts +33 -0
  30. package/dist/src/test/Wrapper.d.ts +2 -2
  31. package/dist/src/test/getWrapper.d.ts +2 -2
  32. package/dist/src/test/utils/helpers.d.ts +10 -0
  33. package/dist/src/types/InputStep.d.ts +1 -1
  34. package/dist/src/types/QuestionnaireProp.d.ts +1 -0
  35. package/dist/src/types/StepId.d.ts +1 -1
  36. package/dist/src/types/TaxDocumentation.d.ts +87 -50
  37. package/dist/src/types/client/ClientTaxDocumentationStatus.d.ts +4 -0
  38. package/dist/src/types/index.d.ts +1 -1
  39. package/dist/src/types/server/TaxDocumentationStatus.d.ts +4 -0
  40. package/dist/src/ui/InputValue/InputValue.d.ts +2 -1
  41. package/dist/src/ui/Select/Select.d.ts +0 -1
  42. package/dist/src/utils/getFieldsState.d.ts +7 -2
  43. package/dist/src/utils/getFormStatus.d.ts +2 -1
  44. package/dist/src/utils/getLanguage.d.ts +2 -2
  45. package/dist/src/utils/index.d.ts +1 -1
  46. package/dist/src/utils/promptKeyMapping/getAddressPromptKeyMap.d.ts +6 -0
  47. package/dist/src/utils/promptKeyMapping/getControllingPersonPromptKeyMap.d.ts +4 -0
  48. package/dist/src/utils/promptKeyMapping/getTaxResidencesPromptKeyMap.d.ts +6 -0
  49. package/dist/src/utils/transformForClient/transformForClient.d.ts +2 -2
  50. package/dist/src/utils/transformForClient/transformForClientAddress.d.ts +4 -32
  51. package/dist/src/utils/transformForClient/transformForClientTaxResidences.d.ts +11 -0
  52. package/dist/src/utils/transformForClient/transformForControllingPersons.d.ts +4 -0
  53. package/dist/src/utils/transformInbound/getActiveNonFinancialEntityType.d.ts +3 -0
  54. package/dist/src/utils/transformInbound/getCountryCode.d.ts +1 -0
  55. package/dist/src/utils/transformInbound/getEntityType.d.ts +3 -0
  56. package/dist/src/utils/transformInbound/getFinancialInstitutionType.d.ts +3 -0
  57. package/dist/src/utils/transformInbound/getSelfCertificationAccountType.d.ts +3 -0
  58. package/dist/src/utils/transformInbound/transformInbound.d.ts +2 -2
  59. package/dist/src/utils/transformInbound/transformInboundAddress.d.ts +6 -0
  60. package/dist/src/utils/transformInbound/transformInboundControllingPersons.d.ts +440 -0
  61. package/dist/src/utils/transformInbound/transformInboundTaxResidencies.d.ts +7 -0
  62. package/dist/src/validations/getSteps.d.ts +2 -2
  63. package/dist/src/validations/index.d.ts +5 -5
  64. package/dist/src/validations/invalidFields/getInvalidAddressFields.d.ts +5 -0
  65. package/dist/src/validations/invalidFields/getInvalidControllingPersonsFields.d.ts +3 -0
  66. package/dist/src/validations/invalidFields/getInvalidFields.d.ts +5 -0
  67. package/dist/src/validations/invalidFields/getInvalidTaxResidencyFields.d.ts +5 -0
  68. package/dist/src/validations/{invalidFieldRules.d.ts → invalidFields/invalidFieldRules.d.ts} +1 -1
  69. package/dist/src/validations/requiredFields/getRequiredAddressFields.d.ts +7 -0
  70. package/dist/src/validations/requiredFields/getRequiredControllingPersonFields.d.ts +4 -0
  71. package/dist/src/validations/requiredFields/getRequiredFields.d.ts +4 -0
  72. package/dist/src/validations/requiredFields/getRequiredTaxResidenceFields.d.ts +7 -0
  73. package/dist/src/validations/supportedFields/__tests__/generateStrings.d.ts +5 -0
  74. package/dist/src/validations/supportedFields/getSupportedAddressFields.d.ts +8 -0
  75. package/dist/src/validations/supportedFields/getSupportedControllingPersonFields.d.ts +7 -0
  76. package/dist/src/validations/supportedFields/getSupportedFields.d.ts +4 -0
  77. package/dist/src/validations/supportedFields/getSupportedTaxResidenceFields.d.ts +8 -0
  78. package/dist/src/validations/supportedFields/getSupportedTreatyClaimFields.d.ts +3 -0
  79. package/dist/src/validations/visibleFields/getVisibleAddressFields.d.ts +5 -0
  80. package/dist/src/validations/visibleFields/getVisibleControllingPersonFields.d.ts +4 -0
  81. package/dist/src/validations/visibleFields/getVisibleFields.d.ts +4 -0
  82. package/dist/src/validations/visibleFields/getVisibleTaxResidenceFields.d.ts +9 -0
  83. package/dist/src/{entry → widgets}/TaxbitQuestionnaire/TaxbitQuestionnaire.d.ts +3 -3
  84. package/dist/src/widgets/TaxbitQuestionnairePersist/useTaxbitPersist.d.ts +2 -2
  85. package/dist/src/wizard/AddressInput/AddressInput.d.ts +1 -1
  86. package/dist/src/wizard/ControllingPersonInput/ControllingPersonInput.d.ts +11 -0
  87. package/dist/src/wizard/ControllingPersonInput/index.d.ts +1 -0
  88. package/dist/src/wizard/LanguageSelector/LanguageSelector.d.ts +2 -2
  89. package/dist/src/wizard/ResidenceInput/ResidenceInput.d.ts +2 -1
  90. package/dist/src/wizard/RowInput/AddressRow/AddressRow.d.ts +1 -1
  91. package/dist/src/wizard/RowInput/PercentInputRow/PercentInputRow.d.ts +9 -0
  92. package/dist/src/wizard/RowInput/PercentInputRow/index.d.ts +1 -0
  93. package/dist/src/wizard/RowInput/SelectRow/SelectRow.d.ts +2 -1
  94. package/dist/src/wizard/RowInput/index.d.ts +1 -0
  95. package/dist/src/wizard/TaxbitQuestionnaireUI/ControllingPersonDetails/ControllingPersonDetails.d.ts +7 -0
  96. package/dist/src/wizard/TaxbitQuestionnaireUI/ControllingPersonDetails/index.d.ts +1 -0
  97. package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/AccountHolder/AccountHolderClassificationSummary.d.ts +3 -0
  98. package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/AccountHolder/AccountHolderForeignClassificationSummary.d.ts +6 -0
  99. package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/AccountHolder/AccountHolderSelfCertificationClassificationSummary.d.ts +6 -0
  100. package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/AccountHolder/AccountHolderUsClassificationSummary.d.ts +6 -0
  101. package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/ControllingPerson/ControllingPersonRoleInputValue.d.ts +7 -0
  102. package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/ControllingPerson/ControllingPersonSummary.d.ts +7 -0
  103. package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/ControllingPerson/ControllingPersonTypeSummary.d.ts +7 -0
  104. package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/RegardedOwner/RegardedOwnerClassificationSummary.d.ts +3 -0
  105. package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/RegardedOwner/RegardedOwnerForeignClassificationSummary.d.ts +6 -0
  106. package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/RegardedOwner/RegardedOwnerUsClassificationSummary.d.ts +6 -0
  107. package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/TaxResidency/TaxResidenciesSummary.d.ts +11 -0
  108. package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitQuestionnaireUI.SelfCert.AccountClassification.test.d.ts +1 -0
  109. package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitQuestionnaireUI.SelfCert.ControllingPerson.test.d.ts +1 -0
  110. package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitQuestionnaireUI.SelfCert.NameAndAddress.test.d.ts +1 -0
  111. package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitQuestionnaireUI.SelfCert.Summary.test.d.ts +1 -0
  112. package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitQuestionnaireUI.SelfCert.TaxResidencies.test.d.ts +1 -0
  113. package/dist/src/wizard/TaxbitQuestionnaireUI/steps.d.ts +1 -0
  114. package/dist/taxbit-react-sdk.js +7466 -4608
  115. package/dist/taxbit-react-sdk.umd.cjs +1 -1
  116. package/package.json +7 -6
  117. package/style/basic.css +4 -0
  118. package/style/inline.css +1 -0
  119. package/dist/src/types/Questionnaire.d.ts +0 -1
  120. package/dist/src/utils/transformForClient/transformForClientTaxResidenceFields.d.ts +0 -7
  121. package/dist/src/validations/getInvalidFields.d.ts +0 -5
  122. package/dist/src/validations/getRequiredFields.d.ts +0 -4
  123. package/dist/src/validations/getSupportedFields.d.ts +0 -7
  124. package/dist/src/validations/getVisibleFields.d.ts +0 -4
  125. /package/dist/src/utils/{getPromptKeyMap.d.ts → promptKeyMapping/getPromptKeyMap.d.ts} +0 -0
  126. /package/dist/src/{entry → widgets}/TaxbitQuestionnaire/index.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { ForeignAccountHolderAccountType, ForeignOtherClassification, ForeignRegardedOwnerAccountType, ForeignTrustClassification, UsAccountHolderAccountType, UsLLCAccountType, UsRegardedOwnerAccountType } from '@taxbit/utilities';
1
+ import { ActiveNonFinancialEntityType, EntityType, FinancialInstitutionType, ForeignAccountHolderAccountType, ForeignOtherClassification, ForeignRegardedOwnerAccountType, ForeignTrustClassification, SelfCertificationAccountType, UsAccountHolderAccountType, UsLLCAccountType, UsRegardedOwnerAccountType } from '@taxbit/utilities';
2
2
  import { Yes } from './Yes';
3
3
  import { YesNo } from './YesNo';
4
4
 
@@ -15,25 +15,30 @@ export type AccountHolderClassificationData = {
15
15
  accountHolderForeignTrustClassification?: ForeignTrustClassification;
16
16
  accountHolderForeignOtherClassification?: ForeignOtherClassification;
17
17
  };
18
- export type AccountHolderContactData = {
19
- accountHolderAddressCity?: string;
20
- accountHolderAddressCountry?: string;
21
- accountHolderAddressState?: string;
22
- accountHolderAddressStreet2?: string;
23
- accountHolderAddressStreet?: string;
24
- accountHolderAddressZip?: string;
18
+ type Address<Prefix extends string> = {
19
+ [key in `${Prefix}Address`]?: string;
20
+ } & {
21
+ [key in `${Prefix}AddressCity`]?: string;
22
+ } & {
23
+ [key in `${Prefix}AddressCountry`]?: string;
24
+ } & {
25
+ [key in `${Prefix}AddressState`]?: string;
26
+ } & {
27
+ [key in `${Prefix}AddressStreet2`]?: string;
28
+ } & {
29
+ [key in `${Prefix}AddressStreet`]?: string;
30
+ } & {
31
+ [key in `${Prefix}AddressZip`]?: string;
32
+ };
33
+ export type AccountHolderContactData = Address<'accountHolder'> & Address<'accountHolderMailing'> & {
25
34
  accountHolderCityOfBirth?: string;
26
35
  accountHolderCountryOfBirth?: string;
36
+ accountHolderOptionalCityOfBirth?: string;
37
+ accountHolderOptionalCountryOfBirth?: string;
27
38
  accountHolderCountryOfCitizenship?: string;
28
39
  accountHolderDateOfBirth?: string;
29
40
  accountHolderDbaName?: string;
30
- accountHolderMailingAddressCity?: string;
31
- accountHolderMailingAddressCountry?: string;
32
41
  accountHolderMailingAddressIsDifferent?: Yes;
33
- accountHolderMailingAddressState?: string;
34
- accountHolderMailingAddressStreet2?: string;
35
- accountHolderMailingAddressStreet?: string;
36
- accountHolderMailingAddressZip?: string;
37
42
  accountHolderName?: string;
38
43
  };
39
44
  export type AccountHolderTreatyClaimData = {
@@ -58,38 +63,73 @@ export type RegardedOwnerTreatyClaimData = {
58
63
  regardedOwnerTreatyClaimWithholding?: string;
59
64
  regardedOwnerTreatyClaimHasAdditionalConditions?: Yes;
60
65
  };
61
- export type AccountHolderTaxData = {
66
+ type Iterate1_5 = '1' | '2' | '3' | '4' | '5';
67
+ type ResidencesKey<Prefix extends string> = `${Prefix}TaxResidences`;
68
+ type ResidenceCountryKey<Prefix extends string> = `${Prefix}TaxResidenceCountry${Iterate1_5}`;
69
+ type ResidenceTinKey<Prefix extends string> = `${Prefix}TaxResidenceTin${Iterate1_5}`;
70
+ type ResidenceTinNotRequiredKey<Prefix extends string> = `${Prefix}TaxResidenceTinIsNotRequired${Iterate1_5}`;
71
+ type ResidenceTinNotRequiredReasonKey<Prefix extends string> = `${Prefix}TaxResidenceTinIsNotRequiredReason${Iterate1_5}`;
72
+ type ResidenceTinNotRequiredReasonOtherKey<Prefix extends string> = `${Prefix}TaxResidenceTinIsNotRequiredReasonOther${Iterate1_5}`;
73
+ type ResidenceShowKey<Prefix extends string> = `${Prefix}ShowTaxResidence${Iterate1_5}`;
74
+ type Residences<Prefix extends string> = {
75
+ [key in ResidencesKey<Prefix>]?: YesNo;
76
+ } & {
77
+ [key in ResidenceCountryKey<Prefix>]?: string;
78
+ } & {
79
+ [key in ResidenceTinKey<Prefix>]?: string;
80
+ } & {
81
+ [key in ResidenceTinNotRequiredKey<Prefix>]?: Yes;
82
+ } & {
83
+ [key in ResidenceTinNotRequiredReasonKey<Prefix>]?: string;
84
+ } & {
85
+ [key in ResidenceTinNotRequiredReasonOtherKey<Prefix>]?: string;
86
+ } & {
87
+ [key in ResidenceShowKey<Prefix>]?: YesNo;
88
+ };
89
+ export type AccountHolderTaxData = Residences<'accountHolder'> & {
62
90
  accountHolderForeignTin?: string;
63
91
  accountHolderForeignTinIsNotRequired?: Yes;
64
92
  accountHolderUsTin?: string;
65
93
  accountHolderFinancialAccountIdentifier?: string;
66
94
  accountHolderFinancialAccountName?: string;
67
- accountHolderTaxResidenceCountry1?: string;
68
- accountHolderTaxResidenceTin1?: string;
69
- accountHolderTaxResidenceTin1IsNotRequired?: Yes;
70
- accountHolderTaxResidenceCountry2?: string;
71
- accountHolderTaxResidenceTin2?: string;
72
- accountHolderTaxResidenceTin2IsNotRequired?: Yes;
73
- accountHolderTaxResidenceCountry3?: string;
74
- accountHolderTaxResidenceTin3?: string;
75
- accountHolderTaxResidenceTin3IsNotRequired?: Yes;
76
- accountHolderTaxResidenceCountry4?: string;
77
- accountHolderTaxResidenceTin4?: string;
78
- accountHolderTaxResidenceTin4IsNotRequired?: Yes;
79
- accountHolderTaxResidenceCountry5?: string;
80
- accountHolderTaxResidenceTin5?: string;
81
- accountHolderTaxResidenceTin5IsNotRequired?: Yes;
82
- accountHolderShowTaxResidence1?: YesNo;
83
- accountHolderShowTaxResidence2?: YesNo;
84
- accountHolderShowTaxResidence3?: YesNo;
85
- accountHolderShowTaxResidence4?: YesNo;
86
- accountHolderShowTaxResidence5?: YesNo;
87
95
  accountHolderVatIdentificationNumber?: string;
88
96
  accountHolderVatIsNotRequired?: Yes;
89
97
  accountHolderVatCountry?: string;
90
98
  accountHolderBusinessRegistrationNumber?: string;
91
99
  accountHolderBusinessRegistrationCountry?: string;
100
+ accountHolderSelfCertificationAccountType?: SelfCertificationAccountType;
101
+ accountHolderActiveNonFinancialEntityType?: ActiveNonFinancialEntityType;
102
+ accountHolderFinancialInstitutionType?: FinancialInstitutionType;
103
+ accountHolderInvestmentEntityManaged?: YesNo;
104
+ accountHolderEntityType?: EntityType;
105
+ accountHolderSecuritiesMarket?: string;
106
+ accountHolderRelatedCorporation?: string;
92
107
  };
108
+ type ControllingPersonPrefix = `controllingPerson${Iterate1_5}`;
109
+ type ControllingPerson = {
110
+ [key in `${ControllingPersonPrefix}ShowFields`]?: Yes;
111
+ } & {
112
+ [key in `${ControllingPersonPrefix}Name`]?: string;
113
+ } & {
114
+ [key in `${ControllingPersonPrefix}Role`]?: string;
115
+ } & {
116
+ [key in `${ControllingPersonPrefix}RoleOther`]?: string;
117
+ } & {
118
+ [key in `${ControllingPersonPrefix}RoleOtherEquivalent`]?: string;
119
+ } & {
120
+ [key in `${ControllingPersonPrefix}OwnershipPercentage`]?: string;
121
+ } & {
122
+ [key in `${ControllingPersonPrefix}DateOfBirth`]?: string;
123
+ } & {
124
+ [key in `${ControllingPersonPrefix}CityOfBirth`]?: string;
125
+ } & {
126
+ [key in `${ControllingPersonPrefix}CountryOfBirth`]?: string;
127
+ } & {
128
+ [key in `${ControllingPersonPrefix}CountryOfCitizenship`]?: string;
129
+ } & {
130
+ [key in `${ControllingPersonPrefix}MailingAddressIsDifferent`]?: Yes;
131
+ } & Address<ControllingPersonPrefix> & Address<`${ControllingPersonPrefix}Mailing`>;
132
+ export type ControllingPersonClassificationData = Residences<ControllingPersonPrefix> & ControllingPerson;
93
133
  export type RegardedOwnerClassificationData = {
94
134
  regardedOwnerUsPerson?: YesNo;
95
135
  regardedOwnerUsAccountType?: UsRegardedOwnerAccountType;
@@ -100,24 +140,12 @@ export type RegardedOwnerClassificationData = {
100
140
  regardedOwnerForeignOtherClassification?: ForeignOtherClassification;
101
141
  };
102
142
  export type RegardedOwnerContactData = {
103
- regardedOwnerAddressCity?: string;
104
- regardedOwnerAddressCountry?: string;
105
- regardedOwnerAddressState?: string;
106
- regardedOwnerAddressStreet2?: string;
107
- regardedOwnerAddressStreet?: string;
108
- regardedOwnerAddressZip?: string;
109
143
  regardedOwnerCountryOfCitizenship?: string;
110
144
  regardedOwnerDateOfBirth?: string;
111
145
  regardedOwnerDbaName?: string;
112
- regardedOwnerMailingAddressCity?: string;
113
- regardedOwnerMailingAddressCountry?: string;
114
146
  regardedOwnerMailingAddressIsDifferent?: Yes;
115
- regardedOwnerMailingAddressState?: string;
116
- regardedOwnerMailingAddressStreet2?: string;
117
- regardedOwnerMailingAddressStreet?: string;
118
- regardedOwnerMailingAddressZip?: string;
119
147
  regardedOwnerName?: string;
120
- };
148
+ } & Address<'regardedOwner'> & Address<'regardedOwnerMailing'>;
121
149
  export type RegardedOwnerTaxData = {
122
150
  regardedOwnerForeignTin?: string;
123
151
  regardedOwnerForeignTinIsNotRequired?: Yes;
@@ -127,7 +155,6 @@ export type SummaryData = {
127
155
  exemptFatcaCode?: string;
128
156
  exemptPayeeCode?: string;
129
157
  iAcknowledgeESignIsOk?: Yes;
130
- iAgreeWillResubmitIfIncorrect?: Yes;
131
158
  iAmACitizenOfTheUs?: Yes;
132
159
  iAmExemptFromFatcaReporting?: Yes;
133
160
  iAmNotSubjectToBackupWithholding?: Yes;
@@ -141,7 +168,16 @@ export type SummaryData = {
141
168
  iConfirmTheInformationIsCorrectComplete?: Yes;
142
169
  iConfirmTheTaxIdIsCorrect?: Yes;
143
170
  iHaveCapacityToSign?: Yes;
171
+ iWillResubmitIfIncorrect?: Yes;
172
+ iUnderstandTheInformationIsCovered?: Yes;
173
+ iAcknowledgeTheInformationMayBeProvided?: Yes;
174
+ iCertifyIAmAccountHolder?: Yes;
175
+ iCertifyIWillNotifyPersons?: Yes;
176
+ iDeclareStatementsAreCorrect?: Yes;
177
+ iWillNotifyChangeInCircumstance?: Yes;
144
178
  signature?: string;
179
+ signatureCapacity?: string;
180
+ signatureCapacityOther?: string;
145
181
  source?: string;
146
182
  };
147
183
  export type CalculatedData = {
@@ -151,5 +187,6 @@ export type CalculatedData = {
151
187
  regardedOwnerAddress?: string;
152
188
  regardedOwnerMailingAddress?: string;
153
189
  };
154
- export type TaxDocumentation = AccountHolderContactData & AccountHolderTaxData & AccountHolderClassificationData & RegardedOwnerContactData & RegardedOwnerClassificationData & RegardedOwnerTaxData & SummaryData & CalculatedData & AccountHolderTreatyClaimData & RegardedOwnerTreatyClaimData;
190
+ export type TaxDocumentation = AccountHolderContactData & AccountHolderTaxData & AccountHolderClassificationData & RegardedOwnerContactData & RegardedOwnerClassificationData & RegardedOwnerTaxData & SummaryData & CalculatedData & AccountHolderTreatyClaimData & RegardedOwnerTreatyClaimData & ControllingPersonClassificationData;
155
191
  export type TaxDocumentationKey = keyof TaxDocumentation;
192
+ export {};
@@ -13,4 +13,8 @@ export type ClientTaxDocumentationStatus = {
13
13
  tinValidationDate?: string;
14
14
  needsResubmission: boolean;
15
15
  };
16
+ selfCertification?: {
17
+ dataCollectionStatus: 'COMPLETE' | 'INCOMPLETE';
18
+ needsResubmission: boolean;
19
+ };
16
20
  };
@@ -2,7 +2,7 @@ export * from './CamelCaseKeys';
2
2
  export * from './InputStep';
3
3
  export * from './Locale';
4
4
  export * from './Progress';
5
- export * from './Questionnaire';
5
+ export * from './QuestionnaireProp.ts';
6
6
  export * from './TaxDocumentation';
7
7
  export * from './Utilities';
8
8
  export * from './Yes';
@@ -13,4 +13,8 @@ export type TaxDocumentationStatus = {
13
13
  tin_validation_date?: string;
14
14
  needs_resubmission: boolean;
15
15
  };
16
+ self_certification: {
17
+ data_collection_status: 'COMPLETE' | 'INCOMPLETE';
18
+ needs_resubmission: boolean;
19
+ };
16
20
  };
@@ -4,5 +4,6 @@ import { TaxDocumentationKey } from 'types/TaxDocumentation';
4
4
  export type InputValueProps = {
5
5
  name: TaxDocumentationKey;
6
6
  value?: string;
7
+ children?: React.ReactNode;
7
8
  };
8
- export declare const InputValue: ({ name, value }: InputValueProps) => React.JSX.Element;
9
+ export declare const InputValue: ({ name, value, children }: InputValueProps) => React.JSX.Element;
@@ -7,7 +7,6 @@ type ValueOption = {
7
7
  label?: string;
8
8
  };
9
9
  export type SelectProps = {
10
- prompt?: string;
11
10
  name: TaxDocumentationKey;
12
11
  options: ReadonlyArray<ValueOption>;
13
12
  addBlank?: boolean;
@@ -3,7 +3,12 @@ import { TaxDocumentation } from 'types/TaxDocumentation';
3
3
  export declare const getFieldsState: (fields: TaxDocumentation) => {
4
4
  hasNoEuTaxId: boolean;
5
5
  hasEuResidence: boolean;
6
- isBuildingDPS: boolean;
6
+ hasControllingPerson1: boolean;
7
+ hasControllingPerson2: boolean;
8
+ hasControllingPerson3: boolean;
9
+ hasControllingPerson4: boolean;
10
+ hasControllingPerson5: boolean;
11
+ requiresControllingPersons: boolean;
7
12
  isBuildingW9: boolean;
8
13
  isBuildingW8: boolean;
9
14
  isBuildingW8Ben: boolean;
@@ -14,7 +19,7 @@ export declare const getFieldsState: (fields: TaxDocumentation) => {
14
19
  isMakingTreatyClaim: boolean;
15
20
  isPartnership: boolean;
16
21
  residenceCountryCodes: string[];
17
- residences: {
22
+ getResidences: (prefix: "accountHolder" | "controllingPerson1" | "controllingPerson2" | "controllingPerson3" | "controllingPerson4" | "controllingPerson5") => {
18
23
  country: string | undefined;
19
24
  tin: string | undefined;
20
25
  tinNotRequired: "yes" | undefined;
@@ -1,3 +1,4 @@
1
+ import { QuestionnaireProp } from '../types';
1
2
  import { ClientTaxDocumentationStatus } from '../types/client';
2
3
 
3
- export declare const getFormStatus: (statusData: ClientTaxDocumentationStatus | undefined, questionnaire: string) => "COMPLETE" | "INCOMPLETE" | undefined;
4
+ export declare const getFormStatus: (statusData: ClientTaxDocumentationStatus | undefined, questionnaire: QuestionnaireProp) => "COMPLETE" | "INCOMPLETE" | undefined;
@@ -1,3 +1,3 @@
1
- import { Locale, Questionnaire } from '../types';
1
+ import { Locale, QuestionnaireProp } from '../types';
2
2
 
3
- export declare const getLanguage: (language: string | undefined, questionnaire: Questionnaire) => Locale;
3
+ export declare const getLanguage: (language: string | undefined, questionnaire: QuestionnaireProp) => Locale;
@@ -8,12 +8,12 @@ export * from './getHeaders';
8
8
  export * from './getLanguage';
9
9
  export * from './getMaskedContent';
10
10
  export * from './getMonthlyDayCount';
11
- export * from './getPromptKeyMap';
12
11
  export * from './getTreatyClaimDetails';
13
12
  export * from './handleFetch';
14
13
  export * from './isBlank';
15
14
  export * from './kebabCase';
16
15
  export * from './mergeClientTaxDocumentationData';
16
+ export * from './promptKeyMapping/getPromptKeyMap.ts';
17
17
  export * from './snakeCaseKeys';
18
18
  export * from './transformForClient';
19
19
  export * from './transformInbound';
@@ -0,0 +1,6 @@
1
+ import { PromptKey } from '../../i18n/types';
2
+ import { TaxDocumentation, TaxDocumentationKey } from '../../types';
3
+
4
+ type Prefix = 'accountHolder' | 'accountHolderMailing' | 'regardedOwner' | 'regardedOwnerMailing' | 'controllingPerson1' | 'controllingPerson1Mailing' | 'controllingPerson2' | 'controllingPerson2Mailing' | 'controllingPerson3' | 'controllingPerson3Mailing' | 'controllingPerson4' | 'controllingPerson4Mailing' | 'controllingPerson5' | 'controllingPerson5Mailing';
5
+ export declare const getAddressPromptKeyMap: (prefix: Prefix, data: TaxDocumentation) => { [key in TaxDocumentationKey]?: PromptKey; };
6
+ export {};
@@ -0,0 +1,4 @@
1
+ import { PromptKey } from '../../i18n/types';
2
+ import { TaxDocumentation, TaxDocumentationKey } from '../../types';
3
+
4
+ export declare const getControllingPersonsPromptKeyMap: (data: TaxDocumentation) => { [key in TaxDocumentationKey]?: PromptKey; };
@@ -0,0 +1,6 @@
1
+ import { PromptKey } from '../../i18n/types';
2
+ import { TaxDocumentation, TaxDocumentationKey } from '../../types';
3
+
4
+ type Prefix = 'accountHolder' | 'controllingPerson1' | 'controllingPerson2' | 'controllingPerson3' | 'controllingPerson4' | 'controllingPerson5';
5
+ export declare const getTaxResidencesPromptKeyMap: (data: TaxDocumentation, prefix: Prefix) => { [key in TaxDocumentationKey]?: PromptKey; };
6
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { ClientTaxDocumentation, SignedClientTaxDocumentation } from '@taxbit/utilities';
2
- import { Questionnaire, TaxDocumentation } from '../../types';
2
+ import { QuestionnaireProp, TaxDocumentation } from '../../types';
3
3
 
4
4
  export declare const transformForClient: (data: TaxDocumentation) => ClientTaxDocumentation;
5
- export declare const transformForSignedClient: (data: TaxDocumentation, questionnaire: Questionnaire) => SignedClientTaxDocumentation;
5
+ export declare const transformForSignedClient: (data: TaxDocumentation, questionnaireUI: QuestionnaireProp) => SignedClientTaxDocumentation;
@@ -1,34 +1,6 @@
1
1
  import { TaxDocumentation } from 'types';
2
2
 
3
- export declare const transformForClientAccountHolderAddress: (data: TaxDocumentation) => {
4
- city?: string;
5
- country?: string;
6
- stateOrProvince?: string;
7
- firstLine?: string;
8
- secondLine?: string;
9
- postalCode?: string;
10
- } | undefined;
11
- export declare const transformForClientRegardedOwnerAddress: (data: TaxDocumentation) => {
12
- city?: string;
13
- country?: string;
14
- stateOrProvince?: string;
15
- firstLine?: string;
16
- secondLine?: string;
17
- postalCode?: string;
18
- } | undefined;
19
- export declare const transformForClientAccountHolderMailingAddress: (data: TaxDocumentation) => {
20
- city?: string;
21
- country?: string;
22
- stateOrProvince?: string;
23
- firstLine?: string;
24
- secondLine?: string;
25
- postalCode?: string;
26
- } | undefined;
27
- export declare const transformForClientRegardedOwnerMailingAddress: (data: TaxDocumentation) => {
28
- city?: string;
29
- country?: string;
30
- stateOrProvince?: string;
31
- firstLine?: string;
32
- secondLine?: string;
33
- postalCode?: string;
34
- } | undefined;
3
+ export declare const transformForClientAccountHolderAddress: (data: TaxDocumentation) => import('@taxbit/utilities').ClientAddress | undefined;
4
+ export declare const transformForClientRegardedOwnerAddress: (data: TaxDocumentation) => import('@taxbit/utilities').ClientAddress | undefined;
5
+ export declare const transformForClientAccountHolderMailingAddress: (data: TaxDocumentation) => import('@taxbit/utilities').ClientAddress | undefined;
6
+ export declare const transformForClientRegardedOwnerMailingAddress: (data: TaxDocumentation) => import('@taxbit/utilities').ClientAddress | undefined;
@@ -0,0 +1,11 @@
1
+ import { TaxDocumentation } from 'types';
2
+
3
+ type Prefix = 'accountHolder' | 'controllingPerson1' | 'controllingPerson2' | 'controllingPerson3' | 'controllingPerson4' | 'controllingPerson5';
4
+ export declare const transformForClientTaxResidences: (data: TaxDocumentation, prefix: Prefix) => {
5
+ country: string | undefined;
6
+ tin: string | undefined;
7
+ tinNotRequired: boolean;
8
+ tinNotRequiredReason: string | undefined;
9
+ tinNotRequiredReasonOther: string | undefined;
10
+ }[] | undefined;
11
+ export {};
@@ -0,0 +1,4 @@
1
+ import { ControllingPerson } from '@taxbit/utilities';
2
+ import { TaxDocumentation } from '../../types';
3
+
4
+ export declare const transformForControllingPersons: (data: TaxDocumentation) => ControllingPerson[] | undefined;
@@ -0,0 +1,3 @@
1
+ import { ActiveNonFinancialEntityType } from '@taxbit/utilities';
2
+
3
+ export declare const getActiveNonFinancialEntityType: (entityType: string | undefined) => ActiveNonFinancialEntityType | undefined;
@@ -0,0 +1 @@
1
+ export declare const getCountryCode: (countryValue: string | undefined) => "AT" | "BE" | "BG" | "CY" | "CZ" | "DE" | "DK" | "EE" | "ES" | "FI" | "FR" | "GR" | "HR" | "HU" | "IE" | "IT" | "LT" | "LU" | "LV" | "MT" | "NL" | "PL" | "PT" | "RO" | "SE" | "SI" | "SK" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BF" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "DJ" | "DM" | "DO" | "DZ" | "EC" | "EG" | "EH" | "ER" | "ET" | "FJ" | "FK" | "FM" | "FO" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HT" | "ID" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PM" | "PN" | "PR" | "PS" | "PW" | "PY" | "QA" | "RE" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SG" | "SH" | "SJ" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW" | undefined;
@@ -0,0 +1,3 @@
1
+ import { EntityType } from '@taxbit/utilities';
2
+
3
+ export declare const getEntityType: (entityType: string | undefined) => EntityType | undefined;
@@ -0,0 +1,3 @@
1
+ import { FinancialInstitutionType } from '@taxbit/utilities';
2
+
3
+ export declare const getFinancialInstitutionType: (institutionType: string | undefined) => FinancialInstitutionType | undefined;
@@ -0,0 +1,3 @@
1
+ import { SelfCertificationAccountType } from '@taxbit/utilities';
2
+
3
+ export declare const getSelfCertificationAccountType: (accountType: string | undefined) => SelfCertificationAccountType | undefined;
@@ -1,4 +1,4 @@
1
- import { Questionnaire, TaxDocumentation } from 'types';
1
+ import { QuestionnaireProp, TaxDocumentation } from 'types';
2
2
  import { ClientTaxDocumentation } from '@taxbit/utilities';
3
3
 
4
- export declare const transformInbound: (data: ClientTaxDocumentation, questionnaire: Questionnaire, treatyClaims: boolean | undefined) => TaxDocumentation;
4
+ export declare const transformInbound: (data: ClientTaxDocumentation, questionnaire: QuestionnaireProp, treatyClaims: boolean | undefined) => TaxDocumentation;
@@ -0,0 +1,6 @@
1
+ import { ClientAddress } from '@taxbit/utilities';
2
+ import { TaxDocumentation } from '../../types';
3
+
4
+ type Prefix = 'accountHolder' | 'accountHolderMailing' | 'regardedOwner' | 'regardedOwnerMailing' | 'controllingPerson1' | 'controllingPerson1Mailing' | 'controllingPerson2' | 'controllingPerson2Mailing' | 'controllingPerson3' | 'controllingPerson3Mailing' | 'controllingPerson4' | 'controllingPerson4Mailing' | 'controllingPerson5' | 'controllingPerson5Mailing';
5
+ export declare const transformInboundAddress: (prefix: Prefix, address: ClientAddress | undefined) => Partial<TaxDocumentation>;
6
+ export {};