@taxbit/react-sdk 1.1.0-beta.0 → 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 +17 -4
- package/dist/src/components/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/dist/src/components/Section/Section.d.ts +1 -1
- package/dist/src/contexts/QuestionnaireStep/getLocal.d.ts +5 -4
- 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 +3 -2
- package/dist/src/contexts/QuestionnaireStep/useQuestionnaireStepContext.d.ts +6 -4
- 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/countryOptions.d.ts +0 -4
- package/dist/src/lookups/entityTypeOptions.d.ts +3 -0
- package/dist/src/lookups/financialInstitutionTypeOptions.d.ts +3 -0
- package/dist/src/lookups/getTreatyCountryLimitationOnBenefitOptions.d.ts +9 -0
- package/dist/src/lookups/index.d.ts +8 -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/lookups/typeOfIncomeOptions.d.ts +0 -2
- 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 -2
- 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/getForeignAccountType.d.ts +3 -2
- package/dist/src/utils/transformInbound/getSelfCertificationAccountType.d.ts +3 -0
- package/dist/src/utils/transformInbound/getUsAccountType.d.ts +3 -2
- 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/TaxbitQuestionnairePersist.d.ts +1 -1
- 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 +9568 -7323
- package/dist/taxbit-react-sdk.umd.cjs +1 -30
- package/package.json +12 -11
- package/style/basic.css +4 -0
- package/style/inline.css +1 -0
- package/dist/src/lookups/treatyCountries.json.d.ts +0 -2195
- package/dist/src/types/Questionnaire.d.ts +0 -1
- package/dist/src/utils/getTreatyCountry.d.ts +0 -38
- 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
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ A React component and hook for gathering Tax Documentation data for US and EU Ta
|
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
|
-
The Taxbit React SDK provides a React component, hook, and Typescript types for gathering tax documentation data from users. The component can be used to collect data for the Taxbit DPS (Digital Platform Sales)
|
|
7
|
+
The Taxbit React SDK provides a React component, hook, and Typescript types for gathering tax documentation data from users. The component can be used to collect data for the Taxbit DPS (Digital Platform Sales), W-Form (W-9, W-8BEN, W-8BEN-E), or Self-certification (DAC8, CARF) tax documentation forms. A hook provides additional tools to understand the user's tax documentation status and download any digital versions of the tax form files that are created if that are available.
|
|
8
8
|
|
|
9
9
|
DPS (Digital Platform Sales) is a data standard and UI flow used by Taxbit to gather the information needed to report income as directed by the DAC7 for the European Union, and equivalent reporting requirements in Canada, New Zealand, and the United Kingdom.
|
|
10
10
|
|
|
@@ -179,6 +179,10 @@ type ClientTaxDocumentationStatus = {
|
|
|
179
179
|
tinValidationDate?: string;
|
|
180
180
|
needsResubmission: boolean;
|
|
181
181
|
};
|
|
182
|
+
selfCertification?: {
|
|
183
|
+
dataCollectionStatus: 'COMPLETE' | 'INCOMPLETE';
|
|
184
|
+
needsResubmission: boolean;
|
|
185
|
+
};
|
|
182
186
|
};
|
|
183
187
|
```
|
|
184
188
|
|
|
@@ -313,14 +317,23 @@ type Progress = {
|
|
|
313
317
|
```
|
|
314
318
|
|
|
315
319
|
```typescript
|
|
316
|
-
type QuestionnaireType = 'DPS' | 'W-FORM';
|
|
320
|
+
type QuestionnaireType = 'DPS' | 'W-FORM' | 'SELF-CERT';
|
|
317
321
|
```
|
|
318
322
|
|
|
319
323
|
## Changelog
|
|
320
324
|
|
|
325
|
+
### Version 1.2.0-beta.0
|
|
326
|
+
|
|
327
|
+
1. Self-Certification support
|
|
328
|
+
|
|
329
|
+
### Version 1.1.0-beta.1
|
|
330
|
+
|
|
331
|
+
1. Small bug fixes related to mailing address and using enter key to submit.
|
|
332
|
+
2. React 19 Support.
|
|
333
|
+
|
|
321
334
|
### Version 1.1.0-beta.0
|
|
322
335
|
|
|
323
|
-
1. Treaty Claims
|
|
336
|
+
1. Treaty Claims Support on W-Forms.
|
|
324
337
|
|
|
325
338
|
### Version 1.0.0-beta.8
|
|
326
339
|
|
|
@@ -429,7 +442,7 @@ type QuestionnaireType = 'DPS' | 'W-FORM';
|
|
|
429
442
|
|
|
430
443
|
### Version 0.2.1
|
|
431
444
|
|
|
432
|
-
1. The SDK now supports React versions 16, 17,
|
|
445
|
+
1. The SDK now supports React versions 16, 17, 18 and TypeScript versions 4 and 5.
|
|
433
446
|
|
|
434
447
|
### Version 0.2.0
|
|
435
448
|
|
|
@@ -12,6 +12,6 @@ export declare class ErrorBoundary extends Component<Props, State> {
|
|
|
12
12
|
static getDerivedStateFromError(error: Error): State;
|
|
13
13
|
componentDidCatch(error: Error): void;
|
|
14
14
|
componentDidUpdate(): void;
|
|
15
|
-
render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
15
|
+
render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
|
|
16
16
|
}
|
|
17
17
|
export {};
|
|
@@ -7,5 +7,5 @@ type SectionProps = {
|
|
|
7
7
|
action?: React.ReactNode;
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
};
|
|
10
|
-
export declare const Section: ({ title, subTitle, showIf, children, action, }: SectionProps) => string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
10
|
+
export declare const Section: ({ title, subTitle, showIf, children, action, }: SectionProps) => string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
|
|
11
11
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ButtonKey, ErrorKey, PromptKey, SubPromptKey, SubTitleKey, TextKey } from '../../i18n/types';
|
|
2
|
-
import { Locale, TaxDocumentation, TaxDocumentationKey } from '../../types';
|
|
2
|
+
import { Locale, QuestionnaireProp, TaxDocumentation, TaxDocumentationKey } from '../../types';
|
|
3
3
|
|
|
4
|
-
export declare const getLocal: (fields: TaxDocumentation, language: Locale) => {
|
|
4
|
+
export declare const getLocal: (fields: TaxDocumentation, language: Locale, questionnaire: QuestionnaireProp) => {
|
|
5
5
|
getLocalText: (key: TextKey) => string;
|
|
6
6
|
getLocalTitle: (key: string) => string;
|
|
7
7
|
getLocalSubTitle: (key: SubTitleKey) => string;
|
|
@@ -9,12 +9,13 @@ export declare const getLocal: (fields: TaxDocumentation, language: Locale) => {
|
|
|
9
9
|
getLocalButton: (key: ButtonKey) => string;
|
|
10
10
|
getLocalPrompt: (key: string) => string;
|
|
11
11
|
getLocalSubPrompt: (key: TaxDocumentationKey) => string;
|
|
12
|
-
getLocalOption: (key: string | undefined) => string | undefined;
|
|
12
|
+
getLocalOption: (key: string | undefined, prefix?: string) => string | undefined;
|
|
13
13
|
getLocalSubOption: (key: string | undefined) => string | undefined;
|
|
14
14
|
getLocalCountry: (key: string | undefined) => string;
|
|
15
|
-
getLocalUsState: (key: string | undefined) => "" | "
|
|
15
|
+
getLocalUsState: (key: string | undefined) => "" | "Alabama" | "Alaska" | "Arizona" | "Arkansas" | "California" | "Colorado" | "Connecticut" | "Delaware" | "District Of Columbia" | "Florida" | "Georgia" | "Hawaii" | "Idaho" | "Illinois" | "Indiana" | "Iowa" | "Kansas" | "Kentucky" | "Louisiana" | "Maine" | "Maryland" | "Massachusetts" | "Michigan" | "Minnesota" | "Mississippi" | "Missouri" | "Montana" | "Nebraska" | "Nevada" | "New Hampshire" | "New Jersey" | "New Mexico" | "New York" | "North Carolina" | "North Dakota" | "Ohio" | "Oklahoma" | "Oregon" | "Pennsylvania" | "Rhode Island" | "South Carolina" | "South Dakota" | "Tennessee" | "Texas" | "Utah" | "Vermont" | "Virginia" | "Washington" | "West Virginia" | "Wisconsin" | "Wyoming";
|
|
16
16
|
getLocalCaProvince: (key: string | undefined) => string;
|
|
17
17
|
getLocalMonth: (key: string | undefined) => string;
|
|
18
|
+
getLocalAddressTitle: (data: TaxDocumentation) => string;
|
|
18
19
|
getPromptKey: (key: string) => PromptKey;
|
|
19
20
|
getSubPromptKey: (key: string) => SubPromptKey;
|
|
20
21
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TaxDocumentation } from '../../types';
|
|
2
2
|
|
|
3
|
-
export declare const shiftResidence: (fields: TaxDocumentation,
|
|
3
|
+
export declare const shiftResidence: (fields: TaxDocumentation, prefix: string, index: string) => TaxDocumentation;
|
|
@@ -16,12 +16,13 @@ export declare const useQuestionnaireStep: () => {
|
|
|
16
16
|
getLocalButton: (key: import('i18n/types').ButtonKey) => string;
|
|
17
17
|
getLocalPrompt: (key: string) => string;
|
|
18
18
|
getLocalSubPrompt: (key: TaxDocumentationKey) => string;
|
|
19
|
-
getLocalOption: (key: string | undefined) => string | undefined;
|
|
19
|
+
getLocalOption: (key: string | undefined, prefix?: string) => string | undefined;
|
|
20
20
|
getLocalSubOption: (key: string | undefined) => string | undefined;
|
|
21
21
|
getLocalCountry: (key: string | undefined) => string;
|
|
22
|
-
getLocalUsState: (key: string | undefined) => "" | "
|
|
22
|
+
getLocalUsState: (key: string | undefined) => "" | "Alabama" | "Alaska" | "Arizona" | "Arkansas" | "California" | "Colorado" | "Connecticut" | "Delaware" | "District Of Columbia" | "Florida" | "Georgia" | "Hawaii" | "Idaho" | "Illinois" | "Indiana" | "Iowa" | "Kansas" | "Kentucky" | "Louisiana" | "Maine" | "Maryland" | "Massachusetts" | "Michigan" | "Minnesota" | "Mississippi" | "Missouri" | "Montana" | "Nebraska" | "Nevada" | "New Hampshire" | "New Jersey" | "New Mexico" | "New York" | "North Carolina" | "North Dakota" | "Ohio" | "Oklahoma" | "Oregon" | "Pennsylvania" | "Rhode Island" | "South Carolina" | "South Dakota" | "Tennessee" | "Texas" | "Utah" | "Vermont" | "Virginia" | "Washington" | "West Virginia" | "Wisconsin" | "Wyoming";
|
|
23
23
|
getLocalCaProvince: (key: string | undefined) => string;
|
|
24
24
|
getLocalMonth: (key: string | undefined) => string;
|
|
25
|
+
getLocalAddressTitle: (data: TaxDocumentation) => string;
|
|
25
26
|
getPromptKey: (key: string) => import('i18n/types').PromptKey;
|
|
26
27
|
getSubPromptKey: (key: string) => import('i18n/types').SubPromptKey;
|
|
27
28
|
clearIfNotRequired: (...arg: TaxDocumentationKey[]) => (value: Yes | undefined) => void;
|
|
@@ -6,12 +6,13 @@ export declare const useQuestionnaireStepContext: () => {
|
|
|
6
6
|
getLocalButton: (key: import('../../i18n/types/LocalizationKey.ts').ButtonKey) => string;
|
|
7
7
|
getLocalPrompt: (key: string) => string;
|
|
8
8
|
getLocalSubPrompt: (key: import('../../types/TaxDocumentation.ts').TaxDocumentationKey) => string;
|
|
9
|
-
getLocalOption: (key: string | undefined) => string | undefined;
|
|
9
|
+
getLocalOption: (key: string | undefined, prefix?: string) => string | undefined;
|
|
10
10
|
getLocalSubOption: (key: string | undefined) => string | undefined;
|
|
11
11
|
getLocalCountry: (key: string | undefined) => string;
|
|
12
|
-
getLocalUsState: (key: string | undefined) => "" | "
|
|
12
|
+
getLocalUsState: (key: string | undefined) => "" | "Alabama" | "Alaska" | "Arizona" | "Arkansas" | "California" | "Colorado" | "Connecticut" | "Delaware" | "District Of Columbia" | "Florida" | "Georgia" | "Hawaii" | "Idaho" | "Illinois" | "Indiana" | "Iowa" | "Kansas" | "Kentucky" | "Louisiana" | "Maine" | "Maryland" | "Massachusetts" | "Michigan" | "Minnesota" | "Mississippi" | "Missouri" | "Montana" | "Nebraska" | "Nevada" | "New Hampshire" | "New Jersey" | "New Mexico" | "New York" | "North Carolina" | "North Dakota" | "Ohio" | "Oklahoma" | "Oregon" | "Pennsylvania" | "Rhode Island" | "South Carolina" | "South Dakota" | "Tennessee" | "Texas" | "Utah" | "Vermont" | "Virginia" | "Washington" | "West Virginia" | "Wisconsin" | "Wyoming";
|
|
13
13
|
getLocalCaProvince: (key: string | undefined) => string;
|
|
14
14
|
getLocalMonth: (key: string | undefined) => string;
|
|
15
|
+
getLocalAddressTitle: (data: import('../../types/TaxDocumentation.ts').TaxDocumentation) => string;
|
|
15
16
|
getPromptKey: (key: string) => import('../../i18n/types/LocalizationKey.ts').PromptKey;
|
|
16
17
|
getSubPromptKey: (key: string) => import('../../i18n/types/LocalizationKey.ts').SubPromptKey;
|
|
17
18
|
clearIfNotRequired: (...arg: import('../../types/TaxDocumentation.ts').TaxDocumentationKey[]) => (value: import('../../types/Yes.ts').Yes | undefined) => void;
|
|
@@ -37,12 +38,13 @@ export declare const useQuestionnaireStepContext: () => {
|
|
|
37
38
|
getLocalButton: (key: import('../../i18n/types/LocalizationKey.ts').ButtonKey) => string;
|
|
38
39
|
getLocalPrompt: (key: string) => string;
|
|
39
40
|
getLocalSubPrompt: (key: import('../../types/TaxDocumentation.ts').TaxDocumentationKey) => string;
|
|
40
|
-
getLocalOption: (key: string | undefined) => string | undefined;
|
|
41
|
+
getLocalOption: (key: string | undefined, prefix?: string) => string | undefined;
|
|
41
42
|
getLocalSubOption: (key: string | undefined) => string | undefined;
|
|
42
43
|
getLocalCountry: (key: string | undefined) => string;
|
|
43
|
-
getLocalUsState: (key: string | undefined) => "" | "
|
|
44
|
+
getLocalUsState: (key: string | undefined) => "" | "Alabama" | "Alaska" | "Arizona" | "Arkansas" | "California" | "Colorado" | "Connecticut" | "Delaware" | "District Of Columbia" | "Florida" | "Georgia" | "Hawaii" | "Idaho" | "Illinois" | "Indiana" | "Iowa" | "Kansas" | "Kentucky" | "Louisiana" | "Maine" | "Maryland" | "Massachusetts" | "Michigan" | "Minnesota" | "Mississippi" | "Missouri" | "Montana" | "Nebraska" | "Nevada" | "New Hampshire" | "New Jersey" | "New Mexico" | "New York" | "North Carolina" | "North Dakota" | "Ohio" | "Oklahoma" | "Oregon" | "Pennsylvania" | "Rhode Island" | "South Carolina" | "South Dakota" | "Tennessee" | "Texas" | "Utah" | "Vermont" | "Virginia" | "Washington" | "West Virginia" | "Wisconsin" | "Wyoming";
|
|
44
45
|
getLocalCaProvince: (key: string | undefined) => string;
|
|
45
46
|
getLocalMonth: (key: string | undefined) => string;
|
|
47
|
+
getLocalAddressTitle: (data: import('../../types/TaxDocumentation.ts').TaxDocumentation) => string;
|
|
46
48
|
getPromptKey: (key: string) => import('../../i18n/types/LocalizationKey.ts').PromptKey;
|
|
47
49
|
getSubPromptKey: (key: string) => import('../../i18n/types/LocalizationKey.ts').SubPromptKey;
|
|
48
50
|
clearIfNotRequired: (...arg: import('../../types/TaxDocumentation.ts').TaxDocumentationKey[]) => (value: import('../../types/Yes.ts').Yes | undefined) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ClientTaxDocumentation } from '@taxbit/utilities';
|
|
2
|
-
import { InputStep, Locale, Progress,
|
|
2
|
+
import { InputStep, Locale, Progress, QuestionnaireProp, TaxDocumentation } from 'types';
|
|
3
3
|
import { ExternalValidations } from 'types/client';
|
|
4
4
|
|
|
5
5
|
type InterviewConfig = {
|
|
@@ -12,7 +12,7 @@ export type UseTaxDocumentationProps = {
|
|
|
12
12
|
onSubmit?: (data: ClientTaxDocumentation) => void | Promise<void>;
|
|
13
13
|
onProgress?: (progress: Progress) => void | Promise<void>;
|
|
14
14
|
step?: InputStep;
|
|
15
|
-
questionnaire:
|
|
15
|
+
questionnaire: QuestionnaireProp;
|
|
16
16
|
config?: InterviewConfig;
|
|
17
17
|
treatyClaims?: boolean;
|
|
18
18
|
};
|
|
@@ -25,13 +25,13 @@ export declare const useTaxDocumentation: ({ data: startingData, language: initi
|
|
|
25
25
|
goBack: (() => void) | undefined;
|
|
26
26
|
goToNext: (data: TaxDocumentation) => void;
|
|
27
27
|
progress: Progress | undefined;
|
|
28
|
-
stepName: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "AccountHolderTreatyClaims" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "RegardedOwnerTreatyClaims" | "Summary" | "W8imyInstructions";
|
|
28
|
+
stepName: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "AccountHolderTreatyClaims" | "ControllingPersonDetails1" | "ControllingPersonDetails2" | "ControllingPersonDetails3" | "ControllingPersonDetails4" | "ControllingPersonDetails5" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "RegardedOwnerTreatyClaims" | "Summary" | "W8imyInstructions";
|
|
29
29
|
data: TaxDocumentation;
|
|
30
30
|
originalClientData: TaxDocumentation;
|
|
31
|
-
initialStep: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "AccountHolderTreatyClaims" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "RegardedOwnerTreatyClaims" | "Summary" | "W8imyInstructions";
|
|
31
|
+
initialStep: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "AccountHolderTreatyClaims" | "ControllingPersonDetails1" | "ControllingPersonDetails2" | "ControllingPersonDetails3" | "ControllingPersonDetails4" | "ControllingPersonDetails5" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "RegardedOwnerTreatyClaims" | "Summary" | "W8imyInstructions";
|
|
32
32
|
setLanguage: (lang: Locale) => void;
|
|
33
33
|
language: Locale;
|
|
34
|
-
questionnaire:
|
|
34
|
+
questionnaire: QuestionnaireProp;
|
|
35
35
|
externalValidations: ExternalValidations | undefined;
|
|
36
36
|
config: InterviewConfig | undefined;
|
|
37
37
|
isSubmitting: boolean;
|
|
@@ -7,13 +7,13 @@ export declare const useTaxDocumentationContext: () => {
|
|
|
7
7
|
goBack: (() => void) | undefined;
|
|
8
8
|
goToNext: (data: import('../../types').TaxDocumentation) => void;
|
|
9
9
|
progress: import('../..').Progress | undefined;
|
|
10
|
-
stepName: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "AccountHolderTreatyClaims" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "RegardedOwnerTreatyClaims" | "Summary" | "W8imyInstructions";
|
|
10
|
+
stepName: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "AccountHolderTreatyClaims" | "ControllingPersonDetails1" | "ControllingPersonDetails2" | "ControllingPersonDetails3" | "ControllingPersonDetails4" | "ControllingPersonDetails5" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "RegardedOwnerTreatyClaims" | "Summary" | "W8imyInstructions";
|
|
11
11
|
data: import('../../types').TaxDocumentation;
|
|
12
12
|
originalClientData: import('../../types').TaxDocumentation;
|
|
13
|
-
initialStep: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "AccountHolderTreatyClaims" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "RegardedOwnerTreatyClaims" | "Summary" | "W8imyInstructions";
|
|
13
|
+
initialStep: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "AccountHolderTreatyClaims" | "ControllingPersonDetails1" | "ControllingPersonDetails2" | "ControllingPersonDetails3" | "ControllingPersonDetails4" | "ControllingPersonDetails5" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "RegardedOwnerTreatyClaims" | "Summary" | "W8imyInstructions";
|
|
14
14
|
setLanguage: (lang: import('../..').Locale) => void;
|
|
15
15
|
language: import('../..').Locale;
|
|
16
|
-
questionnaire: import('../..').
|
|
16
|
+
questionnaire: import('../..').QuestionnaireProp;
|
|
17
17
|
externalValidations: import('../../types/client').ExternalValidations | undefined;
|
|
18
18
|
config: {
|
|
19
19
|
minimumAge: number;
|
|
@@ -29,13 +29,13 @@ export declare const useTaxDocumentationContext: () => {
|
|
|
29
29
|
goBack: (() => void) | undefined;
|
|
30
30
|
goToNext: (data: import('../../types').TaxDocumentation) => void;
|
|
31
31
|
progress: import('../..').Progress | undefined;
|
|
32
|
-
stepName: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "AccountHolderTreatyClaims" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "RegardedOwnerTreatyClaims" | "Summary" | "W8imyInstructions";
|
|
32
|
+
stepName: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "AccountHolderTreatyClaims" | "ControllingPersonDetails1" | "ControllingPersonDetails2" | "ControllingPersonDetails3" | "ControllingPersonDetails4" | "ControllingPersonDetails5" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "RegardedOwnerTreatyClaims" | "Summary" | "W8imyInstructions";
|
|
33
33
|
data: import('../../types').TaxDocumentation;
|
|
34
34
|
originalClientData: import('../../types').TaxDocumentation;
|
|
35
|
-
initialStep: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "AccountHolderTreatyClaims" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "RegardedOwnerTreatyClaims" | "Summary" | "W8imyInstructions";
|
|
35
|
+
initialStep: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "AccountHolderTreatyClaims" | "ControllingPersonDetails1" | "ControllingPersonDetails2" | "ControllingPersonDetails3" | "ControllingPersonDetails4" | "ControllingPersonDetails5" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "RegardedOwnerTreatyClaims" | "Summary" | "W8imyInstructions";
|
|
36
36
|
setLanguage: (lang: import('../..').Locale) => void;
|
|
37
37
|
language: import('../..').Locale;
|
|
38
|
-
questionnaire: import('../..').
|
|
38
|
+
questionnaire: import('../..').QuestionnaireProp;
|
|
39
39
|
externalValidations: import('../../types/client').ExternalValidations | undefined;
|
|
40
40
|
config: {
|
|
41
41
|
minimumAge: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QuestionnaireProp } from 'types';
|
|
2
2
|
|
|
3
3
|
type UseTaxbitProps = {
|
|
4
4
|
bearerToken: string;
|
|
5
|
-
questionnaire:
|
|
5
|
+
questionnaire: QuestionnaireProp;
|
|
6
6
|
staging?: boolean;
|
|
7
7
|
onError?: (error: Error) => void | Promise<void>;
|
|
8
8
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SignedClientTaxDocumentation } from '@taxbit/utilities';
|
|
2
|
-
import {
|
|
2
|
+
import { QuestionnaireProp } from '../../types';
|
|
3
3
|
import { ClientTaxDocumentationStatus } from '../../types/client';
|
|
4
4
|
|
|
5
5
|
type UseTaxbitStatusProps = {
|
|
6
6
|
bearerToken?: string;
|
|
7
7
|
onError?: (error: Error) => void | Promise<void>;
|
|
8
|
-
questionnaire:
|
|
8
|
+
questionnaire: QuestionnaireProp;
|
|
9
9
|
staging?: boolean;
|
|
10
10
|
};
|
|
11
11
|
export declare const useTaxbitStatus: ({ bearerToken, questionnaire, staging, onError, }: UseTaxbitStatusProps) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ForeignPropertyFile } from '../types/PropertyFile';
|
|
2
2
|
|
|
3
|
-
export declare const deTranslations:
|
|
3
|
+
export declare const deTranslations: ForeignPropertyFile;
|
|
4
4
|
export declare const de: import('../types/PropertyFile').PropertyFile;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ForeignPropertyFile } from '../types/PropertyFile';
|
|
2
2
|
|
|
3
|
-
export declare const elTranslations:
|
|
3
|
+
export declare const elTranslations: ForeignPropertyFile;
|
|
4
4
|
export declare const el: import('../types/PropertyFile').PropertyFile;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ForeignPropertyFile } from '../types/PropertyFile';
|
|
2
2
|
|
|
3
|
-
export declare const ltTranslations:
|
|
3
|
+
export declare const ltTranslations: ForeignPropertyFile;
|
|
4
4
|
export declare const lt: import('../types/PropertyFile').PropertyFile;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ForeignPropertyFile } from '../types/PropertyFile';
|
|
2
2
|
|
|
3
|
-
export declare const plTranslations:
|
|
3
|
+
export declare const plTranslations: ForeignPropertyFile;
|
|
4
4
|
export declare const pl: import('../types/PropertyFile').PropertyFile;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export type ButtonKey = 'edit' | 'back' | 'next' | 'reset' | 'submit' | 'cancel' | 'hide' | 'show';
|
|
2
2
|
export type ErrorKey = 'countryMustBeAResidenceCountry' | 'formHasErrors' | 'invalid' | 'invalidDate' | 'invalidVat' | 'mustBeFiveOrNineDigits' | 'mustBeInDateFormat' | 'mustBeNineDigits' | 'mustBeNinoFormat' | 'mustBeCaPostalCodeFormat' | 'mustBeInVatinFormat' | 'mustBeValidBirthDate' | 'mustBeAtLeast18' | 'mustMatchName' | 'mustNotMatchVatin' | 'required' | 'residencesMustIncludeAddressCountry' | 'residencesMustIncludeAnEUCountry' | 'residencesMustIncludeVatCountry' | 'tooLong' | 'tooShort' | 'vatinMustNotMatchResidencyTin';
|
|
3
|
-
export type SubOptionKey = 'accountHolderUsAccountType_SOLE_PROPRIETOR' | 'accountHolderUsAccountType_SM_LLC' | 'accountHolderUsAccountType_DISREGARDED_ENTITY';
|
|
4
|
-
export type OptionKey = TreatyClaimOption | 'accountHolderUsPerson_yes' | 'accountHolderUsPerson_no' | 'usTrustEstateEin_yes' | 'usTrustEstateEin_no' | 'usSoleProprietorEin_yes' | 'usSoleProprietorEin_no' | 'regardedOwnerUsPerson_yes' | 'regardedOwnerUsPerson_no' | 'smllcOwnerUsPerson_yes' | 'smllcOwnerUsPerson_no' | 'smllcElection_yes' | 'smllcElection_no' | 'isIndividual_yes' | 'isIndividual_no' | 'no' | 'yes' | 'CENTRAL_BANK_OF_ISSUE' | 'COMPLEX_TRUST' | 'CORPORATION' | 'C_CORPORATION' | 'DISREGARDED_ENTITY' | 'ESTATE' | 'FOREIGN_GOVERNMENT_CONTROLLED_ENTITY' | 'FOREIGN_GOVERNMENT_INTEGRAL_PART' | 'GRANTOR_TRUST' | 'INDIVIDUAL' | 'INTERNATIONAL_ORGANIZATION' | 'LLC' | 'OTHER' | 'PARTNERSHIP' | 'PRIVATE_FOUNDATION' | 'SIMPLE_TRUST' | 'SM_LLC' | 'SOLE_PROPRIETOR' | 'S_CORPORATION' | 'TAX_EXEMPT_ORGANIZATION' | 'TRUST' | 'TRUST_ESTATE';
|
|
5
|
-
export type PromptKey = TreatyClaimPrompt | '
|
|
6
|
-
export type SubPromptKey = TreatyClaimSubPrompt | 'smllcElection' | 'iAmNotSubjectToBackupWithholding' | 'iConfirmIncomeIsNonUs' | 'isIndividual' | 'financialAccountIdentifier' | 'financialAccountName' | 'vatIdentificationNumber' | 'placeOfBirth' | 'referenceNumbers' | 'signature' | 'streetIsPermanent' | 'usPerson';
|
|
7
|
-
export type TitleKey = 'accountHolder' | 'accountHolderClassification' | 'accountHolderContactInformation' | 'accountHolderTaxInformation' | 'accountHolderTaxClarification' | 'accountHolderTreatyClaims' | 'address' | 'additionalConditions' | 'acknowledge' | 'certify' | 'confirmation' | 'countryOfCitizenship' | 'countryOfIncorporation' | 'exemptions' | 'mailingAddress' | 'primaryAddress' | 'permanentAddress' | 'placeOfBirth' | 'regardedOwner' | 'regardedOwnerClassification' | 'regardedOwnerContactInformation' | 'regardedOwnerTaxInformation' | 'regardedOwnerTreatyClaims' | 'signature' | 'summary' | 'taxResidences' | 'taxResidence1' | 'taxResidence2' | 'taxResidence3' | 'taxResidence4' | 'taxResidence5' | 'w8imyInstructions';
|
|
8
|
-
export type SubTitleKey = 'taxResidences' | 'permanentAddress' | 'taxInformationTreatyClaims';
|
|
3
|
+
export type SubOptionKey = 'accountHolderUsAccountType_SOLE_PROPRIETOR' | 'accountHolderUsAccountType_SM_LLC' | 'accountHolderUsAccountType_DISREGARDED_ENTITY' | 'accountHolderActiveNonFinancialEntityType_OTHER' | 'accountHolderActiveNonFinancialEntityType_PUBLIC_CORPORATION';
|
|
4
|
+
export type OptionKey = TreatyClaimOption | 'accountHolderUsPerson_yes' | 'accountHolderUsPerson_no' | 'usTrustEstateEin_yes' | 'usTrustEstateEin_no' | 'usSoleProprietorEin_yes' | 'usSoleProprietorEin_no' | 'regardedOwnerUsPerson_yes' | 'regardedOwnerUsPerson_no' | 'smllcOwnerUsPerson_yes' | 'smllcOwnerUsPerson_no' | 'smllcElection_yes' | 'smllcElection_no' | 'isIndividual_yes' | 'isIndividual_no' | 'isInvestmentEntityManaged_yes' | 'isInvestmentEntityManaged_no' | 'no' | 'yes' | 'ACTIVE_NON_FINANCIAL_ENTITY' | 'CENTRAL_BANK_OF_ISSUE' | 'COMPLEX_TRUST' | 'CORPORATION' | 'CUSTODIAL_INSTITUTION' | 'C_CORPORATION' | 'DEPOSITORY_INSTITUTION' | 'DISREGARDED_ENTITY' | 'ENTITY_TYPE_TRUST' | 'ENTITY_TYPE_SIMILAR_TO_TRUST' | 'ENTITY_TYPE_OTHER' | 'ESTATE' | 'FINANCIAL_INSTITUTION' | 'FOREIGN_GOVERNMENT_CONTROLLED_ENTITY' | 'FOREIGN_GOVERNMENT_INTEGRAL_PART' | 'accountHolderActiveNonFinancialEntityType_GOVERNMENT_ENTITY' | 'GRANTOR_TRUST' | 'INDIVIDUAL' | 'accountHolderActiveNonFinancialEntityType_INTERNATIONAL_ORGANIZATION' | 'INTERNATIONAL_ORGANIZATION' | 'INVESTMENT_ENTITY' | 'INSURANCE_COMPANY' | 'LLC' | 'OTHER' | 'accountHolderActiveNonFinancialEntityType_OTHER' | 'PARTNERSHIP' | 'PASSIVE_NON_FINANCIAL_ENTITY' | 'PRIVATE_FOUNDATION' | 'accountHolderActiveNonFinancialEntityType_PUBLIC_CORPORATION' | 'SIGNATURE_CAPACITY_EXECUTOR' | 'SIGNATURE_CAPACITY_OFFICER' | 'SIGNATURE_CAPACITY_OTHER_CAPACITY' | 'SIMPLE_TRUST' | 'SM_LLC' | 'SOLE_PROPRIETOR' | 'S_CORPORATION' | 'TAX_EXEMPT_ORGANIZATION' | 'TRUST' | 'TRUST_ESTATE' | 'CONTROLLING_PERSON_ROLE_SETTLOR' | 'CONTROLLING_PERSON_ROLE_TRUSTEE' | 'CONTROLLING_PERSON_ROLE_PROTECTOR' | 'CONTROLLING_PERSON_ROLE_BENEFICIARY' | 'CONTROLLING_PERSON_ROLE_OTHER' | 'CONTROLLING_PERSON_ROLE_SETTLOR_EQUIVALENT' | 'CONTROLLING_PERSON_ROLE_TRUSTEE_EQUIVALENT' | 'CONTROLLING_PERSON_ROLE_PROTECTOR_EQUIVALENT' | 'CONTROLLING_PERSON_ROLE_BENEFICIARY_EQUIVALENT' | 'CONTROLLING_PERSON_ROLE_OTHER_EQUIVALENT' | 'CONTROLLING_PERSON_ROLE_OWNER' | 'CONTROLLING_PERSON_ROLE_OTHER_MEANS' | 'CONTROLLING_PERSON_ROLE_SENIOR_MANAGING_OFFICIAL' | 'MISSING_TIN_NOT_REQUIRED_REASON_NOT_ISSUED' | 'MISSING_TIN_NOT_REQUIRED_REASON_NOT_REQUIRED' | 'MISSING_TIN_NOT_REQUIRED_REASON_OTHER';
|
|
5
|
+
export type PromptKey = TreatyClaimPrompt | 'activeNonFinancialEntityType' | 'addAdditionalResidence' | 'addControllingPerson' | 'address' | 'businessRegistrationNumber' | 'businessRegistrationCountry' | 'city' | 'cityOfBirth' | 'country' | 'countryOfBirth' | 'dateOfBirth' | 'day' | 'dbaName' | 'exemptPayeeCode' | 'exemptFatcaCode' | 'financialAccountIdentifier' | 'financialAccountName' | 'foreignAccountType' | 'financialInstitutionType' | 'foreignOtherClassification' | 'foreignTin' | 'foreignTinIsNotRequired' | 'foreignTrustClassification' | 'investmentEntityManaged' | 'isIndividual' | 'iAcknowledgeESignIsOk' | 'iWillResubmitIfIncorrect' | 'iAmACitizenOfTheUs' | 'iAmExemptFromFatcaReporting' | 'iAmNotSubjectToBackupWithholding' | 'iAuthorizeWithholdingAgent' | 'iCertifyToAll' | 'iConfirmIncomeIsNonUs' | 'iConfirmTheBeneficialOwnerIsExempt' | 'iConfirmTheInformationIsCorrectComplete' | 'iConfirmTheEntityIsNotAUsPerson' | 'iConfirmTheEntityIsTheBeneficialOwner' | 'iConfirmTheIndividualIsNotAUsPerson' | 'iConfirmTheIndividualIsTheBeneficialOwner' | 'iConfirmTheIndividualIsResidentOfTreatyCountry' | 'iConfirmTheTaxIdIsCorrect' | 'iHaveCapacityToSignForEntity' | 'iHaveCapacityToSignForIndividual' | 'iDeclareStatementsAreCorrect' | 'iUnderstandTheInformationIsCovered' | 'iAcknowledgeTheInformationMayBeProvided' | 'iCertifyIAmAccountHolder' | 'iCertifyIAmAuthorizedToSignForAccountHolder' | 'iCertifyIWillNotifyPersons' | 'iWillNotifyChangeInCircumstanceForIndividual' | 'iWillNotifyChangeInCircumstanceForAccountHolder' | 'mailingAddress' | 'mailingAddressIsDifferent' | 'month' | 'name' | 'nameOfDisregardedEntity' | 'nameOfEntity' | 'nameOfCCorporation' | 'nameOfCorporation' | 'nameOfIndividual' | 'nameOfIndividualSoleProprietor' | 'nameOfLlc' | 'nameOfOrganization' | 'nameOfPartnership' | 'nameOfSCorporation' | 'nameOfSmllc' | 'nameOfSmllcOwner' | 'nameOfSoleProprietor' | 'nameOfTrustEstate' | 'nameOfTrust' | 'otherRole' | 'otherEquivalentRole' | 'ownershipPercentage' | 'managedEntityType' | 'passiveEntityType' | 'province' | 'referenceNumbers' | 'regardedOwnerUsPerson' | 'regardedOwnerAccountType' | 'relatedCorporation' | 'removeResidence' | 'removeControllingPerson' | 'role' | 'securitiesMarket' | 'signature' | 'signatureCapacity' | 'signatureCapacityOther' | 'smllcElection' | 'smllcOwnerAccountType' | 'smllcOwnerUsPerson' | 'countyRegion' | 'stateProvince' | 'street' | 'street2' | 'taxIdNumber' | 'taxIdNumberIsNotRequired' | 'taxIdNumberIsNotRequiredReason' | 'taxIdNumberIsNotRequiredReasonOther' | 'tin' | 'tinUkCrn' | 'tinUkNino' | 'type' | 'usAccountType' | 'usLlcClassification' | 'usOtherClassification' | 'usPerson' | 'usEin' | 'usSoleProprietorEin' | 'usSsn' | 'usTin' | 'usTrustEstateEin' | 'vatIdentificationNumber' | 'vatIsNotRequired' | 'vatCountry' | 'year' | 'zip';
|
|
6
|
+
export type SubPromptKey = TreatyClaimSubPrompt | 'smllcElection' | 'iAmNotSubjectToBackupWithholding' | 'iConfirmIncomeIsNonUs' | 'isIndividual' | 'financialAccountIdentifier' | 'financialAccountName' | 'financialInstitutionType' | 'vatIdentificationNumber' | 'placeOfBirth' | 'referenceNumbers' | 'relatedCorporation' | 'role' | 'securitiesMarket' | 'signature' | 'signatureCapacityOther' | 'streetIsPermanent' | 'usPerson';
|
|
7
|
+
export type TitleKey = 'accountHolder' | 'accountHolderClassification' | 'accountHolderContactInformation' | 'accountHolderTaxInformation' | 'accountHolderTaxClarification' | 'accountHolderTreatyClaims' | 'address' | 'additionalConditions' | 'acknowledge' | 'carfClassificationDetails' | 'certify' | 'confirmation' | 'controllingPersonDetails' | 'controllingPersons' | 'controllingPerson1' | 'controllingPerson2' | 'controllingPerson3' | 'controllingPerson4' | 'controllingPerson5' | 'countryOfCitizenship' | 'countryOfIncorporation' | 'exemptions' | 'mailingAddress' | 'primaryAddress' | 'permanentAddress' | 'placeOfBirth' | 'regardedOwner' | 'regardedOwnerClassification' | 'regardedOwnerContactInformation' | 'regardedOwnerTaxInformation' | 'regardedOwnerTreatyClaims' | 'signature' | 'summary' | 'taxResidences' | 'taxResidence1' | 'taxResidence2' | 'taxResidence3' | 'taxResidence4' | 'taxResidence5' | 'w8imyInstructions';
|
|
8
|
+
export type SubTitleKey = 'controllingPersonDetails' | 'taxResidences' | 'permanentAddress' | 'taxInformationTreatyClaims';
|
|
9
9
|
export type TextKey = 'eSignActReference' | 'notRequired' | 'notRequiredOrNotIssued' | 'interviewIsComplete' | 'penaltyOfPerjury' | 'penaltiesOfPerjury' | 'retrievingInterviewStatus' | 'taxDocumentationSaved' | 'w8imyInstructions';
|
|
10
10
|
type TreatyClaimPrompt = 'treatyClaimIsEligible' | 'treatyClaimICertifyResident' | 'treatyClaimICertifyRequirements' | 'treatyClaimCountry' | 'treatyClaimTypeOfIncome' | 'treatyClaimWithholding' | 'treatyClaimAdditionalConditions' | 'treatyClaimLimitationOnBenefits' | 'treatyClaimLimitationOnBenefitsOtherArticleParagraph';
|
|
11
11
|
type TreatyClaimSubPrompt = 'treatyClaimIsEligible' | 'treatyClaimWithholding' | 'treatyClaimAdditionalConditions' | 'treatyClaimLimitationOnBenefits';
|
|
@@ -29,23 +29,24 @@ export type PropertyFile = {
|
|
|
29
29
|
[key in TextKey]: string;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
-
export type
|
|
32
|
+
export type ForeignPropertyFile = {
|
|
33
33
|
button: PropertyFile['button'];
|
|
34
|
-
prompt: Pick<PropertyFile['prompt'], '
|
|
35
|
-
subPrompt: Pick<PropertyFile['subPrompt'], 'financialAccountIdentifier' | 'financialAccountName' | 'isIndividual' | 'placeOfBirth' | 'streetIsPermanent' | 'vatIdentificationNumber'>;
|
|
36
|
-
subTitle: Pick<PropertyFile['subTitle'], 'taxResidences'>;
|
|
37
|
-
title: Pick<PropertyFile['title'], 'accountHolder' | 'accountHolderClassification' | 'accountHolderContactInformation' | 'accountHolderTaxInformation' | 'accountHolderTaxClarification' | 'address' | 'confirmation' | 'countryOfCitizenship' | 'countryOfIncorporation' | 'permanentAddress' | 'placeOfBirth' | 'summary' | 'taxResidences' | 'taxResidence1' | 'taxResidence2' | 'taxResidence3' | 'taxResidence4' | 'taxResidence5'>;
|
|
34
|
+
prompt: Pick<PropertyFile['prompt'], 'addAdditionalResidence' | 'addControllingPerson' | 'financialInstitutionType' | 'activeNonFinancialEntityType' | 'passiveEntityType' | 'managedEntityType' | 'investmentEntityManaged' | 'iUnderstandTheInformationIsCovered' | 'iAcknowledgeTheInformationMayBeProvided' | 'iCertifyIAmAccountHolder' | 'iCertifyIAmAuthorizedToSignForAccountHolder' | 'iCertifyIWillNotifyPersons' | 'iDeclareStatementsAreCorrect' | 'iWillNotifyChangeInCircumstanceForIndividual' | 'iWillNotifyChangeInCircumstanceForAccountHolder' | 'otherRole' | 'otherEquivalentRole' | 'ownershipPercentage' | 'relatedCorporation' | 'removeControllingPerson' | 'role' | 'securitiesMarket' | 'taxIdNumberIsNotRequiredReason' | 'taxIdNumberIsNotRequiredReasonOther' | 'address' | 'businessRegistrationCountry' | 'businessRegistrationNumber' | 'city' | 'cityOfBirth' | 'country' | 'countryOfBirth' | 'dateOfBirth' | 'day' | 'financialAccountIdentifier' | 'financialAccountName' | 'iConfirmTheInformationIsCorrectComplete' | 'isIndividual' | 'month' | 'name' | 'nameOfEntity' | 'nameOfIndividual' | 'province' | 'removeResidence' | 'countyRegion' | 'stateProvince' | 'street' | 'street2' | 'signatureCapacity' | 'signatureCapacityOther' | 'taxIdNumber' | 'taxIdNumberIsNotRequired' | 'tin' | 'tinUkCrn' | 'tinUkNino' | 'type' | 'usTin' | 'vatCountry' | 'vatIdentificationNumber' | 'vatIsNotRequired' | 'year' | 'zip'>;
|
|
35
|
+
subPrompt: Pick<PropertyFile['subPrompt'], 'financialAccountIdentifier' | 'financialAccountName' | 'financialInstitutionType' | 'isIndividual' | 'placeOfBirth' | 'relatedCorporation' | 'role' | 'securitiesMarket' | 'signatureCapacityOther' | 'streetIsPermanent' | 'vatIdentificationNumber'>;
|
|
36
|
+
subTitle: Pick<PropertyFile['subTitle'], 'taxResidences' | 'controllingPersonDetails'>;
|
|
37
|
+
title: Pick<PropertyFile['title'], 'carfClassificationDetails' | 'controllingPersonDetails' | 'controllingPersons' | 'controllingPerson1' | 'controllingPerson2' | 'controllingPerson3' | 'controllingPerson4' | 'controllingPerson5' | 'accountHolder' | 'accountHolderClassification' | 'accountHolderContactInformation' | 'accountHolderTaxInformation' | 'accountHolderTaxClarification' | 'address' | 'confirmation' | 'countryOfCitizenship' | 'countryOfIncorporation' | 'permanentAddress' | 'placeOfBirth' | 'summary' | 'taxResidences' | 'taxResidence1' | 'taxResidence2' | 'taxResidence3' | 'taxResidence4' | 'taxResidence5'>;
|
|
38
38
|
text: Pick<PropertyFile['text'], 'interviewIsComplete' | 'notRequired' | 'notRequiredOrNotIssued' | 'retrievingInterviewStatus' | 'taxDocumentationSaved'>;
|
|
39
39
|
error: Pick<PropertyFile['error'], 'countryMustBeAResidenceCountry' | 'formHasErrors' | 'invalid' | 'invalidDate' | 'invalidVat' | 'mustBeAtLeast18' | 'mustBeFiveOrNineDigits' | 'mustBeInDateFormat' | 'mustBeInVatinFormat' | 'mustBeNineDigits' | 'mustBeNinoFormat' | 'mustBeCaPostalCodeFormat' | 'mustBeValidBirthDate' | 'mustNotMatchVatin' | 'required' | 'residencesMustIncludeAddressCountry' | 'residencesMustIncludeAnEUCountry' | 'residencesMustIncludeVatCountry' | 'tooLong' | 'tooShort' | 'vatinMustNotMatchResidencyTin'>;
|
|
40
|
-
option: Pick<PropertyFile['option'], 'no' | 'yes' | 'isIndividual_yes' | 'isIndividual_no'>;
|
|
40
|
+
option: Pick<PropertyFile['option'], 'no' | 'yes' | 'isIndividual_yes' | 'isIndividual_no' | 'isInvestmentEntityManaged_yes' | 'isInvestmentEntityManaged_no' | 'ACTIVE_NON_FINANCIAL_ENTITY' | 'PASSIVE_NON_FINANCIAL_ENTITY' | 'CUSTODIAL_INSTITUTION' | 'accountHolderActiveNonFinancialEntityType_GOVERNMENT_ENTITY' | 'INSURANCE_COMPANY' | 'INVESTMENT_ENTITY' | 'ENTITY_TYPE_TRUST' | 'ENTITY_TYPE_SIMILAR_TO_TRUST' | 'ENTITY_TYPE_OTHER' | 'accountHolderActiveNonFinancialEntityType_PUBLIC_CORPORATION' | 'accountHolderActiveNonFinancialEntityType_OTHER' | 'accountHolderActiveNonFinancialEntityType_INTERNATIONAL_ORGANIZATION' | 'SIGNATURE_CAPACITY_EXECUTOR' | 'SIGNATURE_CAPACITY_OFFICER' | 'SIGNATURE_CAPACITY_OTHER_CAPACITY' | 'DEPOSITORY_INSTITUTION' | 'FINANCIAL_INSTITUTION' | 'CONTROLLING_PERSON_ROLE_SETTLOR' | 'CONTROLLING_PERSON_ROLE_TRUSTEE' | 'CONTROLLING_PERSON_ROLE_PROTECTOR' | 'CONTROLLING_PERSON_ROLE_BENEFICIARY' | 'CONTROLLING_PERSON_ROLE_OTHER' | 'CONTROLLING_PERSON_ROLE_SETTLOR_EQUIVALENT' | 'CONTROLLING_PERSON_ROLE_TRUSTEE_EQUIVALENT' | 'CONTROLLING_PERSON_ROLE_PROTECTOR_EQUIVALENT' | 'CONTROLLING_PERSON_ROLE_BENEFICIARY_EQUIVALENT' | 'CONTROLLING_PERSON_ROLE_OTHER_EQUIVALENT' | 'CONTROLLING_PERSON_ROLE_OWNER' | 'CONTROLLING_PERSON_ROLE_OTHER_MEANS' | 'CONTROLLING_PERSON_ROLE_SENIOR_MANAGING_OFFICIAL' | 'MISSING_TIN_NOT_REQUIRED_REASON_NOT_ISSUED' | 'MISSING_TIN_NOT_REQUIRED_REASON_NOT_REQUIRED' | 'MISSING_TIN_NOT_REQUIRED_REASON_OTHER'>;
|
|
41
|
+
subOption: Pick<PropertyFile['subOption'], 'accountHolderActiveNonFinancialEntityType_PUBLIC_CORPORATION' | 'accountHolderActiveNonFinancialEntityType_OTHER'>;
|
|
41
42
|
};
|
|
42
43
|
export type PartialDPSPropertyFile = {
|
|
43
|
-
button?: Partial<
|
|
44
|
-
prompt?: Partial<
|
|
45
|
-
subPrompt?: Partial<
|
|
46
|
-
subTitle?: Partial<
|
|
47
|
-
title?: Partial<
|
|
48
|
-
text?: Partial<
|
|
49
|
-
error?: Partial<
|
|
50
|
-
option?: Partial<
|
|
44
|
+
button?: Partial<ForeignPropertyFile['button']>;
|
|
45
|
+
prompt?: Partial<ForeignPropertyFile['prompt']>;
|
|
46
|
+
subPrompt?: Partial<ForeignPropertyFile['subPrompt']>;
|
|
47
|
+
subTitle?: Partial<ForeignPropertyFile['subTitle']>;
|
|
48
|
+
title?: Partial<ForeignPropertyFile['title']>;
|
|
49
|
+
text?: Partial<ForeignPropertyFile['text']>;
|
|
50
|
+
error?: Partial<ForeignPropertyFile['error']>;
|
|
51
|
+
option?: Partial<ForeignPropertyFile['option']>;
|
|
51
52
|
};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ClientTaxDocumentation } from '@taxbit/utilities';
|
|
2
2
|
|
|
3
|
-
export * from './entry/TaxbitQuestionnaire';
|
|
4
3
|
export * from './hooks/useTaxbit/useTaxbit';
|
|
5
4
|
export * from './types/client/ClientTaxDocumentationStatus';
|
|
6
5
|
export * from './types/Locale';
|
|
7
6
|
export * from './types/Progress';
|
|
8
|
-
export * from './types/
|
|
7
|
+
export * from './types/QuestionnaireProp.ts';
|
|
8
|
+
export * from './widgets/TaxbitQuestionnaire';
|
|
9
9
|
export type { ClientTaxDocumentation };
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
import { default as treatyCountries } from './treatyCountries.json';
|
|
2
|
-
|
|
3
1
|
export declare const euCountryCodes: string[];
|
|
4
2
|
export declare const isEuCountryCode: (countryCode: string | undefined) => boolean;
|
|
5
|
-
export declare const treatyCountryCodes: string[];
|
|
6
|
-
export type TreatyCountryCode = keyof typeof treatyCountries;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LimitationOnBenefit } from '@taxbit/utilities';
|
|
2
|
+
|
|
3
|
+
export declare const getTreatyCountryLimitationOnBenefitOptions: (country?: string) => Array<{
|
|
4
|
+
value: LimitationOnBenefit;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const getTreatyCountryLimitationOnBenefitOtherArticleParagraphOptions: (country?: string) => {
|
|
7
|
+
value: string;
|
|
8
|
+
label: string;
|
|
9
|
+
}[];
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
+
export * from './activeNonFinancialEntityTypeOptions';
|
|
2
|
+
export * from './controllingPersonRoleOptions';
|
|
1
3
|
export * from './countryOptions';
|
|
2
4
|
export * from './dayOptions';
|
|
5
|
+
export * from './entityTypeOptions.ts';
|
|
3
6
|
export * from './fatcaCodeOptions';
|
|
7
|
+
export * from './financialInstitutionTypeOptions';
|
|
4
8
|
export * from './foreignAccountHolderAccountTypeOptions';
|
|
5
9
|
export * from './foreignOtherClassificationOptions';
|
|
6
10
|
export * from './foreignRegardedOwnerAccountTypeOptions';
|
|
7
11
|
export * from './foreignTrustClassificationOptions';
|
|
12
|
+
export * from './getTreatyCountryLimitationOnBenefitOptions';
|
|
8
13
|
export * from './localeOptions';
|
|
9
14
|
export * from './payeeCodeOptions';
|
|
15
|
+
export * from './selfCertificationAccountTypeOptions';
|
|
16
|
+
export * from './signatureCapacityOptions';
|
|
17
|
+
export * from './tinNotRequiredReasonOptions';
|
|
10
18
|
export * from './typeOfIncomeOptions';
|
|
11
19
|
export * from './usAccountHolderAccountTypeOptions';
|
|
12
20
|
export * from './usLlcAccountTypeOptions';
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QuestionnaireProp } from 'types';
|
|
2
2
|
|
|
3
|
+
export declare const TAX_DOCUMENTATION_SUBMISSIONS_PATH = "tax-documentation/submissions";
|
|
4
|
+
export declare const TAX_DOCUMENTATION_STATUS_PATH = "tax-documentation-status";
|
|
5
|
+
export declare const TAX_DOCUMENT_PATH = "tax-documentation/document";
|
|
3
6
|
export declare const api: {
|
|
4
7
|
taxDocumentationSubmissions: {
|
|
5
8
|
post: (environment: "PRODUCTION" | "STAGING") => string;
|
|
6
|
-
get: (environment: "PRODUCTION" | "STAGING", questionnaire:
|
|
9
|
+
get: (environment: "PRODUCTION" | "STAGING", questionnaire: QuestionnaireProp) => string;
|
|
7
10
|
};
|
|
8
11
|
taxDocumentationStatus: {
|
|
9
12
|
get: (environment: "PRODUCTION" | "STAGING") => string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
type ResponseOptions = {
|
|
2
|
+
once?: boolean;
|
|
3
|
+
body?: unknown;
|
|
4
|
+
status?: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const mockApi: {
|
|
7
|
+
taxDocumentationSubmissions: {
|
|
8
|
+
get: {
|
|
9
|
+
success: (options?: ResponseOptions) => import('msw').HttpHandler;
|
|
10
|
+
};
|
|
11
|
+
post: {
|
|
12
|
+
success: (options?: ResponseOptions) => import('msw').HttpHandler;
|
|
13
|
+
unauthorized: (options?: ResponseOptions) => import('msw').HttpHandler;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
taxDocumentationStatus: {
|
|
17
|
+
get: {
|
|
18
|
+
success: (options?: ResponseOptions) => import('msw').HttpHandler;
|
|
19
|
+
unauthorized: (options?: ResponseOptions) => import('msw').HttpHandler;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
taxDocument: {
|
|
23
|
+
post: {
|
|
24
|
+
success: (options?: ResponseOptions) => import('msw').HttpHandler;
|
|
25
|
+
};
|
|
26
|
+
get: {
|
|
27
|
+
success: (options?: ResponseOptions) => import('msw').HttpHandler;
|
|
28
|
+
pending: (options?: ResponseOptions) => import('msw').HttpHandler;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare const successHandlers: import('msw').HttpHandler[];
|
|
33
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ClientTaxDocumentation } from '@taxbit/utilities';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { QuestionnaireProp } from '../types';
|
|
4
4
|
|
|
5
5
|
export declare const Wrapper: React.FC<React.PropsWithChildren & {
|
|
6
6
|
initialData?: ClientTaxDocumentation;
|
|
7
|
-
questionnaire?:
|
|
7
|
+
questionnaire?: QuestionnaireProp;
|
|
8
8
|
}>;
|