@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.
- package/README.md +13 -4
- package/dist/src/contexts/QuestionnaireStep/getLocal.d.ts +4 -3
- package/dist/src/contexts/QuestionnaireStep/shiftControllingPerson.d.ts +3 -0
- package/dist/src/contexts/QuestionnaireStep/shiftResidence.d.ts +1 -1
- package/dist/src/contexts/QuestionnaireStep/useQuestionnaireStep.d.ts +2 -1
- package/dist/src/contexts/QuestionnaireStep/useQuestionnaireStepContext.d.ts +4 -2
- package/dist/src/contexts/TaxDocumentation/useTaxDocumentation.d.ts +5 -5
- package/dist/src/contexts/TaxDocumentation/useTaxDocumentationContext.d.ts +6 -6
- package/dist/src/hooks/useTaxbit/useTaxbit.d.ts +2 -2
- package/dist/src/hooks/useTaxbit/useTaxbitStatus.d.ts +2 -2
- package/dist/src/i18n/locales/de.d.ts +2 -2
- package/dist/src/i18n/locales/el.d.ts +2 -2
- package/dist/src/i18n/locales/ga.d.ts +1 -3
- package/dist/src/i18n/locales/lt.d.ts +2 -2
- package/dist/src/i18n/locales/pl.d.ts +2 -2
- package/dist/src/i18n/types/LocalizationKey.d.ts +6 -6
- package/dist/src/i18n/types/PropertyFile.d.ts +15 -14
- package/dist/src/index.d.ts +2 -2
- package/dist/src/lookups/activeNonFinancialEntityTypeOptions.d.ts +3 -0
- package/dist/src/lookups/controllingPersonRoleOptions.d.ts +3 -0
- package/dist/src/lookups/entityTypeOptions.d.ts +3 -0
- package/dist/src/lookups/financialInstitutionTypeOptions.d.ts +3 -0
- package/dist/src/lookups/index.d.ts +7 -0
- package/dist/src/lookups/payeeCodeOptions.d.ts +1 -1
- package/dist/src/lookups/selfCertificationAccountTypeOptions.d.ts +3 -0
- package/dist/src/lookups/signatureCapacityOptions.d.ts +3 -0
- package/dist/src/lookups/tinNotRequiredReasonOptions.d.ts +3 -0
- package/dist/src/services/api.d.ts +5 -2
- package/dist/src/services/msw.d.ts +33 -0
- package/dist/src/test/Wrapper.d.ts +2 -2
- package/dist/src/test/getWrapper.d.ts +2 -2
- package/dist/src/test/utils/helpers.d.ts +10 -0
- package/dist/src/types/InputStep.d.ts +1 -1
- package/dist/src/types/QuestionnaireProp.d.ts +1 -0
- package/dist/src/types/StepId.d.ts +1 -1
- package/dist/src/types/TaxDocumentation.d.ts +87 -50
- package/dist/src/types/client/ClientTaxDocumentationStatus.d.ts +4 -0
- package/dist/src/types/index.d.ts +1 -1
- package/dist/src/types/server/TaxDocumentationStatus.d.ts +4 -0
- package/dist/src/ui/InputValue/InputValue.d.ts +2 -1
- package/dist/src/ui/Select/Select.d.ts +0 -1
- package/dist/src/utils/getFieldsState.d.ts +7 -2
- package/dist/src/utils/getFormStatus.d.ts +2 -1
- package/dist/src/utils/getLanguage.d.ts +2 -2
- package/dist/src/utils/index.d.ts +1 -1
- package/dist/src/utils/promptKeyMapping/getAddressPromptKeyMap.d.ts +6 -0
- package/dist/src/utils/promptKeyMapping/getControllingPersonPromptKeyMap.d.ts +4 -0
- package/dist/src/utils/promptKeyMapping/getTaxResidencesPromptKeyMap.d.ts +6 -0
- package/dist/src/utils/transformForClient/transformForClient.d.ts +2 -2
- package/dist/src/utils/transformForClient/transformForClientAddress.d.ts +4 -32
- package/dist/src/utils/transformForClient/transformForClientTaxResidences.d.ts +11 -0
- package/dist/src/utils/transformForClient/transformForControllingPersons.d.ts +4 -0
- package/dist/src/utils/transformInbound/getActiveNonFinancialEntityType.d.ts +3 -0
- package/dist/src/utils/transformInbound/getCountryCode.d.ts +1 -0
- package/dist/src/utils/transformInbound/getEntityType.d.ts +3 -0
- package/dist/src/utils/transformInbound/getFinancialInstitutionType.d.ts +3 -0
- package/dist/src/utils/transformInbound/getSelfCertificationAccountType.d.ts +3 -0
- package/dist/src/utils/transformInbound/transformInbound.d.ts +2 -2
- package/dist/src/utils/transformInbound/transformInboundAddress.d.ts +6 -0
- package/dist/src/utils/transformInbound/transformInboundControllingPersons.d.ts +440 -0
- package/dist/src/utils/transformInbound/transformInboundTaxResidencies.d.ts +7 -0
- package/dist/src/validations/getSteps.d.ts +2 -2
- package/dist/src/validations/index.d.ts +5 -5
- package/dist/src/validations/invalidFields/getInvalidAddressFields.d.ts +5 -0
- package/dist/src/validations/invalidFields/getInvalidControllingPersonsFields.d.ts +3 -0
- package/dist/src/validations/invalidFields/getInvalidFields.d.ts +5 -0
- package/dist/src/validations/invalidFields/getInvalidTaxResidencyFields.d.ts +5 -0
- package/dist/src/validations/{invalidFieldRules.d.ts → invalidFields/invalidFieldRules.d.ts} +1 -1
- package/dist/src/validations/requiredFields/getRequiredAddressFields.d.ts +7 -0
- package/dist/src/validations/requiredFields/getRequiredControllingPersonFields.d.ts +4 -0
- package/dist/src/validations/requiredFields/getRequiredFields.d.ts +4 -0
- package/dist/src/validations/requiredFields/getRequiredTaxResidenceFields.d.ts +7 -0
- package/dist/src/validations/supportedFields/__tests__/generateStrings.d.ts +5 -0
- package/dist/src/validations/supportedFields/getSupportedAddressFields.d.ts +8 -0
- package/dist/src/validations/supportedFields/getSupportedControllingPersonFields.d.ts +7 -0
- package/dist/src/validations/supportedFields/getSupportedFields.d.ts +4 -0
- package/dist/src/validations/supportedFields/getSupportedTaxResidenceFields.d.ts +8 -0
- package/dist/src/validations/supportedFields/getSupportedTreatyClaimFields.d.ts +3 -0
- package/dist/src/validations/visibleFields/getVisibleAddressFields.d.ts +5 -0
- package/dist/src/validations/visibleFields/getVisibleControllingPersonFields.d.ts +4 -0
- package/dist/src/validations/visibleFields/getVisibleFields.d.ts +4 -0
- package/dist/src/validations/visibleFields/getVisibleTaxResidenceFields.d.ts +9 -0
- package/dist/src/{entry → widgets}/TaxbitQuestionnaire/TaxbitQuestionnaire.d.ts +3 -3
- package/dist/src/widgets/TaxbitQuestionnairePersist/useTaxbitPersist.d.ts +2 -2
- package/dist/src/wizard/AddressInput/AddressInput.d.ts +1 -1
- package/dist/src/wizard/ControllingPersonInput/ControllingPersonInput.d.ts +11 -0
- package/dist/src/wizard/ControllingPersonInput/index.d.ts +1 -0
- package/dist/src/wizard/LanguageSelector/LanguageSelector.d.ts +2 -2
- package/dist/src/wizard/ResidenceInput/ResidenceInput.d.ts +2 -1
- package/dist/src/wizard/RowInput/AddressRow/AddressRow.d.ts +1 -1
- package/dist/src/wizard/RowInput/PercentInputRow/PercentInputRow.d.ts +9 -0
- package/dist/src/wizard/RowInput/PercentInputRow/index.d.ts +1 -0
- package/dist/src/wizard/RowInput/SelectRow/SelectRow.d.ts +2 -1
- package/dist/src/wizard/RowInput/index.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/ControllingPersonDetails/ControllingPersonDetails.d.ts +7 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/ControllingPersonDetails/index.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/AccountHolder/AccountHolderClassificationSummary.d.ts +3 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/AccountHolder/AccountHolderForeignClassificationSummary.d.ts +6 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/AccountHolder/AccountHolderSelfCertificationClassificationSummary.d.ts +6 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/AccountHolder/AccountHolderUsClassificationSummary.d.ts +6 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/ControllingPerson/ControllingPersonRoleInputValue.d.ts +7 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/ControllingPerson/ControllingPersonSummary.d.ts +7 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/ControllingPerson/ControllingPersonTypeSummary.d.ts +7 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/RegardedOwner/RegardedOwnerClassificationSummary.d.ts +3 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/RegardedOwner/RegardedOwnerForeignClassificationSummary.d.ts +6 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/RegardedOwner/RegardedOwnerUsClassificationSummary.d.ts +6 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/TaxResidency/TaxResidenciesSummary.d.ts +11 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitQuestionnaireUI.SelfCert.AccountClassification.test.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitQuestionnaireUI.SelfCert.ControllingPerson.test.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitQuestionnaireUI.SelfCert.NameAndAddress.test.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitQuestionnaireUI.SelfCert.Summary.test.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitQuestionnaireUI.SelfCert.TaxResidencies.test.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/steps.d.ts +1 -0
- package/dist/taxbit-react-sdk.js +7466 -4608
- package/dist/taxbit-react-sdk.umd.cjs +1 -1
- package/package.json +7 -6
- package/style/basic.css +4 -0
- package/style/inline.css +1 -0
- package/dist/src/types/Questionnaire.d.ts +0 -1
- package/dist/src/utils/transformForClient/transformForClientTaxResidenceFields.d.ts +0 -7
- package/dist/src/validations/getInvalidFields.d.ts +0 -5
- package/dist/src/validations/getRequiredFields.d.ts +0 -4
- package/dist/src/validations/getSupportedFields.d.ts +0 -7
- package/dist/src/validations/getVisibleFields.d.ts +0 -4
- /package/dist/src/utils/{getPromptKeyMap.d.ts → promptKeyMapping/getPromptKeyMap.d.ts} +0 -0
- /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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
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 {};
|
|
@@ -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 './
|
|
5
|
+
export * from './QuestionnaireProp.ts';
|
|
6
6
|
export * from './TaxDocumentation';
|
|
7
7
|
export * from './Utilities';
|
|
8
8
|
export * from './Yes';
|
|
@@ -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;
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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:
|
|
4
|
+
export declare const getFormStatus: (statusData: ClientTaxDocumentationStatus | undefined, questionnaire: QuestionnaireProp) => "COMPLETE" | "INCOMPLETE" | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Locale,
|
|
1
|
+
import { Locale, QuestionnaireProp } from '../types';
|
|
2
2
|
|
|
3
|
-
export declare const getLanguage: (language: string | undefined, questionnaire:
|
|
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,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 {
|
|
2
|
+
import { QuestionnaireProp, TaxDocumentation } from '../../types';
|
|
3
3
|
|
|
4
4
|
export declare const transformForClient: (data: TaxDocumentation) => ClientTaxDocumentation;
|
|
5
|
-
export declare const transformForSignedClient: (data: TaxDocumentation,
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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 @@
|
|
|
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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QuestionnaireProp, TaxDocumentation } from 'types';
|
|
2
2
|
import { ClientTaxDocumentation } from '@taxbit/utilities';
|
|
3
3
|
|
|
4
|
-
export declare const transformInbound: (data: ClientTaxDocumentation, questionnaire:
|
|
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 {};
|