@taxbit/react-sdk 0.2.0 → 0.2.1
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/dist/contexts/FormUI/index.d.ts +2 -1
- package/dist/entry/index.d.ts +3 -2
- package/dist/hooks/useTaxBit/useTaxBit.d.ts +2 -2
- package/dist/taxbit-react-sdk.es.js +18979 -19180
- package/dist/taxbit-react-sdk.umd.js +10 -10
- package/dist/types/CamelCaseKeys.d.ts +7 -0
- package/dist/types/CountryCode.d.ts +3 -3
- package/dist/types/TaxDocumentation.d.ts +2 -2
- package/dist/types/client/index.d.ts +4 -6
- package/dist/types/index.d.ts +12 -11
- package/dist/types/server/ComprehensiveTaxDocumentation.d.ts +2 -2
- package/dist/utils/camelCaseKeys.d.ts +1 -0
- package/dist/utils/getHintKeyMap.d.ts +1 -1
- package/dist/utils/getPromptKeyMap.d.ts +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/transformInbound/getLLCClassification.d.ts +1 -1
- package/dist/validations/getRequiredFields.d.ts +1 -1
- package/dist/wizard/RowInput/VisibleRow/VisibleRow.d.ts +1 -1
- package/package.json +6 -10
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type CamelCase<S extends string> = S extends `${infer T}_${infer U}` ? `${T}${Capitalize<CamelCase<U>>}` : S;
|
|
2
|
+
export type CamelCaseKeys<T> = T extends object ? T extends (infer U)[] ? U extends object ? {
|
|
3
|
+
[K in keyof U as CamelCase<K & string>]: CamelCaseKeys<U[K]>;
|
|
4
|
+
}[] : T : {
|
|
5
|
+
[K in keyof T as CamelCase<K & string>]: CamelCaseKeys<T[K]>;
|
|
6
|
+
} : T;
|
|
7
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type CountryCode =
|
|
3
|
-
export type EUCountryCode = Extends<CountryCode,
|
|
1
|
+
import type { Extends } from './Utilities';
|
|
2
|
+
export type CountryCode = 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AR' | 'AS' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CC' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CU' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FM' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IR' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KP' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MH' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MP' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PW' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SY' | 'SZ' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'UM' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW';
|
|
3
|
+
export type EUCountryCode = Extends<CountryCode, 'AT' | 'BE' | 'BG' | 'CY' | 'CZ' | 'DE' | 'DK' | 'EE' | 'ES' | 'FI' | 'FR' | 'GR' | 'HR' | 'HU' | 'IE' | 'IT' | 'LT' | 'LU' | 'LV' | 'MT' | 'NL' | 'PL' | 'PT' | 'RO' | 'SE' | 'SI' | 'SK'>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ForeignAccountType, ForeignOtherAccountType, ForeignTrustAccountType, UsAccountType, UsLlcAccountType } from './AccountType';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { Yes } from './Yes';
|
|
3
|
+
import type { YesNo } from './YesNo';
|
|
4
4
|
export type AccountHolderClassificationData = {
|
|
5
5
|
accountHolderIsIndividual?: YesNo;
|
|
6
6
|
accountHolderIsEuResident?: YesNo;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SignedComprehensiveTaxDocumentation, TaxDocumentationStatus } from '../server';
|
|
3
|
-
export type ClientTaxDocumentation =
|
|
4
|
-
export type ClientTaxDocumentationStatus =
|
|
5
|
-
preserveConsecutiveUppercase: false;
|
|
6
|
-
}>;
|
|
1
|
+
import type { CamelCaseKeys } from 'types';
|
|
2
|
+
import type { SignedComprehensiveTaxDocumentation, TaxDocumentationStatus } from '../server';
|
|
3
|
+
export type ClientTaxDocumentation = CamelCaseKeys<SignedComprehensiveTaxDocumentation>;
|
|
4
|
+
export type ClientTaxDocumentationStatus = CamelCaseKeys<TaxDocumentationStatus>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
1
|
+
export * from './AccountType';
|
|
2
|
+
export * from './CaProvinceCode';
|
|
3
|
+
export * from './CamelCaseKeys';
|
|
4
|
+
export * from './CountryCode';
|
|
5
|
+
export * from './Locale';
|
|
6
|
+
export * from './MonthCode';
|
|
7
|
+
export * from './TaxDocumentation';
|
|
8
|
+
export * from './TaxForm';
|
|
9
|
+
export * from './UsStateCode';
|
|
10
|
+
export * from './Utilities';
|
|
11
|
+
export * from './Yes';
|
|
12
|
+
export * from './YesNo';
|
|
@@ -20,11 +20,11 @@ export type AccountHolderTaxDocumentation = {
|
|
|
20
20
|
financial_account_name?: string;
|
|
21
21
|
ftin?: string;
|
|
22
22
|
ftin_not_legally_required?: boolean;
|
|
23
|
-
tax_residences?: {
|
|
23
|
+
tax_residences?: Array<{
|
|
24
24
|
country?: string;
|
|
25
25
|
tin?: string;
|
|
26
26
|
tin_not_required?: boolean;
|
|
27
|
-
}
|
|
27
|
+
}>;
|
|
28
28
|
tin?: string;
|
|
29
29
|
vatin?: string;
|
|
30
30
|
vatin_country?: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const camelCaseKeys: (item: unknown) => unknown;
|
|
@@ -3,8 +3,8 @@ import { HintKey } from "i18n/types";
|
|
|
3
3
|
export declare const getHintKeyMap: () => {
|
|
4
4
|
signature?: "dateOfBirth" | undefined;
|
|
5
5
|
source?: "dateOfBirth" | undefined;
|
|
6
|
-
exemptFatcaCode?: "dateOfBirth" | undefined;
|
|
7
6
|
exemptPayeeCode?: "dateOfBirth" | undefined;
|
|
7
|
+
exemptFatcaCode?: "dateOfBirth" | undefined;
|
|
8
8
|
iAcknowlegeESignIsOk?: "dateOfBirth" | undefined;
|
|
9
9
|
iAmACitizenOfTheUs?: "dateOfBirth" | undefined;
|
|
10
10
|
iAmExemptFromFatcaReporting?: "dateOfBirth" | undefined;
|
|
@@ -3,8 +3,8 @@ import { TaxDocumentation, TaxDocumentationKey } from 'types/TaxDocumentation';
|
|
|
3
3
|
export declare const getPromptKeyMap: (data: TaxDocumentation) => {
|
|
4
4
|
signature?: PromptKey | undefined;
|
|
5
5
|
source?: PromptKey | undefined;
|
|
6
|
-
exemptFatcaCode?: PromptKey | undefined;
|
|
7
6
|
exemptPayeeCode?: PromptKey | undefined;
|
|
7
|
+
exemptFatcaCode?: PromptKey | undefined;
|
|
8
8
|
iAcknowlegeESignIsOk?: PromptKey | undefined;
|
|
9
9
|
iAmACitizenOfTheUs?: PromptKey | undefined;
|
|
10
10
|
iAmExemptFromFatcaReporting?: PromptKey | undefined;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { UsLLCAccountType } from 'lookups';
|
|
2
2
|
export declare const getLLCClassification: (accountType: string | undefined) => UsLLCAccountType | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { TaxDocumentationPropertyFile } from '../contexts';
|
|
2
2
|
import { TaxDocumentation } from '../types';
|
|
3
3
|
export declare const getRequiredFields: (fields: TaxDocumentation, visibleFields: TaxDocumentationPropertyFile) => TaxDocumentationPropertyFile;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taxbit/react-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "TaxBit Tax Documentation",
|
|
5
5
|
"author": "TaxBit",
|
|
6
6
|
"type": "module",
|
|
@@ -32,20 +32,16 @@
|
|
|
32
32
|
"ts": "tsc",
|
|
33
33
|
"test": "vitest"
|
|
34
34
|
},
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"@types/node": "^18.17.0",
|
|
37
|
-
"@types/react": "^18.2.15",
|
|
38
|
-
"@types/react-dom": "^18.2.7",
|
|
39
|
-
"type-fest": "^4.3.2",
|
|
40
|
-
"camelcase-keys": "^9.1.2"
|
|
41
|
-
},
|
|
42
35
|
"peerDependencies": {
|
|
43
|
-
"react": "^18.0.0",
|
|
44
|
-
"react-dom": "^18.0.0"
|
|
36
|
+
"react": "^16.0.0 || ^17.0.0 || ^18.0.0",
|
|
37
|
+
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0"
|
|
45
38
|
},
|
|
46
39
|
"devDependencies": {
|
|
40
|
+
"@types/react": "^18.0.0",
|
|
41
|
+
"@types/react-dom": "^18.0.0",
|
|
47
42
|
"@testing-library/react": "^14.0.0",
|
|
48
43
|
"@testing-library/jest-dom": "^6.1.4",
|
|
44
|
+
"@types/node": "^18.17.0",
|
|
49
45
|
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
50
46
|
"@typescript-eslint/parser": "^6.0.0",
|
|
51
47
|
"@vitejs/plugin-react": "^4.0.3",
|