@taxbit/react-sdk 2.3.0-beta.0 → 2.5.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 +47 -26
- package/dist/src/components/StatusMessage/StatusMessage.d.ts +6 -0
- package/dist/src/components/StatusMessage/index.d.ts +1 -0
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/contexts/QuestionnaireStep/getLocal.d.ts +2 -2
- package/dist/src/contexts/QuestionnaireStep/index.d.ts +2 -2
- package/dist/src/contexts/QuestionnaireStep/useQuestionnaireStep.d.ts +12 -9
- package/dist/src/contexts/QuestionnaireStep/useQuestionnaireStepContext.d.ts +16 -10
- package/dist/src/contexts/TaxDocumentation/useTaxDocumentation.d.ts +3 -1
- package/dist/src/hooks/useTaxbit/useTaxbit.d.ts +10 -1
- package/dist/src/hooks/useTaxbit/useTaxbitStatus.d.ts +3 -1
- package/dist/src/hooks/useUsTinVerification/useUsTinValidation.d.ts +3 -1
- package/dist/src/i18n/index.d.ts +1 -1
- package/dist/src/i18n/json/bg.json.d.ts +27 -7
- package/dist/src/i18n/json/cs.json.d.ts +27 -9
- package/dist/src/i18n/json/da.json.d.ts +27 -9
- package/dist/src/i18n/json/de-AT.json.d.ts +3 -3
- package/dist/src/i18n/json/de.json.d.ts +27 -7
- package/dist/src/i18n/json/el-CY.json.d.ts +2 -3
- package/dist/src/i18n/json/el.json.d.ts +27 -7
- package/dist/src/i18n/json/en-GB.json.d.ts +4 -1
- package/dist/src/i18n/json/en-NZ.json.d.ts +3 -0
- package/dist/src/i18n/json/en.json.d.ts +28 -8
- package/dist/src/i18n/json/es-MX.json.d.ts +3 -0
- package/dist/src/i18n/json/es.json.d.ts +26 -6
- package/dist/src/i18n/json/et.json.d.ts +27 -7
- package/dist/src/i18n/json/fi.json.d.ts +27 -11
- package/dist/src/i18n/json/fr-CA.json.d.ts +4 -1
- package/dist/src/i18n/json/fr-LU.json.d.ts +3 -3
- package/dist/src/i18n/json/fr.json.d.ts +27 -11
- package/dist/src/i18n/json/ga.json.d.ts +27 -7
- package/dist/src/i18n/json/hr.json.d.ts +27 -11
- package/dist/src/i18n/json/hu.json.d.ts +27 -7
- package/dist/src/i18n/json/it.json.d.ts +27 -11
- package/dist/src/i18n/json/lt.json.d.ts +27 -7
- package/dist/src/i18n/json/lv.json.d.ts +27 -7
- package/dist/src/i18n/json/mt.json.d.ts +27 -7
- package/dist/src/i18n/json/nl-BE.json.d.ts +44 -0
- package/dist/src/i18n/json/nl.json.d.ts +27 -11
- package/dist/src/i18n/json/no.json.d.ts +28 -12
- package/dist/src/i18n/json/pl.json.d.ts +27 -11
- package/dist/src/i18n/json/pt.json.d.ts +27 -7
- package/dist/src/i18n/json/ro.json.d.ts +27 -11
- package/dist/src/i18n/json/sk.json.d.ts +27 -9
- package/dist/src/i18n/json/sl.json.d.ts +27 -7
- package/dist/src/i18n/json/sv.json.d.ts +27 -11
- package/dist/src/i18n/locales/en-us.d.ts +1 -1
- package/dist/src/i18n/locales/en.d.ts +1 -1
- package/dist/src/i18n/locales/es-mx.d.ts +1 -1
- package/dist/src/i18n/locales/es.d.ts +1 -1
- package/dist/src/i18n/locales/fr-ca.d.ts +1 -1
- package/dist/src/i18n/locales/fr.d.ts +1 -1
- package/dist/src/i18n/localizationFileMap.d.ts +2 -2
- package/dist/src/i18n/types/LocalizationKey.d.ts +2 -2
- package/dist/src/i18n/types/PropertyFile.d.ts +6 -6
- package/dist/src/i18n/utils/getText.d.ts +11 -11
- package/dist/src/services/api.d.ts +9 -6
- package/dist/src/services/msw.d.ts +1 -0
- package/dist/src/types/client/ClientTaxDocumentationStatus.d.ts +6 -1
- package/dist/src/types/server/TaxDocumentationStatus.d.ts +6 -1
- package/dist/src/ui/TextInput/TextInput.d.ts +1 -2
- package/dist/src/utils/getFieldsState.d.ts +2 -2
- package/dist/src/validations/index.d.ts +6 -5
- package/dist/src/validations/invalidFields/getInvalidAddressFields.d.ts +2 -2
- package/dist/src/validations/invalidFields/getInvalidControllingPersonsFields.d.ts +2 -2
- package/dist/src/validations/invalidFields/getInvalidFields.d.ts +2 -2
- package/dist/src/validations/invalidFields/getInvalidTaxResidencyFields.d.ts +2 -2
- package/dist/src/validations/invalidFields/invalidFieldRules.d.ts +6 -4
- package/dist/src/validations/requiredFields/getRequiredControllingPersonFields.d.ts +2 -2
- package/dist/src/validations/requiredFields/getRequiredFields.d.ts +2 -2
- package/dist/src/validations/statusFields/getStatusFields.d.ts +4 -0
- package/dist/src/validations/statusFields/statusFieldRules.d.ts +8 -0
- package/dist/src/validations/supportedFields/getSupportedAddressFields.d.ts +2 -2
- package/dist/src/validations/supportedFields/getSupportedControllingPersonFields.d.ts +2 -2
- package/dist/src/validations/supportedFields/getSupportedFields.d.ts +2 -2
- package/dist/src/validations/supportedFields/getSupportedTaxResidenceFields.d.ts +2 -2
- package/dist/src/validations/visibleFields/__tests__/utils.d.ts +2 -2
- package/dist/src/validations/visibleFields/getVisibleAddressFields.d.ts +2 -2
- package/dist/src/validations/visibleFields/getVisibleControllingPersonFields.d.ts +2 -2
- package/dist/src/validations/visibleFields/getVisibleFields.d.ts +2 -2
- package/dist/src/widgets/TaxbitQuestionnaire/TaxbitQuestionnaire.d.ts +21 -6
- package/dist/src/widgets/TaxbitQuestionnairePersist/TaxbitQuestionnairePersist.d.ts +1 -1
- package/dist/src/widgets/TaxbitQuestionnairePersist/useTaxbitPersist.d.ts +3 -1
- package/dist/src/wizard/RowInput/ShowHideInputRow/ShowHideInputRow.d.ts +2 -1
- package/dist/src/wizard/RowInput/TinInputRow/TinInputRow.d.ts +22 -0
- package/dist/src/wizard/RowInput/TinInputRow/index.d.ts +1 -0
- package/dist/src/wizard/RowInput/VisibleRow/VisibleRow.d.ts +2 -1
- package/dist/src/wizard/RowInput/index.d.ts +1 -0
- package/dist/taxbit-react-sdk.js +6422 -5036
- package/dist/taxbit-react-sdk.umd.cjs +1 -1
- package/package.json +2 -2
- package/style/basic.css +15 -4
- package/style/inline.css +15 -4
- package/style/minimal.css +9 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export type ButtonKey = 'edit' | 'back' | 'next' | 'reset' | 'submit' | 'cancel' | 'hide' | 'show';
|
|
2
2
|
export type BadgeKey = 'validTin' | 'invalidTin' | 'pendingTin';
|
|
3
|
-
export type
|
|
3
|
+
export type StatusKey = 'doesNotMatchExpectedFormat' | 'matchesExpectedFormat' | 'countryMustBeAResidenceCountry' | 'formHasErrors' | 'invalid' | 'invalidDate' | 'invalidVat' | 'mustBeFiveOrNineDigits' | 'mustBeInDateFormat' | 'mustBeNineDigits' | 'mustBeNinoFormat' | 'mustBeABNFormat' | 'mustBeCaPostalCodeFormat' | 'mustBeInVatinFormat' | 'mustBeValidBirthDate' | 'mustBeAtLeast18' | 'mustMatchName' | 'checkFormatEntityAU' | 'checkFormatEntityCA' | 'checkFormatEntityDE' | 'checkFormatEntityES' | 'checkFormatEntityFR' | 'checkFormatEntityGB' | 'checkFormatEntityIE' | 'checkFormatEntityIT' | 'checkFormatEntityNL' | 'checkFormatEntitySG' | 'checkFormatIndividualAU' | 'checkFormatIndividualCA' | 'checkFormatIndividualDE' | 'checkFormatIndividualES' | 'checkFormatIndividualFR' | 'checkFormatIndividualGB' | 'checkFormatIndividualIE' | 'checkFormatIndividualIT' | 'checkFormatIndividualNL' | 'checkFormatIndividualSG' | 'required' | 'residencesMustIncludeAddressCountry' | 'residencesMustIncludeAnEUCountry' | 'residencesMustIncludeVatCountry' | 'residencesMustIncludeBusinessRegistrationCountry' | 'tooLong' | 'tooShort' | 'usTinDoesNotMatchName';
|
|
4
4
|
export type SubOptionKey = 'accountHolderUsAccountType_SOLE_PROPRIETOR' | 'accountHolderUsAccountType_SM_LLC' | 'accountHolderUsAccountType_DISREGARDED_ENTITY' | 'accountHolderActiveNonFinancialEntityType_OTHER' | 'accountHolderActiveNonFinancialEntityType_PUBLIC_CORPORATION' | 'accountHolderSelfCertificationAccountType_FINANCIAL_INSTITUTION' | 'accountHolderSelfCertificationAccountType_ACTIVE_NON_FINANCIAL_ENTITY' | 'accountHolderSelfCertificationAccountType_PASSIVE_NON_FINANCIAL_ENTITY' | 'accountHolderAccountOwnerType_ENTITY' | 'accountHolderAccountOwnerType_INTERMEDIARY' | 'regardedOwnerAccountOwnerType_ENTITY' | 'regardedOwnerAccountOwnerType_INTERMEDIARY';
|
|
5
5
|
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' | 'investmentEntityManaged_yes' | 'investmentEntityManaged_no' | 'assumesChapters3And4Responsibility_yes' | 'assumesChapters3And4Responsibility_no' | 'assumes1099Responsibility_yes' | 'assumes1099Responsibility_no' | 'usPersonElection_yes' | 'usPersonElection_no' | 'providesAdditionalDocumentation_yes' | 'providesAdditionalDocumentation_no' | 'no' | 'yes' | 'no_not_applicable' | 'ACTIVE_NON_FINANCIAL_ENTITY' | 'CENTRAL_BANK_OF_ISSUE' | 'COMPLEX_TRUST' | 'CORPORATION' | 'CUSTODIAL_INSTITUTION' | 'C_CORPORATION' | 'DEPOSITORY_INSTITUTION' | 'DISREGARDED_ENTITY' | 'ENTITY' | 'entityType_TRUST' | 'entityType_SIMILAR_TO_TRUST' | 'entityType_OTHER' | 'ESTATE' | 'FINANCIAL_INSTITUTION' | 'FOREIGN_GOVERNMENT_CONTROLLED_ENTITY' | 'FOREIGN_GOVERNMENT_INTEGRAL_PART' | 'accountHolderActiveNonFinancialEntityType_GOVERNMENT_ENTITY' | 'GRANTOR_TRUST' | 'INDIVIDUAL' | 'INTERMEDIARY' | 'QUALIFIED_INTERMEDIARY' | 'NONQUALIFIED_INTERMEDIARY' | 'TERRITORY_FINANCIAL_INSTITUTION' | 'US_BRANCH' | 'WITHHOLDING_FOREIGN_PARTNERSHIP' | 'WITHHOLDING_FOREIGN_TRUST' | 'NONWITHHOLDING_FOREIGN_PARTNERSHIP' | 'NONWITHHOLDING_FOREIGN_SIMPLE_TRUST' | 'NONWITHHOLDING_FOREIGN_GRANTOR_TRUST' | 'accountHolderActiveNonFinancialEntityType_INTERNATIONAL_ORGANIZATION' | 'INTERNATIONAL_ORGANIZATION' | 'INVESTMENT_ENTITY' | 'INSURANCE_COMPANY' | 'LLC' | 'OTHER' | 'accountHolderActiveNonFinancialEntityType_OTHER' | 'PARTNERSHIP' | 'PASSIVE_NON_FINANCIAL_ENTITY' | 'PRIVATE_FOUNDATION' | 'accountHolderActiveNonFinancialEntityType_PUBLIC_CORPORATION' | 'signatureCapacity_EXECUTOR' | 'signatureCapacity_OFFICER' | 'signatureCapacity_OTHER_CAPACITY' | 'SIMPLE_TRUST' | 'SM_LLC' | 'SOLE_PROPRIETOR' | 'S_CORPORATION' | 'TAX_EXEMPT_ORGANIZATION' | 'TRUST' | 'TRUST_ESTATE' | 'controllingPersonRole_SETTLOR' | 'controllingPersonRole_TRUSTEE' | 'controllingPersonRole_PROTECTOR' | 'controllingPersonRole_BENEFICIARY' | 'controllingPersonRole_OTHER' | 'controllingPersonRole_SETTLOR_EQUIVALENT' | 'controllingPersonRole_TRUSTEE_EQUIVALENT' | 'controllingPersonRole_PROTECTOR_EQUIVALENT' | 'controllingPersonRole_BENEFICIARY_EQUIVALENT' | 'controllingPersonRole_OTHER_EQUIVALENT' | 'controllingPersonRole_OWNER' | 'controllingPersonRole_OTHER_MEANS' | 'controllingPersonRole_SENIOR_MANAGING_OFFICIAL' | 'missingTinNotRequiredReason_NOT_ISSUED' | 'missingTinNotRequiredReason_NOT_REQUIRED' | 'missingTinNotRequiredReason_OTHER';
|
|
6
|
-
export type PromptKey = TreatyClaimPrompt | 'accountHolderAccountOwnerType' | 'accountHolderIntermediaryAccountType' | 'accountHolderEntityAccountType' | 'activeNonFinancialEntityType' | 'addAdditionalResidence' | 'addControllingPerson' | 'address' | 'businessRegistrationNumber' | 'businessRegistrationCountry' | 'city' | 'cityOfBirth' | 'country' | 'countryOfBirth' | 'dateOfBirth' | 'day' | 'dbaName' | 'emailAddress' | 'exemptPayeeCode' | 'exemptFatcaCode' | 'foreignAccountType' | 'financialInstitutionType' | 'foreignTin' | 'foreignTinIsNotRequired' | 'investmentEntityManaged' | 'isIndividual' | 'iWillResubmitIfIncorrect' | 'iAmACitizenOfTheUs' | 'iAmExemptFromFatcaReporting' | 'iAmNotSubjectToBackupWithholding' | 'iAuthorizeWithholdingAgent' | 'iConfirmIncomeIsNonUs' | 'iConfirmTheBeneficialOwnerIsExempt' | 'iConfirmTheEntityIsNotAUsPerson' | 'iConfirmTheEntityIsTheBeneficialOwner' | 'iConfirmTheIndividualIsNotAUsPerson' | 'iConfirmTheIndividualIsTheBeneficialOwner' | 'iConfirmTheIndividualIsResidentOfTreatyCountry' | 'iConfirmTheTaxIdIsCorrect' | 'iDeclareStatementsAreCorrect' | 'iUnderstandTheInformationIsCovered' | 'iAcknowledgeTheInformationMayBeProvided' | 'iCertifyIAmAccountHolder' | 'iCertifyIAmAuthorizedToSignForAccountHolder' | 'iWillNotifyChangeInCircumstance' | 'mailingAddress' | 'mailingAddressIsDifferent' | 'month' | 'name' | 'nameOfDisregardedEntity' | 'nameOfEntity' | 'nameOfCCorporation' | 'nameOfCorporation' | 'nameOfIndividual' | 'nameOfIndividualSoleProprietor' | 'nameOfLlc' | 'nameOfOrganization' | 'nameOfPartnership' | 'nameOfSCorporation' | 'nameOfSmllc' | 'nameOfSmllcOwner' | 'nameOfSoleProprietor' | 'nameOfTrustEstate' | 'nameOfComplexTrust' | 'nameOfTaxExemptOrganization' | 'nameOfPrivateFoundation' | 'nameOfInternationalOrganization' | 'nameOfCentralBankOfIssue' | 'nameOfForeignGovernmentControlledEntity' | 'nameOfForeignGovernmentIntegralPart' | 'nameOfEstate' | 'nameOfQualifiedIntermediary' | 'nameOfNonqualifiedIntermediary' | 'nameOfTerritoryFinancialInstitution' | 'nameOfUsBranch' | 'nameOfWithholdingForeignPartnership' | 'nameOfWithholdingForeignTrust' | 'nameOfNonwithholdingForeignPartnership' | 'nameOfNonwithholdingForeignSimpleTrust' | 'nameOfNonwithholdingForeignGrantorTrust' | 'otherRole' | 'otherEquivalentRole' | 'ownershipPercentage' | 'managedEntityType' | 'passiveEntityType' | 'phoneNumber' | 'phoneNumberCode' | 'phoneNumberNumber' | 'province' | 'referenceNumbers' | 'regardedOwnerUsPerson' | 'regardedOwnerAccountType' | 'regardedOwnerEntityAccountType' | 'regardedOwnerIntermediaryAccountType' | 'relatedCorporation' | 'removeResidence' | 'removeControllingPerson' | 'role' | 'securitiesMarket' | 'signature' | 'signatureCapacity' | 'signatureCapacityOther' | 'smllcElection' | 'smllcOwnerAccountType' | 'smllcOwnerUsPerson' | 'countyRegion' | 'stateProvince' | 'street' | 'street2' | 'taxIdNumber' | 'taxIdNumberIsNotRequired' | 'taxIdNumberIsNotRequiredReason' | 'taxIdNumberIsNotRequiredReasonOther' | 'tin' | 'tinAuAbn' | '
|
|
6
|
+
export type PromptKey = TreatyClaimPrompt | 'accountHolderAccountOwnerType' | 'accountHolderIntermediaryAccountType' | 'accountHolderEntityAccountType' | 'activeNonFinancialEntityType' | 'addAdditionalResidence' | 'addControllingPerson' | 'address' | 'businessRegistrationNumber' | 'businessRegistrationCountry' | 'city' | 'cityOfBirth' | 'country' | 'countryOfBirth' | 'dateOfBirth' | 'day' | 'dbaName' | 'emailAddress' | 'exemptPayeeCode' | 'exemptFatcaCode' | 'foreignAccountType' | 'financialInstitutionType' | 'foreignTin' | 'foreignTinIsNotRequired' | 'investmentEntityManaged' | 'isIndividual' | 'iWillResubmitIfIncorrect' | 'iAmACitizenOfTheUs' | 'iAmExemptFromFatcaReporting' | 'iAmNotSubjectToBackupWithholding' | 'iAuthorizeWithholdingAgent' | 'iConfirmIncomeIsNonUs' | 'iConfirmTheBeneficialOwnerIsExempt' | 'iConfirmTheEntityIsNotAUsPerson' | 'iConfirmTheEntityIsTheBeneficialOwner' | 'iConfirmTheIndividualIsNotAUsPerson' | 'iConfirmTheIndividualIsTheBeneficialOwner' | 'iConfirmTheIndividualIsResidentOfTreatyCountry' | 'iConfirmTheTaxIdIsCorrect' | 'iDeclareStatementsAreCorrect' | 'iUnderstandTheInformationIsCovered' | 'iAcknowledgeTheInformationMayBeProvided' | 'iCertifyIAmAccountHolder' | 'iCertifyIAmAuthorizedToSignForAccountHolder' | 'iWillNotifyChangeInCircumstance' | 'mailingAddress' | 'mailingAddressIsDifferent' | 'month' | 'name' | 'nameOfDisregardedEntity' | 'nameOfEntity' | 'nameOfCCorporation' | 'nameOfCorporation' | 'nameOfIndividual' | 'nameOfIndividualSoleProprietor' | 'nameOfLlc' | 'nameOfOrganization' | 'nameOfPartnership' | 'nameOfSCorporation' | 'nameOfSmllc' | 'nameOfSmllcOwner' | 'nameOfSoleProprietor' | 'nameOfTrustEstate' | 'nameOfComplexTrust' | 'nameOfTaxExemptOrganization' | 'nameOfPrivateFoundation' | 'nameOfInternationalOrganization' | 'nameOfCentralBankOfIssue' | 'nameOfForeignGovernmentControlledEntity' | 'nameOfForeignGovernmentIntegralPart' | 'nameOfEstate' | 'nameOfQualifiedIntermediary' | 'nameOfNonqualifiedIntermediary' | 'nameOfTerritoryFinancialInstitution' | 'nameOfUsBranch' | 'nameOfWithholdingForeignPartnership' | 'nameOfWithholdingForeignTrust' | 'nameOfNonwithholdingForeignPartnership' | 'nameOfNonwithholdingForeignSimpleTrust' | 'nameOfNonwithholdingForeignGrantorTrust' | 'otherRole' | 'otherEquivalentRole' | 'ownershipPercentage' | 'managedEntityType' | 'passiveEntityType' | 'phoneNumber' | 'phoneNumberCode' | 'phoneNumberNumber' | 'province' | 'referenceNumbers' | 'regardedOwnerUsPerson' | 'regardedOwnerAccountType' | 'regardedOwnerEntityAccountType' | 'regardedOwnerIntermediaryAccountType' | 'relatedCorporation' | 'removeResidence' | 'removeControllingPerson' | 'role' | 'securitiesMarket' | 'signature' | 'signatureCapacity' | 'signatureCapacityOther' | 'smllcElection' | 'smllcOwnerAccountType' | 'smllcOwnerUsPerson' | 'countyRegion' | 'stateProvince' | 'street' | 'street2' | 'taxIdNumber' | 'taxIdNumberIsNotRequired' | 'taxIdNumberIsNotRequiredReason' | 'taxIdNumberIsNotRequiredReasonOther' | 'tin' | 'tinAuAbn' | 'tinUkEntity' | 'tinUkIndividual' | 'type' | 'usAccountType' | 'usLlcClassification' | 'usOtherClassification' | 'usPerson' | 'usEin' | 'usSoleProprietorEin' | 'usSsn' | 'usTin' | 'usTinIsValid' | 'usTinMatchVerification' | 'usTrustEstateEin' | 'vatIdentificationNumber' | 'vatIsNotRequired' | 'vatCountry' | 'year' | 'zip' | 'isQiCertified' | 'assumesChapters3And4Responsibility' | 'assumes1099Responsibility' | 'usPersonElection' | 'providesAdditionalDocumentation' | 'assumesChapters3And4ResponsibilityCertified' | 'assumes1099ResponsibilityCertified' | 'notAssume1099ResponsibilityCertified' | 'meetsQiRegulationsRequirementsCertified' | 'obtainsDocumentationCertified' | 'notActingAsQiCertified' | 'transmitsNqiDocumentationCertified' | 'representsWithholdingStatementsCertified' | 'isFinancialInstitutionCertified' | 'tfiUsPersonElectionCertified' | 'transmitsTfiDocumentationCertified' | 'usbPaymentsCertified' | 'usbUsPersonElectionCertified' | 'transmitsUsbDocumentationCertified' | 'isCompliantCertified' | 'entityPaymentsCertified' | 'providesWithholdingStatementCertified';
|
|
7
7
|
export type SubPromptKey = TreatyClaimSubPrompt | 'accountHolderTaxResidences' | 'isQiCertified' | 'smllcElection' | 'iAmNotSubjectToBackupWithholding' | 'iConfirmIncomeIsNonUs' | 'isIndividual' | 'transmitsTfiDocumentationCertified' | 'transmitsUsbDocumentationCertified' | 'entityPaymentsCertified' | 'enterAbnWithResidency' | 'financialInstitutionType' | 'vatIdentificationNumber' | 'placeOfBirth' | 'referenceNumbers' | 'relatedCorporation' | 'role' | 'securitiesMarket' | 'signature' | 'signatureCapacityOther' | 'streetIsPermanent' | 'usPerson' | 'usTin' | 'usTinMatchVerification';
|
|
8
8
|
export type TitleKey = 'accountHolder' | 'accountHolderCertifications' | 'accountHolderClassification' | 'accountHolderContactInformation' | 'accountHolderTaxInformation' | 'accountHolderAdditionalInfo' | 'accountHolderTreatyClaims' | 'accountTypeCertifications' | 'accountHolderUsTinValidation' | 'address' | 'additionalConditions' | 'carfClassificationDetails' | 'certificationStatements' | 'certify' | 'confirmation' | 'controllingPersonDetails' | 'controllingPersons' | 'controllingPerson1' | 'controllingPerson2' | 'controllingPerson3' | 'controllingPerson4' | 'controllingPerson5' | 'countryOfCitizenship' | 'countryOfIncorporation' | 'exemptions' | 'mailingAddress' | 'primaryAddress' | 'permanentAddress' | 'placeOfBirth' | 'regardedOwner' | 'regardedOwnerCertifications' | 'regardedOwnerClassification' | 'regardedOwnerContactInformation' | 'regardedOwnerTaxInformation' | 'regardedOwnerTreatyClaims' | 'regardedOwnerUsTinValidation' | 'reviewAndSubmit' | 'signature' | 'summary' | 'taxResidences' | 'taxResidence1' | 'taxResidence2' | 'taxResidence3' | 'taxResidence4' | 'taxResidence5';
|
|
9
9
|
export type SubTitleKey = 'controllingPersonDetails' | 'taxResidences' | 'permanentAddress' | 'taxInformationTreatyClaims';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BadgeKey, ButtonKey,
|
|
1
|
+
import { BadgeKey, ButtonKey, OptionKey, PromptKey, StatusKey, SubOptionKey, SubPromptKey, SubTitleKey, TextKey, TitleKey } from './LocalizationKey';
|
|
2
2
|
|
|
3
3
|
export type PropertyFile = {
|
|
4
4
|
button: {
|
|
@@ -7,8 +7,8 @@ export type PropertyFile = {
|
|
|
7
7
|
badge: {
|
|
8
8
|
[key in BadgeKey]: string;
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
[key in
|
|
10
|
+
status: {
|
|
11
|
+
[key in StatusKey]: string;
|
|
12
12
|
};
|
|
13
13
|
prompt: {
|
|
14
14
|
[key in PromptKey]: string;
|
|
@@ -34,12 +34,12 @@ export type PropertyFile = {
|
|
|
34
34
|
};
|
|
35
35
|
export type ForeignPropertyFile = {
|
|
36
36
|
button: PropertyFile['button'];
|
|
37
|
-
prompt: Pick<PropertyFile['prompt'], 'addAdditionalResidence' | 'addControllingPerson' | 'foreignAccountType' | 'financialInstitutionType' | 'activeNonFinancialEntityType' | 'passiveEntityType' | 'managedEntityType' | 'investmentEntityManaged' | 'iUnderstandTheInformationIsCovered' | 'iAcknowledgeTheInformationMayBeProvided' | 'iCertifyIAmAccountHolder' | 'iCertifyIAmAuthorizedToSignForAccountHolder' | 'iDeclareStatementsAreCorrect' | 'iWillNotifyChangeInCircumstance' | 'otherRole' | 'otherEquivalentRole' | 'ownershipPercentage' | 'relatedCorporation' | 'removeControllingPerson' | 'role' | 'securitiesMarket' | 'taxIdNumberIsNotRequiredReason' | 'taxIdNumberIsNotRequiredReasonOther' | 'address' | 'mailingAddressIsDifferent' | 'businessRegistrationCountry' | 'businessRegistrationNumber' | 'city' | 'cityOfBirth' | 'country' | 'countryOfBirth' | 'dateOfBirth' | 'day' | 'emailAddress' | 'isIndividual' | 'month' | 'name' | 'nameOfEntity' | 'nameOfIndividual' | 'phoneNumber' | 'phoneNumberCode' | 'phoneNumberNumber' | 'province' | 'removeResidence' | 'countyRegion' | 'stateProvince' | 'street' | 'street2' | 'signature' | 'signatureCapacity' | 'signatureCapacityOther' | 'taxIdNumber' | 'taxIdNumberIsNotRequired' | 'tin' | '
|
|
37
|
+
prompt: Pick<PropertyFile['prompt'], 'addAdditionalResidence' | 'addControllingPerson' | 'foreignAccountType' | 'financialInstitutionType' | 'activeNonFinancialEntityType' | 'passiveEntityType' | 'managedEntityType' | 'investmentEntityManaged' | 'iUnderstandTheInformationIsCovered' | 'iAcknowledgeTheInformationMayBeProvided' | 'iCertifyIAmAccountHolder' | 'iCertifyIAmAuthorizedToSignForAccountHolder' | 'iDeclareStatementsAreCorrect' | 'iWillNotifyChangeInCircumstance' | 'otherRole' | 'otherEquivalentRole' | 'ownershipPercentage' | 'relatedCorporation' | 'removeControllingPerson' | 'role' | 'securitiesMarket' | 'taxIdNumberIsNotRequiredReason' | 'taxIdNumberIsNotRequiredReasonOther' | 'address' | 'mailingAddressIsDifferent' | 'businessRegistrationCountry' | 'businessRegistrationNumber' | 'city' | 'cityOfBirth' | 'country' | 'countryOfBirth' | 'dateOfBirth' | 'day' | 'emailAddress' | 'isIndividual' | 'month' | 'name' | 'nameOfEntity' | 'nameOfIndividual' | 'phoneNumber' | 'phoneNumberCode' | 'phoneNumberNumber' | 'province' | 'removeResidence' | 'countyRegion' | 'stateProvince' | 'street' | 'street2' | 'signature' | 'signatureCapacity' | 'signatureCapacityOther' | 'taxIdNumber' | 'taxIdNumberIsNotRequired' | 'tin' | 'tinUkEntity' | 'tinUkIndividual' | 'type' | 'usTin' | 'vatCountry' | 'vatIdentificationNumber' | 'vatIsNotRequired' | 'year' | 'zip'>;
|
|
38
38
|
subPrompt: Pick<PropertyFile['subPrompt'], 'financialInstitutionType' | 'isIndividual' | 'placeOfBirth' | 'relatedCorporation' | 'role' | 'securitiesMarket' | 'signatureCapacityOther' | 'streetIsPermanent' | 'vatIdentificationNumber'>;
|
|
39
39
|
subTitle: Pick<PropertyFile['subTitle'], 'taxResidences' | 'controllingPersonDetails' | 'permanentAddress'>;
|
|
40
40
|
title: Pick<PropertyFile['title'], 'certify' | 'carfClassificationDetails' | 'controllingPersonDetails' | 'controllingPersons' | 'controllingPerson1' | 'controllingPerson2' | 'controllingPerson3' | 'controllingPerson4' | 'controllingPerson5' | 'accountHolder' | 'accountHolderClassification' | 'accountHolderContactInformation' | 'accountHolderTaxInformation' | 'accountHolderAdditionalInfo' | 'address' | 'confirmation' | 'countryOfCitizenship' | 'countryOfIncorporation' | 'placeOfBirth' | 'mailingAddress' | 'permanentAddress' | 'primaryAddress' | 'summary' | 'taxResidences' | 'taxResidence1' | 'taxResidence2' | 'taxResidence3' | 'taxResidence4' | 'taxResidence5'>;
|
|
41
41
|
text: Pick<PropertyFile['text'], 'interviewIsComplete' | 'notRequired' | 'notRequiredOrNotIssued' | 'retrievingInterviewStatus' | 'taxDocumentationSaved' | 'iCertifyIsCorrect' | 'iCertifyHaveCapacity'>;
|
|
42
|
-
|
|
42
|
+
status: Pick<PropertyFile['status'], 'countryMustBeAResidenceCountry' | 'formHasErrors' | 'invalid' | 'invalidDate' | 'invalidVat' | 'mustBeABNFormat' | 'mustBeAtLeast18' | 'mustBeFiveOrNineDigits' | 'mustBeInDateFormat' | 'mustBeInVatinFormat' | 'mustBeNineDigits' | 'mustBeNinoFormat' | 'mustBeCaPostalCodeFormat' | 'mustBeValidBirthDate' | 'required' | 'residencesMustIncludeAddressCountry' | 'residencesMustIncludeAnEUCountry' | 'residencesMustIncludeVatCountry' | 'residencesMustIncludeBusinessRegistrationCountry' | 'tooLong' | 'tooShort'>;
|
|
43
43
|
option: Pick<PropertyFile['option'], 'no' | 'yes' | 'isIndividual_yes' | 'isIndividual_no' | 'investmentEntityManaged_yes' | 'investmentEntityManaged_no' | 'ACTIVE_NON_FINANCIAL_ENTITY' | 'PASSIVE_NON_FINANCIAL_ENTITY' | 'CUSTODIAL_INSTITUTION' | 'accountHolderActiveNonFinancialEntityType_GOVERNMENT_ENTITY' | 'INSURANCE_COMPANY' | 'INVESTMENT_ENTITY' | 'entityType_TRUST' | 'entityType_SIMILAR_TO_TRUST' | 'entityType_OTHER' | 'accountHolderActiveNonFinancialEntityType_PUBLIC_CORPORATION' | 'accountHolderActiveNonFinancialEntityType_OTHER' | 'accountHolderActiveNonFinancialEntityType_INTERNATIONAL_ORGANIZATION' | 'signatureCapacity_EXECUTOR' | 'signatureCapacity_OFFICER' | 'signatureCapacity_OTHER_CAPACITY' | 'DEPOSITORY_INSTITUTION' | 'FINANCIAL_INSTITUTION' | 'controllingPersonRole_SETTLOR' | 'controllingPersonRole_TRUSTEE' | 'controllingPersonRole_PROTECTOR' | 'controllingPersonRole_BENEFICIARY' | 'controllingPersonRole_OTHER' | 'controllingPersonRole_SETTLOR_EQUIVALENT' | 'controllingPersonRole_TRUSTEE_EQUIVALENT' | 'controllingPersonRole_PROTECTOR_EQUIVALENT' | 'controllingPersonRole_BENEFICIARY_EQUIVALENT' | 'controllingPersonRole_OTHER_EQUIVALENT' | 'controllingPersonRole_OWNER' | 'controllingPersonRole_OTHER_MEANS' | 'controllingPersonRole_SENIOR_MANAGING_OFFICIAL' | 'missingTinNotRequiredReason_NOT_ISSUED' | 'missingTinNotRequiredReason_NOT_REQUIRED' | 'missingTinNotRequiredReason_OTHER'>;
|
|
44
44
|
subOption: Pick<PropertyFile['subOption'], 'accountHolderActiveNonFinancialEntityType_PUBLIC_CORPORATION' | 'accountHolderActiveNonFinancialEntityType_OTHER' | 'accountHolderSelfCertificationAccountType_FINANCIAL_INSTITUTION' | 'accountHolderSelfCertificationAccountType_ACTIVE_NON_FINANCIAL_ENTITY' | 'accountHolderSelfCertificationAccountType_PASSIVE_NON_FINANCIAL_ENTITY'>;
|
|
45
45
|
};
|
|
@@ -50,6 +50,6 @@ export type PartialForeignPropertyFile = {
|
|
|
50
50
|
subTitle?: Partial<ForeignPropertyFile['subTitle']>;
|
|
51
51
|
title?: Partial<ForeignPropertyFile['title']>;
|
|
52
52
|
text?: Partial<ForeignPropertyFile['text']>;
|
|
53
|
-
|
|
53
|
+
status?: Partial<ForeignPropertyFile['status']>;
|
|
54
54
|
option?: Partial<ForeignPropertyFile['option']>;
|
|
55
55
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Locale, TaxDocumentation } from '../../types';
|
|
2
|
-
import { ButtonKey,
|
|
2
|
+
import { ButtonKey, OptionKey, PromptKey, StatusKey, SubOptionKey, SubPromptKey } from '../types';
|
|
3
3
|
|
|
4
|
-
export declare const getPromptText: (key: PromptKey,
|
|
5
|
-
export declare const getSubPromptText: (key: SubPromptKey,
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const getBadgeText: (key: string,
|
|
8
|
-
export declare const getTextText: (key: string,
|
|
9
|
-
export declare const getTitleText: (key: string,
|
|
10
|
-
export declare const getSubTitleText: (key: string,
|
|
11
|
-
export declare const getButtonText: (key: ButtonKey,
|
|
12
|
-
export declare const getOptionText: (key: OptionKey | undefined,
|
|
13
|
-
export declare const getSubOptionText: (key: SubOptionKey | undefined,
|
|
4
|
+
export declare const getPromptText: (key: PromptKey, locale: Locale | undefined, fields?: TaxDocumentation) => string;
|
|
5
|
+
export declare const getSubPromptText: (key: SubPromptKey, locale: Locale | undefined) => string;
|
|
6
|
+
export declare const getStatusText: (key: StatusKey, locale: Locale | undefined) => string;
|
|
7
|
+
export declare const getBadgeText: (key: string, locale: Locale | undefined) => string;
|
|
8
|
+
export declare const getTextText: (key: string, locale: Locale | undefined) => string;
|
|
9
|
+
export declare const getTitleText: (key: string, locale: Locale | undefined) => string;
|
|
10
|
+
export declare const getSubTitleText: (key: string, locale: Locale | undefined) => string;
|
|
11
|
+
export declare const getButtonText: (key: ButtonKey, locale: Locale | undefined) => string;
|
|
12
|
+
export declare const getOptionText: (key: OptionKey | undefined, locale: Locale | undefined) => string;
|
|
13
|
+
export declare const getSubOptionText: (key: SubOptionKey | undefined, locale: Locale | undefined) => string | undefined;
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import { QuestionnaireProp } from 'types';
|
|
2
2
|
|
|
3
|
+
type Environment = 'PRODUCTION' | 'STAGING';
|
|
4
|
+
type Region = 'US' | 'EU' | string;
|
|
3
5
|
export declare const TAX_DOCUMENTATION_SUBMISSIONS_PATH = "tax-documentation/submissions";
|
|
4
6
|
export declare const TAX_DOCUMENTATION_STATUS_PATH = "tax-documentation-status";
|
|
5
7
|
export declare const TAX_DOCUMENT_PATH = "tax-documentation/document";
|
|
6
8
|
export declare const US_TIN_VALIDATION_PATH = "embedded-validations/us-tin";
|
|
7
9
|
export declare const api: {
|
|
8
10
|
taxDocumentationSubmissions: {
|
|
9
|
-
post: (environment:
|
|
10
|
-
get: (environment:
|
|
11
|
+
post: (environment: Environment, region: Region | undefined, proxyDomain: string | undefined) => string;
|
|
12
|
+
get: (environment: Environment, questionnaire: QuestionnaireProp, region: Region | undefined, proxyDomain: string | undefined) => string;
|
|
11
13
|
};
|
|
12
14
|
taxDocumentationStatus: {
|
|
13
|
-
get: (environment:
|
|
15
|
+
get: (environment: Environment, region: Region | undefined, proxyDomain: string | undefined) => string;
|
|
14
16
|
};
|
|
15
17
|
taxDocument: {
|
|
16
|
-
post: (environment:
|
|
17
|
-
get: (documentId: string, environment:
|
|
18
|
+
post: (environment: Environment, region: Region | undefined, proxyDomain: string | undefined) => string;
|
|
19
|
+
get: (documentId: string, environment: Environment, region?: Region, proxyDomain?: string) => string;
|
|
18
20
|
};
|
|
19
21
|
usTinValidation: {
|
|
20
|
-
post: (environment:
|
|
22
|
+
post: (environment: Environment, region: Region | undefined, proxyDomain: string | undefined) => string;
|
|
21
23
|
};
|
|
22
24
|
};
|
|
25
|
+
export {};
|
|
@@ -17,6 +17,7 @@ export declare const mockApi: {
|
|
|
17
17
|
get: {
|
|
18
18
|
success: (options?: ResponseOptions) => import('msw').HttpHandler;
|
|
19
19
|
unauthorized: (options?: ResponseOptions) => import('msw').HttpHandler;
|
|
20
|
+
forbidden: (options?: ResponseOptions) => import('msw').HttpHandler;
|
|
20
21
|
};
|
|
21
22
|
};
|
|
22
23
|
taxDocument: {
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
type IssueDetail = {
|
|
2
|
+
field: string;
|
|
3
|
+
description: string;
|
|
4
|
+
};
|
|
1
5
|
type QuestionnaireIssue = {
|
|
2
|
-
issueType: 'CARE_OF_PERMANENT_ADDRESS' | '
|
|
6
|
+
issueType: 'CARE_OF_PERMANENT_ADDRESS' | 'CHANGE_IN_CIRCUMSTANCES' | 'INCOMPLETE_DATA' | 'INCOMPLETE_ADDRESS' | 'PO_BOX_PERMANENT_ADDRESS' | 'TREATY_COUNTRY_MISMATCH' | 'US_INDICIA' | 'US_PERMANENT_ADDRESS' | 'WITHHOLDING_DOCUMENTATION';
|
|
3
7
|
createdAt: string;
|
|
8
|
+
details: IssueDetail[];
|
|
4
9
|
};
|
|
5
10
|
export type ClientTaxDocumentationStatus = {
|
|
6
11
|
dpsQuestionnaire?: {
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
type IssueDetail = {
|
|
2
|
+
field: string;
|
|
3
|
+
description: string;
|
|
4
|
+
};
|
|
1
5
|
type Issue = {
|
|
2
|
-
issue_type: 'CARE_OF_PERMANENT_ADDRESS' | '
|
|
6
|
+
issue_type: 'CARE_OF_PERMANENT_ADDRESS' | 'CHANGE_IN_CIRCUMSTANCES' | 'INCOMPLETE_DATA' | 'INCOMPLETE_ADDRESS' | 'PO_BOX_PERMANENT_ADDRESS' | 'TREATY_COUNTRY_MISMATCH' | 'US_INDICIA' | 'US_PERMANENT_ADDRESS' | 'WITHHOLDING_DOCUMENTATION';
|
|
3
7
|
created_at: string;
|
|
8
|
+
details: IssueDetail[];
|
|
4
9
|
};
|
|
5
10
|
export type TaxDocumentationStatus = {
|
|
6
11
|
dps_questionnaire?: {
|
|
@@ -6,7 +6,6 @@ export type TextInputProps = {
|
|
|
6
6
|
className?: string;
|
|
7
7
|
onChange?: (val: string) => string;
|
|
8
8
|
disabled?: boolean;
|
|
9
|
-
children?: React.ReactNode;
|
|
10
9
|
defaultValue?: string;
|
|
11
10
|
};
|
|
12
|
-
export declare const TextInput: ({ name, className, onChange,
|
|
11
|
+
export declare const TextInput: ({ name, className, onChange, disabled, defaultValue, }: TextInputProps) => React.JSX.Element;
|
|
@@ -7,7 +7,7 @@ type Options = {
|
|
|
7
7
|
treatyClaims?: boolean;
|
|
8
8
|
externalValidations?: ExternalValidations;
|
|
9
9
|
};
|
|
10
|
-
export declare const getFieldsState: (fields
|
|
10
|
+
export declare const getFieldsState: (fields?: TaxDocumentation, questionnaire?: QuestionnaireProp, options?: Options) => {
|
|
11
11
|
hasNoEuTaxId: boolean;
|
|
12
12
|
hasEuResidence: boolean;
|
|
13
13
|
hasAuResidence: boolean;
|
|
@@ -46,6 +46,6 @@ export declare const getFieldsState: (fields: TaxDocumentation, questionnaire?:
|
|
|
46
46
|
tin: string | undefined;
|
|
47
47
|
tinNotRequired: "yes" | undefined;
|
|
48
48
|
}[];
|
|
49
|
-
hasUsTinValidationError: import('../i18n/types').
|
|
49
|
+
hasUsTinValidationError: import('../i18n/types').StatusKey[] | undefined;
|
|
50
50
|
};
|
|
51
51
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './getSteps';
|
|
2
|
-
export * from './invalidFields/getInvalidFields
|
|
3
|
-
export * from './invalidFields/invalidFieldRules
|
|
4
|
-
export * from './requiredFields/getRequiredFields
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
2
|
+
export * from './invalidFields/getInvalidFields';
|
|
3
|
+
export * from './invalidFields/invalidFieldRules';
|
|
4
|
+
export * from './requiredFields/getRequiredFields';
|
|
5
|
+
export * from './statusFields/getStatusFields.ts';
|
|
6
|
+
export * from './supportedFields/getSupportedFields';
|
|
7
|
+
export * from './visibleFields/getVisibleFields';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QuestionnaireValidations } from './invalidFieldRules.ts';
|
|
2
2
|
|
|
3
3
|
type Prefix = 'accountHolder' | 'accountHolderMailing' | 'regardedOwner' | 'regardedOwnerMailing' | 'controllingPerson1' | 'controllingPerson1Mailing' | 'controllingPerson2' | 'controllingPerson2Mailing' | 'controllingPerson3' | 'controllingPerson3Mailing' | 'controllingPerson4' | 'controllingPerson4Mailing' | 'controllingPerson5' | 'controllingPerson5Mailing';
|
|
4
|
-
export declare const getInvalidAddressRules: (prefix: Prefix) =>
|
|
4
|
+
export declare const getInvalidAddressRules: (prefix: Prefix) => QuestionnaireValidations;
|
|
5
5
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QuestionnaireValidations } from './invalidFieldRules';
|
|
2
2
|
|
|
3
|
-
export declare const getInvalidControllingPersonsFields: () =>
|
|
3
|
+
export declare const getInvalidControllingPersonsFields: () => QuestionnaireValidations;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TaxDocumentationErrorMessagesMap } from '../../contexts';
|
|
2
2
|
import { QuestionnaireProp, TaxDocumentation } from '../../types';
|
|
3
3
|
import { ExternalValidations } from '../../types/client';
|
|
4
4
|
|
|
@@ -7,5 +7,5 @@ type Options = {
|
|
|
7
7
|
treatyClaims?: boolean;
|
|
8
8
|
externalValidations?: ExternalValidations;
|
|
9
9
|
};
|
|
10
|
-
export declare const getInvalidFields: (fields: TaxDocumentation, questionnaire: QuestionnaireProp, options?: Options) =>
|
|
10
|
+
export declare const getInvalidFields: (fields: TaxDocumentation, questionnaire: QuestionnaireProp, options?: Options) => TaxDocumentationErrorMessagesMap;
|
|
11
11
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QuestionnaireValidations } from './invalidFieldRules.ts';
|
|
2
2
|
|
|
3
3
|
type Prefix = 'accountHolder' | 'controllingPerson1' | 'controllingPerson2' | 'controllingPerson3' | 'controllingPerson4' | 'controllingPerson5';
|
|
4
|
-
export declare const getInvalidTaxResidencyFields: (prefix: Prefix) =>
|
|
4
|
+
export declare const getInvalidTaxResidencyFields: (prefix: Prefix) => QuestionnaireValidations;
|
|
5
5
|
export {};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StatusKey } from 'i18n/types';
|
|
2
2
|
import { TaxDocumentation, TaxDocumentationKey } from 'types/TaxDocumentation';
|
|
3
|
+
import { QuestionnaireProp } from '../../types';
|
|
3
4
|
import { ExternalValidations } from '../../types/client';
|
|
4
5
|
|
|
5
6
|
type Options = {
|
|
6
7
|
treatyClaims?: boolean;
|
|
7
8
|
realTimeTinValidation?: boolean;
|
|
8
9
|
externalValidations?: ExternalValidations;
|
|
10
|
+
questionnaire?: QuestionnaireProp;
|
|
9
11
|
};
|
|
10
|
-
export type FormUIValidation = (fields: TaxDocumentation, options?: Options) =>
|
|
11
|
-
export type
|
|
12
|
+
export type FormUIValidation = (fields: TaxDocumentation, options?: Options) => StatusKey[] | undefined;
|
|
13
|
+
export type QuestionnaireValidations = {
|
|
12
14
|
[key in TaxDocumentationKey]?: FormUIValidation;
|
|
13
15
|
};
|
|
14
|
-
export declare const invalidFieldRules:
|
|
16
|
+
export declare const invalidFieldRules: QuestionnaireValidations;
|
|
15
17
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TaxDocumentationBooleanMap } from '../../contexts';
|
|
2
2
|
import { TaxDocumentation } from '../../types';
|
|
3
3
|
|
|
4
|
-
export declare const getRequiredControllingPersonFields: (fields: TaxDocumentation, isSelfCertification: boolean) => Partial<
|
|
4
|
+
export declare const getRequiredControllingPersonFields: (fields: TaxDocumentation, isSelfCertification: boolean) => Partial<TaxDocumentationBooleanMap>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TaxDocumentationBooleanMap } from '../../contexts';
|
|
2
2
|
import { QuestionnaireProp, TaxDocumentation } from '../../types';
|
|
3
3
|
|
|
4
4
|
type Options = {
|
|
5
5
|
treatyClaims?: boolean;
|
|
6
6
|
realTimeTinValidation?: boolean;
|
|
7
7
|
};
|
|
8
|
-
export declare const getRequiredFields: (fields: TaxDocumentation, questionnaire: QuestionnaireProp, options?: Options) =>
|
|
8
|
+
export declare const getRequiredFields: (fields: TaxDocumentation, questionnaire: QuestionnaireProp, options?: Options) => TaxDocumentationBooleanMap;
|
|
9
9
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StatusKey } from '../../i18n/types';
|
|
2
|
+
import { TaxDocumentation, TaxDocumentationKey } from '../../types';
|
|
3
|
+
|
|
4
|
+
export type GetMessageFunction = (fields: TaxDocumentation) => StatusKey[] | undefined;
|
|
5
|
+
export type GetMessageFunctions = {
|
|
6
|
+
[key in TaxDocumentationKey]?: GetMessageFunction;
|
|
7
|
+
};
|
|
8
|
+
export declare const statusFieldRules: GetMessageFunctions;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TaxDocumentationBooleanMap } from '../../contexts';
|
|
2
2
|
|
|
3
3
|
declare const iterate5: readonly ["1", "2", "3", "4", "5"];
|
|
4
4
|
type Iterate5 = (typeof iterate5)[number];
|
|
5
5
|
type ControllingPersonPrefix = `controllingPerson${Iterate5}`;
|
|
6
6
|
type AddressPrefix = 'accountHolder' | 'accountHolderMailing' | 'regardedOwner' | 'regardedOwnerMailing' | ControllingPersonPrefix | `${ControllingPersonPrefix}Mailing`;
|
|
7
|
-
export declare const getSupportedAddressFields: (prefix: AddressPrefix, isSupported: boolean) => Partial<
|
|
7
|
+
export declare const getSupportedAddressFields: (prefix: AddressPrefix, isSupported: boolean) => Partial<TaxDocumentationBooleanMap>;
|
|
8
8
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TaxDocumentationBooleanMap } from '../../contexts';
|
|
2
2
|
|
|
3
3
|
declare const iterate5: readonly ["1", "2", "3", "4", "5"];
|
|
4
4
|
type Iterate5 = (typeof iterate5)[number];
|
|
5
5
|
type ControllingPersonPrefix = `controllingPerson${Iterate5}`;
|
|
6
|
-
export declare const getSupportedControllingPersonFields: (prefix: ControllingPersonPrefix, isSupported: boolean) => Partial<
|
|
6
|
+
export declare const getSupportedControllingPersonFields: (prefix: ControllingPersonPrefix, isSupported: boolean) => Partial<TaxDocumentationBooleanMap>;
|
|
7
7
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { QuestionnaireProp } from 'types';
|
|
2
|
-
import {
|
|
2
|
+
import { TaxDocumentationBooleanMap } from '../../contexts';
|
|
3
3
|
|
|
4
4
|
type Options = {
|
|
5
5
|
treatyClaims?: boolean;
|
|
6
6
|
realTimeTinValidation?: boolean;
|
|
7
7
|
};
|
|
8
|
-
export declare const getSupportedFields: (questionnaire: QuestionnaireProp, options?: Options) => Partial<
|
|
8
|
+
export declare const getSupportedFields: (questionnaire: QuestionnaireProp, options?: Options) => Partial<TaxDocumentationBooleanMap>;
|
|
9
9
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TaxDocumentationBooleanMap } from '../../contexts';
|
|
2
2
|
|
|
3
3
|
declare const iterate5: readonly ["1", "2", "3", "4", "5"];
|
|
4
4
|
type Iterate5 = (typeof iterate5)[number];
|
|
5
5
|
type ControllingPersonPrefix = `controllingPerson${Iterate5}`;
|
|
6
6
|
type ResidencePrefix = 'accountHolder' | ControllingPersonPrefix;
|
|
7
|
-
export declare const getSupportedTaxResidenceFields: (prefix: ResidencePrefix, isSupported: boolean, hasReason?: boolean) => Partial<
|
|
7
|
+
export declare const getSupportedTaxResidenceFields: (prefix: ResidencePrefix, isSupported: boolean, hasReason?: boolean) => Partial<TaxDocumentationBooleanMap>;
|
|
8
8
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TaxDocumentationBooleanMap } from '../../../contexts';
|
|
2
2
|
|
|
3
|
-
export declare const getVisibleFieldsArray: (visibleFields:
|
|
3
|
+
export declare const getVisibleFieldsArray: (visibleFields: TaxDocumentationBooleanMap) => string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TaxDocumentationBooleanMap } from '../../contexts';
|
|
2
2
|
|
|
3
3
|
type Prefix = 'accountHolderAddress' | 'accountHolderMailingAddress' | 'regardedOwnerAddress' | 'regardedOwnerMailingAddress' | 'controllingPerson1Address' | 'controllingPerson2Address' | 'controllingPerson3Address' | 'controllingPerson4Address' | 'controllingPerson5Address' | 'controllingPerson1MailingAddress' | 'controllingPerson2MailingAddress' | 'controllingPerson3MailingAddress' | 'controllingPerson4MailingAddress' | 'controllingPerson5MailingAddress';
|
|
4
|
-
export declare const getVisibleAddressFields: (prefix: Prefix, showFields: boolean) => Partial<
|
|
4
|
+
export declare const getVisibleAddressFields: (prefix: Prefix, showFields: boolean) => Partial<TaxDocumentationBooleanMap>;
|
|
5
5
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TaxDocumentationBooleanMap } from '../../contexts';
|
|
2
2
|
import { TaxDocumentation } from '../../types';
|
|
3
3
|
|
|
4
|
-
export declare const getVisibleControllingPersonFields: (fields: TaxDocumentation, isSupported: boolean) => Partial<
|
|
4
|
+
export declare const getVisibleControllingPersonFields: (fields: TaxDocumentation, isSupported: boolean) => Partial<TaxDocumentationBooleanMap>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QuestionnaireProp, TaxDocumentation } from 'types';
|
|
2
|
-
import {
|
|
2
|
+
import { TaxDocumentationBooleanMap } from '../../contexts';
|
|
3
3
|
import { UsTinValidationAttempt } from '../../hooks';
|
|
4
4
|
|
|
5
5
|
type Options = {
|
|
@@ -7,5 +7,5 @@ type Options = {
|
|
|
7
7
|
usTinValidations?: UsTinValidationAttempt[];
|
|
8
8
|
realTimeTinValidation?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export declare const getVisibleFields: (fields: TaxDocumentation | undefined, questionnaire: QuestionnaireProp, options?: Options) =>
|
|
10
|
+
export declare const getVisibleFields: (fields: TaxDocumentation | undefined, questionnaire: QuestionnaireProp, options?: Options) => TaxDocumentationBooleanMap;
|
|
11
11
|
export {};
|
|
@@ -3,7 +3,7 @@ import { default as React } from 'react';
|
|
|
3
3
|
import { Locale, QuestionnaireProp } from '../../types';
|
|
4
4
|
import { TaxbitQuestionnairePersistProps } from '../TaxbitQuestionnairePersist';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
type BaseProps = {
|
|
7
7
|
data?: ClientTaxDocumentation;
|
|
8
8
|
language?: Locale;
|
|
9
9
|
questionnaire: QuestionnaireProp;
|
|
@@ -12,7 +12,8 @@ export type TaxbitQuestionnaireProps = {
|
|
|
12
12
|
onSubmit?: TaxbitQuestionnairePersistProps['onSubmit'];
|
|
13
13
|
dateFormat?: TaxbitQuestionnairePersistProps['dateFormat'];
|
|
14
14
|
realTimeTinValidation?: TaxbitQuestionnairePersistProps['realTimeTinValidation'];
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
|
+
type DemoProps = {
|
|
16
17
|
demoMode: true;
|
|
17
18
|
bearerToken?: never;
|
|
18
19
|
onError?: never;
|
|
@@ -20,13 +21,27 @@ export type TaxbitQuestionnaireProps = {
|
|
|
20
21
|
onSettled?: never;
|
|
21
22
|
onSuccess?: never;
|
|
22
23
|
staging?: never;
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
region?: never;
|
|
25
|
+
proxyDomain?: never;
|
|
26
|
+
};
|
|
27
|
+
type AuthenticatedBase = {
|
|
28
|
+
demoMode?: false;
|
|
25
29
|
bearerToken: TaxbitQuestionnairePersistProps['bearerToken'];
|
|
26
30
|
onError?: TaxbitQuestionnairePersistProps['onError'];
|
|
27
31
|
loadingComponent?: TaxbitQuestionnairePersistProps['loadingComponent'];
|
|
28
32
|
onSettled?: TaxbitQuestionnairePersistProps['onSettled'];
|
|
29
33
|
onSuccess?: TaxbitQuestionnairePersistProps['onSuccess'];
|
|
34
|
+
};
|
|
35
|
+
type RegionMode = {
|
|
36
|
+
region?: TaxbitQuestionnairePersistProps['region'];
|
|
37
|
+
proxyDomain?: never;
|
|
30
38
|
staging?: TaxbitQuestionnairePersistProps['staging'];
|
|
31
|
-
}
|
|
32
|
-
|
|
39
|
+
};
|
|
40
|
+
type ProxyMode = {
|
|
41
|
+
proxyDomain: TaxbitQuestionnairePersistProps['proxyDomain'];
|
|
42
|
+
region?: never;
|
|
43
|
+
staging?: never;
|
|
44
|
+
};
|
|
45
|
+
export type TaxbitQuestionnaireProps = (BaseProps & DemoProps) | (BaseProps & AuthenticatedBase & RegionMode) | (BaseProps & AuthenticatedBase & ProxyMode);
|
|
46
|
+
export declare const TaxbitQuestionnaire: ({ bearerToken, data, demoMode, language, onError, loadingComponent, onProgress, onSettled, onSubmit, onSuccess, questionnaire, staging, treatyClaims, dateFormat, realTimeTinValidation, region, proxyDomain, }: TaxbitQuestionnaireProps) => React.JSX.Element;
|
|
47
|
+
export {};
|
|
@@ -6,4 +6,4 @@ export type TaxbitQuestionnairePersistProps = UseTaxDocumentationProps & UseTaxb
|
|
|
6
6
|
loadingComponent?: React.ReactNode;
|
|
7
7
|
treatyClaims?: boolean;
|
|
8
8
|
};
|
|
9
|
-
export declare const TaxbitQuestionnairePersist: ({ staging, data, bearerToken, language, questionnaire, loadingComponent, onProgress, onSubmit, onSettled, onSuccess, onError, treatyClaims, dateFormat, realTimeTinValidation, }: TaxbitQuestionnairePersistProps) => string | number | bigint | true | 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;
|
|
9
|
+
export declare const TaxbitQuestionnairePersist: ({ staging, data, bearerToken, language, questionnaire, loadingComponent, onProgress, onSubmit, onSettled, onSuccess, onError, treatyClaims, dateFormat, realTimeTinValidation, region, proxyDomain, }: TaxbitQuestionnairePersistProps) => string | number | bigint | true | 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;
|
|
@@ -11,8 +11,10 @@ export type UseTaxbitPersistProps = {
|
|
|
11
11
|
onSettled?: (data: ClientTaxDocumentation) => void | Promise<void>;
|
|
12
12
|
onError?: (error: Error) => void | Promise<void>;
|
|
13
13
|
onSubmit?: (data: ClientTaxDocumentation) => void | Promise<void>;
|
|
14
|
+
region?: 'US' | 'EU' | string;
|
|
15
|
+
proxyDomain?: string;
|
|
14
16
|
};
|
|
15
|
-
export declare const useTaxbitPersist: ({ bearerToken, data, onError, onSettled, onSubmit, onSuccess, questionnaire, staging, }: UseTaxbitPersistProps) => {
|
|
17
|
+
export declare const useTaxbitPersist: ({ bearerToken, data, onError, onSettled, onSubmit, onSuccess, questionnaire, staging, region, proxyDomain, }: UseTaxbitPersistProps) => {
|
|
16
18
|
handleOnSubmit: (data: SignedClientTaxDocumentation) => Promise<void>;
|
|
17
19
|
externalValidations: ExternalValidations;
|
|
18
20
|
formData: ClientTaxDocumentation;
|
|
@@ -3,10 +3,11 @@ import { ShowHideInputProps } from 'ui';
|
|
|
3
3
|
|
|
4
4
|
type ShowHideInputRowProps = {
|
|
5
5
|
label?: boolean;
|
|
6
|
+
aka?: string;
|
|
6
7
|
subLabel?: boolean;
|
|
7
8
|
onChange?: (val: string) => string;
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
children?: React.ReactNode;
|
|
10
11
|
};
|
|
11
|
-
export declare const ShowHideInputRow: ({ name, label, subLabel, onChange, disabled, children, }: ShowHideInputProps & ShowHideInputRowProps) => React.JSX.Element;
|
|
12
|
+
export declare const ShowHideInputRow: ({ name, label, aka, subLabel, onChange, disabled, children, }: ShowHideInputProps & ShowHideInputRowProps) => React.JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TaxDocumentationKey } from 'types';
|
|
3
|
+
|
|
4
|
+
export type TinInputProps = {
|
|
5
|
+
countryFieldKey: TaxDocumentationKey;
|
|
6
|
+
tinFieldKey: TaxDocumentationKey;
|
|
7
|
+
notRequiredFieldKey?: TaxDocumentationKey;
|
|
8
|
+
isIndividual: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const AuTinInputRow: ({ name, disabled, aka, }: {
|
|
11
|
+
name: TaxDocumentationKey;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
isIndividual?: boolean;
|
|
14
|
+
aka?: string;
|
|
15
|
+
}) => React.JSX.Element;
|
|
16
|
+
export declare const UsTinInputRow: ({ name, disabled, isIndividual, aka, }: {
|
|
17
|
+
name: TaxDocumentationKey;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
isIndividual?: boolean;
|
|
20
|
+
aka?: string;
|
|
21
|
+
}) => React.JSX.Element;
|
|
22
|
+
export declare const TinInputRow: ({ countryFieldKey, tinFieldKey, notRequiredFieldKey, isIndividual, }: TinInputProps) => React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TinInputRow';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { TaxDocumentationKey } from 'types';
|
|
3
3
|
|
|
4
|
-
export declare const VisibleRow: ({ label, subLabel, badge, name, header, children, onEdit, }: {
|
|
4
|
+
export declare const VisibleRow: ({ label, subLabel, badge, name, header, children, onEdit, aka, }: {
|
|
5
5
|
badge?: boolean;
|
|
6
6
|
label?: boolean;
|
|
7
|
+
aka?: string;
|
|
7
8
|
subLabel?: boolean;
|
|
8
9
|
header?: string;
|
|
9
10
|
name: TaxDocumentationKey;
|