@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.
Files changed (94) hide show
  1. package/README.md +47 -26
  2. package/dist/src/components/StatusMessage/StatusMessage.d.ts +6 -0
  3. package/dist/src/components/StatusMessage/index.d.ts +1 -0
  4. package/dist/src/components/index.d.ts +1 -0
  5. package/dist/src/contexts/QuestionnaireStep/getLocal.d.ts +2 -2
  6. package/dist/src/contexts/QuestionnaireStep/index.d.ts +2 -2
  7. package/dist/src/contexts/QuestionnaireStep/useQuestionnaireStep.d.ts +12 -9
  8. package/dist/src/contexts/QuestionnaireStep/useQuestionnaireStepContext.d.ts +16 -10
  9. package/dist/src/contexts/TaxDocumentation/useTaxDocumentation.d.ts +3 -1
  10. package/dist/src/hooks/useTaxbit/useTaxbit.d.ts +10 -1
  11. package/dist/src/hooks/useTaxbit/useTaxbitStatus.d.ts +3 -1
  12. package/dist/src/hooks/useUsTinVerification/useUsTinValidation.d.ts +3 -1
  13. package/dist/src/i18n/index.d.ts +1 -1
  14. package/dist/src/i18n/json/bg.json.d.ts +27 -7
  15. package/dist/src/i18n/json/cs.json.d.ts +27 -9
  16. package/dist/src/i18n/json/da.json.d.ts +27 -9
  17. package/dist/src/i18n/json/de-AT.json.d.ts +3 -3
  18. package/dist/src/i18n/json/de.json.d.ts +27 -7
  19. package/dist/src/i18n/json/el-CY.json.d.ts +2 -3
  20. package/dist/src/i18n/json/el.json.d.ts +27 -7
  21. package/dist/src/i18n/json/en-GB.json.d.ts +4 -1
  22. package/dist/src/i18n/json/en-NZ.json.d.ts +3 -0
  23. package/dist/src/i18n/json/en.json.d.ts +28 -8
  24. package/dist/src/i18n/json/es-MX.json.d.ts +3 -0
  25. package/dist/src/i18n/json/es.json.d.ts +26 -6
  26. package/dist/src/i18n/json/et.json.d.ts +27 -7
  27. package/dist/src/i18n/json/fi.json.d.ts +27 -11
  28. package/dist/src/i18n/json/fr-CA.json.d.ts +4 -1
  29. package/dist/src/i18n/json/fr-LU.json.d.ts +3 -3
  30. package/dist/src/i18n/json/fr.json.d.ts +27 -11
  31. package/dist/src/i18n/json/ga.json.d.ts +27 -7
  32. package/dist/src/i18n/json/hr.json.d.ts +27 -11
  33. package/dist/src/i18n/json/hu.json.d.ts +27 -7
  34. package/dist/src/i18n/json/it.json.d.ts +27 -11
  35. package/dist/src/i18n/json/lt.json.d.ts +27 -7
  36. package/dist/src/i18n/json/lv.json.d.ts +27 -7
  37. package/dist/src/i18n/json/mt.json.d.ts +27 -7
  38. package/dist/src/i18n/json/nl-BE.json.d.ts +44 -0
  39. package/dist/src/i18n/json/nl.json.d.ts +27 -11
  40. package/dist/src/i18n/json/no.json.d.ts +28 -12
  41. package/dist/src/i18n/json/pl.json.d.ts +27 -11
  42. package/dist/src/i18n/json/pt.json.d.ts +27 -7
  43. package/dist/src/i18n/json/ro.json.d.ts +27 -11
  44. package/dist/src/i18n/json/sk.json.d.ts +27 -9
  45. package/dist/src/i18n/json/sl.json.d.ts +27 -7
  46. package/dist/src/i18n/json/sv.json.d.ts +27 -11
  47. package/dist/src/i18n/locales/en-us.d.ts +1 -1
  48. package/dist/src/i18n/locales/en.d.ts +1 -1
  49. package/dist/src/i18n/locales/es-mx.d.ts +1 -1
  50. package/dist/src/i18n/locales/es.d.ts +1 -1
  51. package/dist/src/i18n/locales/fr-ca.d.ts +1 -1
  52. package/dist/src/i18n/locales/fr.d.ts +1 -1
  53. package/dist/src/i18n/localizationFileMap.d.ts +2 -2
  54. package/dist/src/i18n/types/LocalizationKey.d.ts +2 -2
  55. package/dist/src/i18n/types/PropertyFile.d.ts +6 -6
  56. package/dist/src/i18n/utils/getText.d.ts +11 -11
  57. package/dist/src/services/api.d.ts +9 -6
  58. package/dist/src/services/msw.d.ts +1 -0
  59. package/dist/src/types/client/ClientTaxDocumentationStatus.d.ts +6 -1
  60. package/dist/src/types/server/TaxDocumentationStatus.d.ts +6 -1
  61. package/dist/src/ui/TextInput/TextInput.d.ts +1 -2
  62. package/dist/src/utils/getFieldsState.d.ts +2 -2
  63. package/dist/src/validations/index.d.ts +6 -5
  64. package/dist/src/validations/invalidFields/getInvalidAddressFields.d.ts +2 -2
  65. package/dist/src/validations/invalidFields/getInvalidControllingPersonsFields.d.ts +2 -2
  66. package/dist/src/validations/invalidFields/getInvalidFields.d.ts +2 -2
  67. package/dist/src/validations/invalidFields/getInvalidTaxResidencyFields.d.ts +2 -2
  68. package/dist/src/validations/invalidFields/invalidFieldRules.d.ts +6 -4
  69. package/dist/src/validations/requiredFields/getRequiredControllingPersonFields.d.ts +2 -2
  70. package/dist/src/validations/requiredFields/getRequiredFields.d.ts +2 -2
  71. package/dist/src/validations/statusFields/getStatusFields.d.ts +4 -0
  72. package/dist/src/validations/statusFields/statusFieldRules.d.ts +8 -0
  73. package/dist/src/validations/supportedFields/getSupportedAddressFields.d.ts +2 -2
  74. package/dist/src/validations/supportedFields/getSupportedControllingPersonFields.d.ts +2 -2
  75. package/dist/src/validations/supportedFields/getSupportedFields.d.ts +2 -2
  76. package/dist/src/validations/supportedFields/getSupportedTaxResidenceFields.d.ts +2 -2
  77. package/dist/src/validations/visibleFields/__tests__/utils.d.ts +2 -2
  78. package/dist/src/validations/visibleFields/getVisibleAddressFields.d.ts +2 -2
  79. package/dist/src/validations/visibleFields/getVisibleControllingPersonFields.d.ts +2 -2
  80. package/dist/src/validations/visibleFields/getVisibleFields.d.ts +2 -2
  81. package/dist/src/widgets/TaxbitQuestionnaire/TaxbitQuestionnaire.d.ts +21 -6
  82. package/dist/src/widgets/TaxbitQuestionnairePersist/TaxbitQuestionnairePersist.d.ts +1 -1
  83. package/dist/src/widgets/TaxbitQuestionnairePersist/useTaxbitPersist.d.ts +3 -1
  84. package/dist/src/wizard/RowInput/ShowHideInputRow/ShowHideInputRow.d.ts +2 -1
  85. package/dist/src/wizard/RowInput/TinInputRow/TinInputRow.d.ts +22 -0
  86. package/dist/src/wizard/RowInput/TinInputRow/index.d.ts +1 -0
  87. package/dist/src/wizard/RowInput/VisibleRow/VisibleRow.d.ts +2 -1
  88. package/dist/src/wizard/RowInput/index.d.ts +1 -0
  89. package/dist/taxbit-react-sdk.js +6422 -5036
  90. package/dist/taxbit-react-sdk.umd.cjs +1 -1
  91. package/package.json +2 -2
  92. package/style/basic.css +15 -4
  93. package/style/inline.css +15 -4
  94. 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 ErrorKey = 'countryMustBeAResidenceCountry' | 'formHasErrors' | 'invalid' | 'invalidDate' | 'invalidVat' | 'mustBeFiveOrNineDigits' | 'mustBeInDateFormat' | 'mustBeNineDigits' | 'mustBeNinoFormat' | 'mustBeABNFormat' | 'mustBeCaPostalCodeFormat' | 'mustBeInVatinFormat' | 'mustBeValidBirthDate' | 'mustBeAtLeast18' | 'mustMatchName' | 'mustNotMatchVatin' | 'required' | 'residencesMustIncludeAddressCountry' | 'residencesMustIncludeAnEUCountry' | 'residencesMustIncludeVatCountry' | 'residencesMustIncludeBusinessRegistrationCountry' | 'tooLong' | 'tooShort' | 'usTinDoesNotMatchName' | 'vatinMustNotMatchResidencyTin';
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' | 'tinUkCrn' | 'tinUkNino' | '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';
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, ErrorKey, OptionKey, PromptKey, SubOptionKey, SubPromptKey, SubTitleKey, TextKey, TitleKey } from './LocalizationKey';
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
- error: {
11
- [key in ErrorKey]: string;
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' | 'tinUkCrn' | 'tinUkNino' | 'type' | 'usTin' | 'vatCountry' | 'vatIdentificationNumber' | 'vatIsNotRequired' | 'year' | 'zip'>;
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
- error: Pick<PropertyFile['error'], 'countryMustBeAResidenceCountry' | 'formHasErrors' | 'invalid' | 'invalidDate' | 'invalidVat' | 'mustBeABNFormat' | 'mustBeAtLeast18' | 'mustBeFiveOrNineDigits' | 'mustBeInDateFormat' | 'mustBeInVatinFormat' | 'mustBeNineDigits' | 'mustBeNinoFormat' | 'mustBeCaPostalCodeFormat' | 'mustBeValidBirthDate' | 'mustNotMatchVatin' | 'required' | 'residencesMustIncludeAddressCountry' | 'residencesMustIncludeAnEUCountry' | 'residencesMustIncludeVatCountry' | 'residencesMustIncludeBusinessRegistrationCountry' | 'tooLong' | 'tooShort' | 'vatinMustNotMatchResidencyTin'>;
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
- error?: Partial<ForeignPropertyFile['error']>;
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, ErrorKey, OptionKey, PromptKey, SubOptionKey, SubPromptKey } from '../types';
2
+ import { ButtonKey, OptionKey, PromptKey, StatusKey, SubOptionKey, SubPromptKey } from '../types';
3
3
 
4
- export declare const getPromptText: (key: PromptKey, data: TaxDocumentation, locale: Locale | undefined) => string;
5
- export declare const getSubPromptText: (key: SubPromptKey, data: TaxDocumentation, locale: Locale | undefined) => string;
6
- export declare const getErrorText: (key: ErrorKey, data: TaxDocumentation, locale: Locale | undefined) => string;
7
- export declare const getBadgeText: (key: string, data: TaxDocumentation, locale: Locale | undefined) => string;
8
- export declare const getTextText: (key: string, data: TaxDocumentation, locale: Locale | undefined) => string;
9
- export declare const getTitleText: (key: string, data: TaxDocumentation, locale: Locale | undefined) => string;
10
- export declare const getSubTitleText: (key: string, data: TaxDocumentation, locale: Locale | undefined) => string;
11
- export declare const getButtonText: (key: ButtonKey, data: TaxDocumentation, locale: Locale | undefined) => string;
12
- export declare const getOptionText: (key: OptionKey | undefined, data: TaxDocumentation, locale: Locale | undefined) => string;
13
- export declare const getSubOptionText: (key: SubOptionKey | undefined, data: TaxDocumentation, locale: Locale | undefined) => string | 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: "PRODUCTION" | "STAGING") => string;
10
- get: (environment: "PRODUCTION" | "STAGING", questionnaire: QuestionnaireProp) => string;
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: "PRODUCTION" | "STAGING") => string;
15
+ get: (environment: Environment, region: Region | undefined, proxyDomain: string | undefined) => string;
14
16
  };
15
17
  taxDocument: {
16
- post: (environment: "PRODUCTION" | "STAGING") => string;
17
- get: (documentId: string, environment: "PRODUCTION" | "STAGING") => string;
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: "PRODUCTION" | "STAGING") => string;
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' | 'PO_BOX_PERMANENT_ADDRESS' | 'US_PERMANENT_ADDRESS' | 'TREATY_COUNTRY_MISMATCH' | 'US_INDICIA' | 'WITHHOLDING_DOCUMENTATION' | 'CHANGE_IN_CIRCUMSTANCES';
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' | 'PO_BOX_PERMANENT_ADDRESS' | 'US_PERMANENT_ADDRESS' | 'TREATY_COUNTRY_MISMATCH' | 'US_INDICIA' | 'WITHHOLDING_DOCUMENTATION' | 'CHANGE_IN_CIRCUMSTANCES';
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, children, disabled, defaultValue, }: TextInputProps) => React.JSX.Element;
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: TaxDocumentation, questionnaire?: QuestionnaireProp, options?: Options) => {
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').ErrorKey[] | undefined;
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.ts';
3
- export * from './invalidFields/invalidFieldRules.ts';
4
- export * from './requiredFields/getRequiredFields.ts';
5
- export * from './supportedFields/getSupportedFields.ts';
6
- export * from './visibleFields/getVisibleFields.ts';
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 { FormUIValidations } from './invalidFieldRules.ts';
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) => FormUIValidations;
4
+ export declare const getInvalidAddressRules: (prefix: Prefix) => QuestionnaireValidations;
5
5
  export {};
@@ -1,3 +1,3 @@
1
- import { FormUIValidations } from './invalidFieldRules';
1
+ import { QuestionnaireValidations } from './invalidFieldRules';
2
2
 
3
- export declare const getInvalidControllingPersonsFields: () => FormUIValidations;
3
+ export declare const getInvalidControllingPersonsFields: () => QuestionnaireValidations;
@@ -1,4 +1,4 @@
1
- import { TaxDocumentationErrorFile } from '../../contexts';
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) => TaxDocumentationErrorFile;
10
+ export declare const getInvalidFields: (fields: TaxDocumentation, questionnaire: QuestionnaireProp, options?: Options) => TaxDocumentationErrorMessagesMap;
11
11
  export {};
@@ -1,5 +1,5 @@
1
- import { FormUIValidations } from './invalidFieldRules.ts';
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) => FormUIValidations;
4
+ export declare const getInvalidTaxResidencyFields: (prefix: Prefix) => QuestionnaireValidations;
5
5
  export {};
@@ -1,15 +1,17 @@
1
- import { ErrorKey } from 'i18n/types';
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) => ErrorKey[] | undefined;
11
- export type FormUIValidations = {
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: FormUIValidations;
16
+ export declare const invalidFieldRules: QuestionnaireValidations;
15
17
  export {};
@@ -1,4 +1,4 @@
1
- import { TaxDocumentationPropertyFile } from '../../contexts';
1
+ import { TaxDocumentationBooleanMap } from '../../contexts';
2
2
  import { TaxDocumentation } from '../../types';
3
3
 
4
- export declare const getRequiredControllingPersonFields: (fields: TaxDocumentation, isSelfCertification: boolean) => Partial<TaxDocumentationPropertyFile>;
4
+ export declare const getRequiredControllingPersonFields: (fields: TaxDocumentation, isSelfCertification: boolean) => Partial<TaxDocumentationBooleanMap>;
@@ -1,9 +1,9 @@
1
- import { TaxDocumentationPropertyFile } from '../../contexts';
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) => TaxDocumentationPropertyFile;
8
+ export declare const getRequiredFields: (fields: TaxDocumentation, questionnaire: QuestionnaireProp, options?: Options) => TaxDocumentationBooleanMap;
9
9
  export {};
@@ -0,0 +1,4 @@
1
+ import { TaxDocumentationErrorMessagesMap } from '../../contexts';
2
+ import { TaxDocumentation } from '../../types';
3
+
4
+ export declare const getStatusFields: (fields: TaxDocumentation) => TaxDocumentationErrorMessagesMap;
@@ -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 { TaxDocumentationPropertyFile } from '../../contexts';
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<TaxDocumentationPropertyFile>;
7
+ export declare const getSupportedAddressFields: (prefix: AddressPrefix, isSupported: boolean) => Partial<TaxDocumentationBooleanMap>;
8
8
  export {};
@@ -1,7 +1,7 @@
1
- import { TaxDocumentationPropertyFile } from '../../contexts';
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<TaxDocumentationPropertyFile>;
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 { TaxDocumentationPropertyFile } from '../../contexts';
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<TaxDocumentationPropertyFile>;
8
+ export declare const getSupportedFields: (questionnaire: QuestionnaireProp, options?: Options) => Partial<TaxDocumentationBooleanMap>;
9
9
  export {};
@@ -1,8 +1,8 @@
1
- import { TaxDocumentationPropertyFile } from '../../contexts';
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<TaxDocumentationPropertyFile>;
7
+ export declare const getSupportedTaxResidenceFields: (prefix: ResidencePrefix, isSupported: boolean, hasReason?: boolean) => Partial<TaxDocumentationBooleanMap>;
8
8
  export {};
@@ -1,3 +1,3 @@
1
- import { TaxDocumentationPropertyFile } from '../../../contexts';
1
+ import { TaxDocumentationBooleanMap } from '../../../contexts';
2
2
 
3
- export declare const getVisibleFieldsArray: (visibleFields: TaxDocumentationPropertyFile) => string[];
3
+ export declare const getVisibleFieldsArray: (visibleFields: TaxDocumentationBooleanMap) => string[];
@@ -1,5 +1,5 @@
1
- import { TaxDocumentationPropertyFile } from '../../contexts';
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<TaxDocumentationPropertyFile>;
4
+ export declare const getVisibleAddressFields: (prefix: Prefix, showFields: boolean) => Partial<TaxDocumentationBooleanMap>;
5
5
  export {};
@@ -1,4 +1,4 @@
1
- import { TaxDocumentationPropertyFile } from '../../contexts';
1
+ import { TaxDocumentationBooleanMap } from '../../contexts';
2
2
  import { TaxDocumentation } from '../../types';
3
3
 
4
- export declare const getVisibleControllingPersonFields: (fields: TaxDocumentation, isSupported: boolean) => Partial<TaxDocumentationPropertyFile>;
4
+ export declare const getVisibleControllingPersonFields: (fields: TaxDocumentation, isSupported: boolean) => Partial<TaxDocumentationBooleanMap>;
@@ -1,5 +1,5 @@
1
1
  import { QuestionnaireProp, TaxDocumentation } from 'types';
2
- import { TaxDocumentationPropertyFile } from '../../contexts';
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) => TaxDocumentationPropertyFile;
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
- export type TaxbitQuestionnaireProps = {
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
- demoMode?: false | undefined;
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
- export declare const TaxbitQuestionnaire: ({ bearerToken, data, demoMode, language, onError, loadingComponent, onProgress, onSettled, onSubmit, onSuccess, questionnaire, staging, treatyClaims, dateFormat, realTimeTinValidation, }: TaxbitQuestionnaireProps) => React.JSX.Element;
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;
@@ -8,4 +8,5 @@ export * from './SelectRow';
8
8
  export * from './ShowHideInputRow';
9
9
  export * from './TextAreaRow';
10
10
  export * from './TextInputRow';
11
+ export * from './TinInputRow';
11
12
  export * from './ToggleButtonRow';