@77sol-lab/form-schemas 1.6.1 → 2.0.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/{chunk-57OTHRRU.mjs → chunk-26RFB4ZS.mjs} +4 -4
- package/{chunk-L4XSQTZM.mjs → chunk-2JHLFEU7.mjs} +4 -4
- package/{chunk-5ZJ6TZRB.mjs → chunk-64RQV46Z.mjs} +4 -4
- package/{chunk-K6JM7OJP.mjs → chunk-6EBUH4MK.mjs} +4 -4
- package/{chunk-7QXG7J4P.mjs → chunk-6U3W3WGJ.mjs} +4 -4
- package/{chunk-TL5EG2ET.mjs → chunk-AFF2ESHC.mjs} +4 -4
- package/{chunk-HSUS7XOX.mjs → chunk-ARSY3NB7.mjs} +1 -1
- package/{chunk-26KEKEEF.mjs → chunk-DKIUSETH.mjs} +73 -24
- package/{chunk-LH3JE57U.mjs → chunk-DQ6ZS36G.mjs} +3 -3
- package/{chunk-J5YKKOCK.mjs → chunk-DRLPCEVY.mjs} +3 -3
- package/{chunk-JQLNKJFR.mjs → chunk-DWOFPI2A.mjs} +4 -4
- package/{chunk-XA4SJNUV.mjs → chunk-E5SPEAZO.mjs} +4 -4
- package/{chunk-VYVXCUYH.mjs → chunk-ECQBM5TA.mjs} +3 -3
- package/{chunk-6RYVAKNX.mjs → chunk-FBL2YW6F.mjs} +35 -37
- package/{chunk-IV6UYEKI.mjs → chunk-FGNV6RT5.mjs} +4 -4
- package/{chunk-WVDZZKR2.mjs → chunk-IVT2ZFVR.mjs} +3 -3
- package/{chunk-7L7ADQAE.mjs → chunk-J4BYCQDX.mjs} +3 -3
- package/{chunk-5F3IUHOW.mjs → chunk-KIN5ASCQ.mjs} +3 -3
- package/{chunk-6NX5BRIF.mjs → chunk-KOB7CHDM.mjs} +3 -3
- package/{chunk-PZ6JDNAK.mjs → chunk-LCD7MY35.mjs} +4 -4
- package/{chunk-SSMQ7WOS.mjs → chunk-LNPPAYB6.mjs} +4 -4
- package/{chunk-DAB6IBM6.mjs → chunk-LXNKU6Q5.mjs} +4 -4
- package/{chunk-YS6GLH4U.mjs → chunk-MKN3T4EC.mjs} +3 -3
- package/{chunk-BJZ4B43H.mjs → chunk-NQIIQVGK.mjs} +3 -3
- package/{chunk-6CTXET42.mjs → chunk-P5QT636Q.mjs} +3 -3
- package/{chunk-4LRATW5F.mjs → chunk-QFCBUDTN.mjs} +4 -4
- package/{chunk-H245MSBR.mjs → chunk-QGHAWR7N.mjs} +3 -3
- package/{chunk-U3WXTP5Y.mjs → chunk-QSMMXRNI.mjs} +4 -4
- package/{chunk-7OBG2GEG.mjs → chunk-QZ2BTLCH.mjs} +5 -5
- package/{chunk-4NVLC5QJ.mjs → chunk-TGDPLYN3.mjs} +4 -4
- package/{chunk-XKMD2F5C.mjs → chunk-VGBIJ7LQ.mjs} +4 -4
- package/{chunk-XOTWCRWX.mjs → chunk-WVQ2LFIN.mjs} +4 -4
- package/{chunk-2BJWG5HH.mjs → chunk-Z6PA77SA.mjs} +4 -4
- package/financing/formalization/index.d.cts +4663 -19403
- package/financing/formalization/index.d.ts +4663 -19403
- package/financing/formalization/index.js +136 -87
- package/financing/formalization/index.mjs +33 -33
- package/financing/formalization/schemas/AlfaPFSchema.d.cts +105 -393
- package/financing/formalization/schemas/AlfaPFSchema.d.ts +105 -393
- package/financing/formalization/schemas/AlfaPFSchema.js +59 -25
- package/financing/formalization/schemas/AlfaPFSchema.mjs +3 -3
- package/financing/formalization/schemas/AlfaPJSchema.d.cts +115 -617
- package/financing/formalization/schemas/AlfaPJSchema.d.ts +115 -617
- package/financing/formalization/schemas/AlfaPJSchema.js +117 -22
- package/financing/formalization/schemas/AlfaPJSchema.mjs +2 -2
- package/financing/formalization/schemas/BancoDoBrasilPFSchema.d.cts +105 -393
- package/financing/formalization/schemas/BancoDoBrasilPFSchema.d.ts +105 -393
- package/financing/formalization/schemas/BancoDoBrasilPFSchema.js +59 -25
- package/financing/formalization/schemas/BancoDoBrasilPFSchema.mjs +3 -3
- package/financing/formalization/schemas/BancoDoBrasilPJSchema.d.cts +115 -617
- package/financing/formalization/schemas/BancoDoBrasilPJSchema.d.ts +115 -617
- package/financing/formalization/schemas/BancoDoBrasilPJSchema.js +117 -22
- package/financing/formalization/schemas/BancoDoBrasilPJSchema.mjs +2 -2
- package/financing/formalization/schemas/BtgPFSchema.d.cts +105 -393
- package/financing/formalization/schemas/BtgPFSchema.d.ts +105 -393
- package/financing/formalization/schemas/BtgPFSchema.js +59 -25
- package/financing/formalization/schemas/BtgPFSchema.mjs +3 -3
- package/financing/formalization/schemas/BtgPJSchema.d.cts +143 -743
- package/financing/formalization/schemas/BtgPJSchema.d.ts +143 -743
- package/financing/formalization/schemas/BtgPJSchema.js +117 -22
- package/financing/formalization/schemas/BtgPJSchema.mjs +3 -3
- package/financing/formalization/schemas/BvPFSchema.d.cts +121 -473
- package/financing/formalization/schemas/BvPFSchema.d.ts +121 -473
- package/financing/formalization/schemas/BvPFSchema.js +59 -25
- package/financing/formalization/schemas/BvPFSchema.mjs +3 -3
- package/financing/formalization/schemas/BvPJSchema.d.cts +145 -815
- package/financing/formalization/schemas/BvPJSchema.d.ts +145 -815
- package/financing/formalization/schemas/BvPJSchema.js +117 -22
- package/financing/formalization/schemas/BvPJSchema.mjs +3 -3
- package/financing/formalization/schemas/CaixaEconomicaFederalPFSchema.d.cts +105 -393
- package/financing/formalization/schemas/CaixaEconomicaFederalPFSchema.d.ts +105 -393
- package/financing/formalization/schemas/CaixaEconomicaFederalPFSchema.js +59 -25
- package/financing/formalization/schemas/CaixaEconomicaFederalPFSchema.mjs +3 -3
- package/financing/formalization/schemas/CaixaEconomicaFederalPJSchema.d.cts +115 -617
- package/financing/formalization/schemas/CaixaEconomicaFederalPJSchema.d.ts +115 -617
- package/financing/formalization/schemas/CaixaEconomicaFederalPJSchema.js +117 -22
- package/financing/formalization/schemas/CaixaEconomicaFederalPJSchema.mjs +2 -2
- package/financing/formalization/schemas/CashMePFSchema.d.cts +105 -393
- package/financing/formalization/schemas/CashMePFSchema.d.ts +105 -393
- package/financing/formalization/schemas/CashMePFSchema.js +59 -25
- package/financing/formalization/schemas/CashMePFSchema.mjs +3 -3
- package/financing/formalization/schemas/CashMePJSchema.d.cts +115 -617
- package/financing/formalization/schemas/CashMePJSchema.d.ts +115 -617
- package/financing/formalization/schemas/CashMePJSchema.js +117 -22
- package/financing/formalization/schemas/CashMePJSchema.mjs +2 -2
- package/financing/formalization/schemas/Credito77PFSchema.d.cts +105 -393
- package/financing/formalization/schemas/Credito77PFSchema.d.ts +105 -393
- package/financing/formalization/schemas/Credito77PFSchema.js +59 -25
- package/financing/formalization/schemas/Credito77PFSchema.mjs +3 -3
- package/financing/formalization/schemas/Credito77PJSchema.d.cts +115 -617
- package/financing/formalization/schemas/Credito77PJSchema.d.ts +115 -617
- package/financing/formalization/schemas/Credito77PJSchema.js +117 -22
- package/financing/formalization/schemas/Credito77PJSchema.mjs +2 -2
- package/financing/formalization/schemas/EosPFSchema.d.cts +105 -393
- package/financing/formalization/schemas/EosPFSchema.d.ts +105 -393
- package/financing/formalization/schemas/EosPFSchema.js +59 -25
- package/financing/formalization/schemas/EosPFSchema.mjs +3 -3
- package/financing/formalization/schemas/EosPJSchema.d.cts +115 -617
- package/financing/formalization/schemas/EosPJSchema.d.ts +115 -617
- package/financing/formalization/schemas/EosPJSchema.js +117 -22
- package/financing/formalization/schemas/EosPJSchema.mjs +2 -2
- package/financing/formalization/schemas/HdtEnergyPFSchema.d.cts +105 -393
- package/financing/formalization/schemas/HdtEnergyPFSchema.d.ts +105 -393
- package/financing/formalization/schemas/HdtEnergyPFSchema.js +59 -25
- package/financing/formalization/schemas/HdtEnergyPFSchema.mjs +3 -3
- package/financing/formalization/schemas/HdtEnergyPJSchema.d.cts +115 -617
- package/financing/formalization/schemas/HdtEnergyPJSchema.d.ts +115 -617
- package/financing/formalization/schemas/HdtEnergyPJSchema.js +117 -22
- package/financing/formalization/schemas/HdtEnergyPJSchema.mjs +2 -2
- package/financing/formalization/schemas/LosangoPFSchema.d.cts +105 -393
- package/financing/formalization/schemas/LosangoPFSchema.d.ts +105 -393
- package/financing/formalization/schemas/LosangoPFSchema.js +59 -25
- package/financing/formalization/schemas/LosangoPFSchema.mjs +3 -3
- package/financing/formalization/schemas/LosangoPJSchema.d.cts +115 -617
- package/financing/formalization/schemas/LosangoPJSchema.d.ts +115 -617
- package/financing/formalization/schemas/LosangoPJSchema.js +117 -22
- package/financing/formalization/schemas/LosangoPJSchema.mjs +2 -2
- package/financing/formalization/schemas/SafraPFSchema.d.cts +105 -393
- package/financing/formalization/schemas/SafraPFSchema.d.ts +105 -393
- package/financing/formalization/schemas/SafraPFSchema.js +59 -25
- package/financing/formalization/schemas/SafraPFSchema.mjs +3 -3
- package/financing/formalization/schemas/SafraPJSchema.d.cts +115 -617
- package/financing/formalization/schemas/SafraPJSchema.d.ts +115 -617
- package/financing/formalization/schemas/SafraPJSchema.js +117 -22
- package/financing/formalization/schemas/SafraPJSchema.mjs +2 -2
- package/financing/formalization/schemas/SantanderPFSchema.d.cts +105 -393
- package/financing/formalization/schemas/SantanderPFSchema.d.ts +105 -393
- package/financing/formalization/schemas/SantanderPFSchema.js +59 -25
- package/financing/formalization/schemas/SantanderPFSchema.mjs +3 -3
- package/financing/formalization/schemas/SantanderPJSchema.d.cts +115 -617
- package/financing/formalization/schemas/SantanderPJSchema.d.ts +115 -617
- package/financing/formalization/schemas/SantanderPJSchema.js +117 -22
- package/financing/formalization/schemas/SantanderPJSchema.mjs +2 -2
- package/financing/formalization/schemas/SolAgoraPFSchema.d.cts +105 -393
- package/financing/formalization/schemas/SolAgoraPFSchema.d.ts +105 -393
- package/financing/formalization/schemas/SolAgoraPFSchema.js +59 -25
- package/financing/formalization/schemas/SolAgoraPFSchema.mjs +3 -3
- package/financing/formalization/schemas/SolAgoraPJSchema.d.cts +141 -721
- package/financing/formalization/schemas/SolAgoraPJSchema.d.ts +141 -721
- package/financing/formalization/schemas/SolAgoraPJSchema.js +117 -22
- package/financing/formalization/schemas/SolAgoraPJSchema.mjs +3 -3
- package/financing/formalization/schemas/SolfacilPFSchema.d.cts +105 -393
- package/financing/formalization/schemas/SolfacilPFSchema.d.ts +105 -393
- package/financing/formalization/schemas/SolfacilPFSchema.js +59 -25
- package/financing/formalization/schemas/SolfacilPFSchema.mjs +3 -3
- package/financing/formalization/schemas/SolfacilPJSchema.d.cts +127 -675
- package/financing/formalization/schemas/SolfacilPJSchema.d.ts +127 -675
- package/financing/formalization/schemas/SolfacilPJSchema.js +117 -22
- package/financing/formalization/schemas/SolfacilPJSchema.mjs +2 -2
- package/financing/formalization/schemas/UnifiedPFSchema.d.cts +167 -539
- package/financing/formalization/schemas/UnifiedPFSchema.d.ts +167 -539
- package/financing/formalization/schemas/UnifiedPFSchema.js +59 -25
- package/financing/formalization/schemas/UnifiedPFSchema.mjs +3 -3
- package/financing/formalization/schemas/UnifiedPJSchema.d.cts +219 -1223
- package/financing/formalization/schemas/UnifiedPJSchema.d.ts +219 -1223
- package/financing/formalization/schemas/UnifiedPJSchema.js +118 -23
- package/financing/formalization/schemas/UnifiedPJSchema.mjs +3 -3
- package/index.d.cts +2 -1
- package/index.d.ts +2 -1
- package/index.js +136 -87
- package/index.mjs +33 -33
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DocumentTypeEnum } from './chunk-
|
|
2
|
-
import { issueDateSchema, UfEnum, currencySchema, numberField, emailSchema, phoneBRSchema, SexEnum, birthDateSchema, integerField, cpfSchema, cepSchema, formalizationExtras, textField, cnpjSchema, cpfCnpjSchema,
|
|
1
|
+
import { DocumentTypeEnum } from './chunk-ARSY3NB7.mjs';
|
|
2
|
+
import { issueDateSchema, UfEnum, currencySchema, numberField, emailSchema, phoneBRSchema, SexEnum, birthDateSchema, integerField, cpfSchema, cepSchema, formalizationExtras, textField, cnpjSchema, NationalityEnum, NATIONALITY_BRAZIL, cpfCnpjSchema, pfRefinement } from './chunk-DKIUSETH.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
var bvPfObject = z.object({
|
|
@@ -22,7 +22,7 @@ var bvPfObject = z.object({
|
|
|
22
22
|
energy_bill_owner_document: cpfCnpjSchema.optional(),
|
|
23
23
|
civil_status: textField(),
|
|
24
24
|
state: UfEnum,
|
|
25
|
-
nationality:
|
|
25
|
+
nationality: NationalityEnum.default(NATIONALITY_BRAZIL),
|
|
26
26
|
uf_naturalness: UfEnum,
|
|
27
27
|
naturalness: textField(),
|
|
28
28
|
cellphone: phoneBRSchema,
|
|
@@ -40,6 +40,6 @@ var bvPfObject = z.object({
|
|
|
40
40
|
doc_issue_date: issueDateSchema,
|
|
41
41
|
pep_relationship: textField().optional()
|
|
42
42
|
});
|
|
43
|
-
var bvPfSchema = bvPfObject.strict().
|
|
43
|
+
var bvPfSchema = bvPfObject.strict().check(pfRefinement);
|
|
44
44
|
|
|
45
45
|
export { bvPfObject, bvPfSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DocumentTypeEnum } from './chunk-
|
|
2
|
-
import { formalizationExtras, UfEnum, dateDMYSchema, issueDateSchema, SexEnum, birthDateSchema, emailSchema, phoneBRSchema, cpfSchema, cepSchema, textField, currencySchema, cnpjSchema,
|
|
1
|
+
import { DocumentTypeEnum } from './chunk-ARSY3NB7.mjs';
|
|
2
|
+
import { formalizationExtras, UfEnum, dateDMYSchema, issueDateSchema, SexEnum, birthDateSchema, emailSchema, phoneBRSchema, cpfSchema, cepSchema, NationalityEnum, NATIONALITY_BRAZIL, textField, currencySchema, cnpjSchema, pjRefinement } from './chunk-DKIUSETH.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
var solAgoraPjObject = z.object({
|
|
@@ -48,10 +48,10 @@ var solAgoraPjObject = z.object({
|
|
|
48
48
|
mother_name: textField(),
|
|
49
49
|
naturalness: textField(),
|
|
50
50
|
uf_naturalness: UfEnum,
|
|
51
|
-
nationality:
|
|
51
|
+
nationality: NationalityEnum.default(NATIONALITY_BRAZIL)
|
|
52
52
|
}).strict()
|
|
53
53
|
)
|
|
54
54
|
});
|
|
55
|
-
var solAgoraPjSchema = solAgoraPjObject.strict().
|
|
55
|
+
var solAgoraPjSchema = solAgoraPjObject.strict().check(pjRefinement);
|
|
56
56
|
|
|
57
57
|
export { solAgoraPjObject, solAgoraPjSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DocumentTypeEnum } from './chunk-
|
|
2
|
-
import { issueDateSchema, currencySchema, emailSchema, phoneBRSchema, UfEnum, SexEnum, birthDateSchema, cpfSchema, cepSchema, formalizationExtras, textField, cpfCnpjSchema,
|
|
1
|
+
import { DocumentTypeEnum } from './chunk-ARSY3NB7.mjs';
|
|
2
|
+
import { issueDateSchema, currencySchema, emailSchema, phoneBRSchema, UfEnum, SexEnum, birthDateSchema, cpfSchema, cepSchema, formalizationExtras, textField, NationalityEnum, NATIONALITY_BRAZIL, cpfCnpjSchema, pfRefinement } from './chunk-DKIUSETH.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
var santanderPfObject = z.object({
|
|
@@ -18,7 +18,7 @@ var santanderPfObject = z.object({
|
|
|
18
18
|
city: textField(),
|
|
19
19
|
energy_bill_owner_document: cpfCnpjSchema.optional(),
|
|
20
20
|
state: UfEnum,
|
|
21
|
-
nationality:
|
|
21
|
+
nationality: NationalityEnum.default(NATIONALITY_BRAZIL),
|
|
22
22
|
cellphone: phoneBRSchema,
|
|
23
23
|
email: emailSchema,
|
|
24
24
|
monthly_income: currencySchema,
|
|
@@ -28,6 +28,6 @@ var santanderPfObject = z.object({
|
|
|
28
28
|
issuing_body: textField(6),
|
|
29
29
|
doc_issue_date: issueDateSchema
|
|
30
30
|
});
|
|
31
|
-
var santanderPfSchema = santanderPfObject.strict().
|
|
31
|
+
var santanderPfSchema = santanderPfObject.strict().check(pfRefinement);
|
|
32
32
|
|
|
33
33
|
export { santanderPfObject, santanderPfSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DocumentTypeEnum } from './chunk-
|
|
2
|
-
import { issueDateSchema, currencySchema, emailSchema, phoneBRSchema, UfEnum, SexEnum, birthDateSchema, cpfSchema, cepSchema, formalizationExtras, textField, cpfCnpjSchema,
|
|
1
|
+
import { DocumentTypeEnum } from './chunk-ARSY3NB7.mjs';
|
|
2
|
+
import { issueDateSchema, currencySchema, emailSchema, phoneBRSchema, UfEnum, SexEnum, birthDateSchema, cpfSchema, cepSchema, formalizationExtras, textField, NationalityEnum, NATIONALITY_BRAZIL, cpfCnpjSchema, pfRefinement } from './chunk-DKIUSETH.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
var safraPfObject = z.object({
|
|
@@ -18,7 +18,7 @@ var safraPfObject = z.object({
|
|
|
18
18
|
city: textField(),
|
|
19
19
|
energy_bill_owner_document: cpfCnpjSchema.optional(),
|
|
20
20
|
state: UfEnum,
|
|
21
|
-
nationality:
|
|
21
|
+
nationality: NationalityEnum.default(NATIONALITY_BRAZIL),
|
|
22
22
|
cellphone: phoneBRSchema,
|
|
23
23
|
email: emailSchema,
|
|
24
24
|
monthly_income: currencySchema,
|
|
@@ -28,6 +28,6 @@ var safraPfObject = z.object({
|
|
|
28
28
|
issuing_body: textField(6),
|
|
29
29
|
doc_issue_date: issueDateSchema
|
|
30
30
|
});
|
|
31
|
-
var safraPfSchema = safraPfObject.strict().
|
|
31
|
+
var safraPfSchema = safraPfObject.strict().check(pfRefinement);
|
|
32
32
|
|
|
33
33
|
export { safraPfObject, safraPfSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DocumentTypeEnum } from './chunk-
|
|
2
|
-
import { issueDateSchema, currencySchema, emailSchema, phoneBRSchema, UfEnum, SexEnum, birthDateSchema, cpfSchema, cepSchema, formalizationExtras, textField, cpfCnpjSchema,
|
|
1
|
+
import { DocumentTypeEnum } from './chunk-ARSY3NB7.mjs';
|
|
2
|
+
import { issueDateSchema, currencySchema, emailSchema, phoneBRSchema, UfEnum, SexEnum, birthDateSchema, cpfSchema, cepSchema, formalizationExtras, textField, NationalityEnum, NATIONALITY_BRAZIL, cpfCnpjSchema, pfRefinement } from './chunk-DKIUSETH.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
var bancoDoBrasilPfObject = z.object({
|
|
@@ -18,7 +18,7 @@ var bancoDoBrasilPfObject = z.object({
|
|
|
18
18
|
city: textField(),
|
|
19
19
|
energy_bill_owner_document: cpfCnpjSchema.optional(),
|
|
20
20
|
state: UfEnum,
|
|
21
|
-
nationality:
|
|
21
|
+
nationality: NationalityEnum.default(NATIONALITY_BRAZIL),
|
|
22
22
|
cellphone: phoneBRSchema,
|
|
23
23
|
email: emailSchema,
|
|
24
24
|
monthly_income: currencySchema,
|
|
@@ -28,6 +28,6 @@ var bancoDoBrasilPfObject = z.object({
|
|
|
28
28
|
issuing_body: textField(6),
|
|
29
29
|
doc_issue_date: issueDateSchema
|
|
30
30
|
});
|
|
31
|
-
var bancoDoBrasilPfSchema = bancoDoBrasilPfObject.strict().
|
|
31
|
+
var bancoDoBrasilPfSchema = bancoDoBrasilPfObject.strict().check(pfRefinement);
|
|
32
32
|
|
|
33
33
|
export { bancoDoBrasilPfObject, bancoDoBrasilPfSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DocumentTypeEnum } from './chunk-
|
|
2
|
-
import { issueDateSchema, currencySchema, emailSchema, phoneBRSchema, UfEnum, SexEnum, birthDateSchema, cpfSchema, cepSchema, formalizationExtras, textField, cpfCnpjSchema,
|
|
1
|
+
import { DocumentTypeEnum } from './chunk-ARSY3NB7.mjs';
|
|
2
|
+
import { issueDateSchema, currencySchema, emailSchema, phoneBRSchema, UfEnum, SexEnum, birthDateSchema, cpfSchema, cepSchema, formalizationExtras, textField, NationalityEnum, NATIONALITY_BRAZIL, cpfCnpjSchema, pfRefinement } from './chunk-DKIUSETH.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
var alfaPfObject = z.object({
|
|
@@ -18,7 +18,7 @@ var alfaPfObject = z.object({
|
|
|
18
18
|
city: textField(),
|
|
19
19
|
energy_bill_owner_document: cpfCnpjSchema.optional(),
|
|
20
20
|
state: UfEnum,
|
|
21
|
-
nationality:
|
|
21
|
+
nationality: NationalityEnum.default(NATIONALITY_BRAZIL),
|
|
22
22
|
cellphone: phoneBRSchema,
|
|
23
23
|
email: emailSchema,
|
|
24
24
|
monthly_income: currencySchema,
|
|
@@ -28,6 +28,6 @@ var alfaPfObject = z.object({
|
|
|
28
28
|
issuing_body: textField(6),
|
|
29
29
|
doc_issue_date: issueDateSchema
|
|
30
30
|
});
|
|
31
|
-
var alfaPfSchema = alfaPfObject.strict().
|
|
31
|
+
var alfaPfSchema = alfaPfObject.strict().check(pfRefinement);
|
|
32
32
|
|
|
33
33
|
export { alfaPfObject, alfaPfSchema };
|
|
@@ -2,10 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
|
|
3
3
|
// src/shared/fields/primitives.ts
|
|
4
4
|
var REQUIRED_MESSAGE = "Campo obrigat\xF3rio";
|
|
5
|
-
var REQUIRED_STRING_PARAMS = {
|
|
6
|
-
required_error: REQUIRED_MESSAGE,
|
|
7
|
-
invalid_type_error: REQUIRED_MESSAGE
|
|
8
|
-
};
|
|
5
|
+
var REQUIRED_STRING_PARAMS = { error: REQUIRED_MESSAGE };
|
|
9
6
|
function requiredString() {
|
|
10
7
|
return z.string(REQUIRED_STRING_PARAMS);
|
|
11
8
|
}
|
|
@@ -13,31 +10,74 @@ function textField(maxLength) {
|
|
|
13
10
|
const base = requiredString().trim().min(1, REQUIRED_MESSAGE);
|
|
14
11
|
return maxLength === void 0 ? base : base.max(maxLength, `M\xE1ximo ${maxLength} caracteres`);
|
|
15
12
|
}
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
function requiredNumber(invalidTypeMessage) {
|
|
14
|
+
return z.number({
|
|
15
|
+
error: (issue) => issue.input === void 0 ? REQUIRED_MESSAGE : invalidTypeMessage
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
var numberField = requiredNumber("Valor num\xE9rico inv\xE1lido").nonnegative(
|
|
19
|
+
"Valor n\xE3o pode ser negativo"
|
|
20
|
+
);
|
|
21
|
+
var integerField = requiredNumber("Valor num\xE9rico inv\xE1lido").int("Deve ser um n\xFAmero inteiro").nonnegative("Valor n\xE3o pode ser negativo");
|
|
18
22
|
function enumField(values) {
|
|
19
23
|
return z.enum(values, {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
24
|
+
// No zod 4 todo input fora da lista (inclusive undefined/null) gera um único
|
|
25
|
+
// issue `invalid_value`. Tratamos ausência, tipo inválido e string vazia
|
|
26
|
+
// (select não preenchido) como "obrigatório"; um valor de fato inválido cai
|
|
27
|
+
// na mensagem padrão do zod (retornar undefined delega ao error map default).
|
|
28
|
+
error: (issue) => typeof issue.input !== "string" || issue.input === "" ? REQUIRED_MESSAGE : void 0
|
|
26
29
|
});
|
|
27
30
|
}
|
|
28
31
|
var MAX_UPLOAD_BYTES = 5 * 1024 * 1024;
|
|
29
32
|
var ACCEPTED_UPLOAD_MIME = ["image/jpeg", "image/png", "application/pdf"];
|
|
30
33
|
var fileUploadField = z.object(
|
|
31
34
|
{
|
|
32
|
-
url: z.
|
|
33
|
-
mime: z.enum(ACCEPTED_UPLOAD_MIME, {
|
|
34
|
-
errorMap: () => ({ message: "Formato deve ser JPEG, PNG ou PDF" })
|
|
35
|
-
}),
|
|
35
|
+
url: z.url().optional(),
|
|
36
|
+
mime: z.enum(ACCEPTED_UPLOAD_MIME, { error: "Formato deve ser JPEG, PNG ou PDF" }),
|
|
36
37
|
sizeBytes: z.number().max(MAX_UPLOAD_BYTES, "Arquivo deve ter no m\xE1ximo 5MB")
|
|
37
38
|
},
|
|
38
39
|
REQUIRED_STRING_PARAMS
|
|
39
40
|
);
|
|
40
41
|
|
|
42
|
+
// src/shared/enums/nationality.ts
|
|
43
|
+
var NATIONALITY_BRAZIL = "brasil";
|
|
44
|
+
var NationalityEnum = enumField([
|
|
45
|
+
NATIONALITY_BRAZIL,
|
|
46
|
+
"argentina",
|
|
47
|
+
"bolivia",
|
|
48
|
+
"chile",
|
|
49
|
+
"colombia",
|
|
50
|
+
"paraguai",
|
|
51
|
+
"peru",
|
|
52
|
+
"uruguai",
|
|
53
|
+
"venezuela",
|
|
54
|
+
"portugal",
|
|
55
|
+
"espanha",
|
|
56
|
+
"italia",
|
|
57
|
+
"estados_unidos",
|
|
58
|
+
"japao",
|
|
59
|
+
"china",
|
|
60
|
+
"outro"
|
|
61
|
+
]);
|
|
62
|
+
var NationalityLabels = {
|
|
63
|
+
brasil: "Brasil",
|
|
64
|
+
argentina: "Argentina",
|
|
65
|
+
bolivia: "Bol\xEDvia",
|
|
66
|
+
chile: "Chile",
|
|
67
|
+
colombia: "Col\xF4mbia",
|
|
68
|
+
paraguai: "Paraguai",
|
|
69
|
+
peru: "Peru",
|
|
70
|
+
uruguai: "Uruguai",
|
|
71
|
+
venezuela: "Venezuela",
|
|
72
|
+
portugal: "Portugal",
|
|
73
|
+
espanha: "Espanha",
|
|
74
|
+
italia: "It\xE1lia",
|
|
75
|
+
estados_unidos: "Estados Unidos",
|
|
76
|
+
japao: "Jap\xE3o",
|
|
77
|
+
china: "China",
|
|
78
|
+
outro: "Outro"
|
|
79
|
+
};
|
|
80
|
+
|
|
41
81
|
// src/shared/enums/sex.ts
|
|
42
82
|
var SexEnum = enumField(["masculino", "feminino"]);
|
|
43
83
|
var SexLabels = {
|
|
@@ -254,9 +294,9 @@ function parseBRLCurrency(value) {
|
|
|
254
294
|
}
|
|
255
295
|
var currencySchema = z.preprocess(
|
|
256
296
|
parseBRLCurrency,
|
|
257
|
-
|
|
297
|
+
requiredNumber("Valor monet\xE1rio inv\xE1lido").positive("Valor deve ser positivo")
|
|
258
298
|
);
|
|
259
|
-
|
|
299
|
+
requiredNumber("Valor num\xE9rico inv\xE1lido").int("Deve ser um n\xFAmero inteiro").min(1, "M\xEDnimo 1").max(28, "M\xE1ximo 28");
|
|
260
300
|
var RG_MAX_EMISSION_YEARS = 10;
|
|
261
301
|
function applyPartnerRefinement(data, ctx) {
|
|
262
302
|
const civilStatus = data.civil_status;
|
|
@@ -269,7 +309,7 @@ function applyPartnerRefinement(data, ctx) {
|
|
|
269
309
|
const isEmpty = value === void 0 || value === null || typeof value === "string" && value.trim().length === 0;
|
|
270
310
|
if (isEmpty) {
|
|
271
311
|
ctx.addIssue({
|
|
272
|
-
code:
|
|
312
|
+
code: "custom",
|
|
273
313
|
path: [field],
|
|
274
314
|
message: "Campo obrigat\xF3rio para o estado civil informado"
|
|
275
315
|
});
|
|
@@ -283,14 +323,14 @@ function applyCommonRefinements(data, ctx) {
|
|
|
283
323
|
}
|
|
284
324
|
if (!data.proof_kinship_type) {
|
|
285
325
|
ctx.addIssue({
|
|
286
|
-
code:
|
|
326
|
+
code: "custom",
|
|
287
327
|
path: ["proof_kinship_type"],
|
|
288
328
|
message: "Tipo de comprovante \xE9 obrigat\xF3rio quando a conta est\xE1 em nome de terceiro"
|
|
289
329
|
});
|
|
290
330
|
}
|
|
291
331
|
if (!data.proof_kinship) {
|
|
292
332
|
ctx.addIssue({
|
|
293
|
-
code:
|
|
333
|
+
code: "custom",
|
|
294
334
|
path: ["proof_kinship"],
|
|
295
335
|
message: "Documento de v\xEDnculo \xE9 obrigat\xF3rio quando a conta est\xE1 em nome de terceiro"
|
|
296
336
|
});
|
|
@@ -301,7 +341,7 @@ function applyPfRefinements(data, ctx) {
|
|
|
301
341
|
applyPartnerRefinement(data, ctx);
|
|
302
342
|
if ("nature_of_occupation" in data && typeof data.nature_of_occupation === "string" && OCCUPATIONS_REQUIRING_CNPJ.includes(data.nature_of_occupation) && !data.cnpj_proprietary) {
|
|
303
343
|
ctx.addIssue({
|
|
304
|
-
code:
|
|
344
|
+
code: "custom",
|
|
305
345
|
path: ["cnpj_proprietary"],
|
|
306
346
|
message: "CNPJ do propriet\xE1rio \xE9 obrigat\xF3rio para esta ocupa\xE7\xE3o"
|
|
307
347
|
});
|
|
@@ -310,7 +350,7 @@ function applyPfRefinements(data, ctx) {
|
|
|
310
350
|
const years = yearsSinceDMY(data.doc_issue_date);
|
|
311
351
|
if (years !== null && years > RG_MAX_EMISSION_YEARS) {
|
|
312
352
|
ctx.addIssue({
|
|
313
|
-
code:
|
|
353
|
+
code: "custom",
|
|
314
354
|
path: ["doc_issue_date"],
|
|
315
355
|
message: `RG deve ter no m\xE1ximo ${RG_MAX_EMISSION_YEARS} anos de emiss\xE3o`
|
|
316
356
|
});
|
|
@@ -320,6 +360,15 @@ function applyPfRefinements(data, ctx) {
|
|
|
320
360
|
function applyPjRefinements(data, ctx) {
|
|
321
361
|
applyCommonRefinements(data, ctx);
|
|
322
362
|
}
|
|
363
|
+
function onlyUnknownKeysAborted(payload) {
|
|
364
|
+
return payload.aborted !== true && !payload.issues.some((issue) => issue.continue !== true && issue.code !== "unrecognized_keys");
|
|
365
|
+
}
|
|
366
|
+
var pfRefinement = z.superRefine(applyPfRefinements, {
|
|
367
|
+
when: onlyUnknownKeysAborted
|
|
368
|
+
});
|
|
369
|
+
var pjRefinement = z.superRefine(applyPjRefinements, {
|
|
370
|
+
when: onlyUnknownKeysAborted
|
|
371
|
+
});
|
|
323
372
|
|
|
324
373
|
// src/shared/enums/proof-kinship-type.ts
|
|
325
374
|
var ProofKinshipTypeEnum = enumField([
|
|
@@ -347,4 +396,4 @@ var formalizationExtras = {
|
|
|
347
396
|
rd_re_insurance_toggle: z.boolean().default(true)
|
|
348
397
|
};
|
|
349
398
|
|
|
350
|
-
export { CIVIL_STATUS_REQUIRING_PARTNER, OCCUPATIONS_REQUIRING_CNPJ, PARTNER_FIELDS, ProofKinshipTypeLabels, SexEnum, SexLabels, UfEnum, UfLabels,
|
|
399
|
+
export { CIVIL_STATUS_REQUIRING_PARTNER, NATIONALITY_BRAZIL, NationalityEnum, NationalityLabels, OCCUPATIONS_REQUIRING_CNPJ, PARTNER_FIELDS, ProofKinshipTypeLabels, SexEnum, SexLabels, UfEnum, UfLabels, birthDateSchema, cepSchema, cnpjSchema, cpfCnpjSchema, cpfSchema, currencySchema, dateDMYSchema, emailSchema, enumField, formalizationExtras, integerField, issueDateSchema, numberField, pfRefinement, phoneBRSchema, pjRefinement, textField };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { formalizationExtras, UfEnum, SexEnum, emailSchema, phoneBRSchema, birthDateSchema, cpfSchema, cepSchema, textField, currencySchema, cnpjSchema, issueDateSchema,
|
|
1
|
+
import { formalizationExtras, UfEnum, SexEnum, emailSchema, phoneBRSchema, birthDateSchema, cpfSchema, cepSchema, NationalityEnum, NATIONALITY_BRAZIL, textField, currencySchema, cnpjSchema, issueDateSchema, pjRefinement } from './chunk-DKIUSETH.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
var cashMePjObject = z.object({
|
|
@@ -38,10 +38,10 @@ var cashMePjObject = z.object({
|
|
|
38
38
|
state: UfEnum,
|
|
39
39
|
office: textField(),
|
|
40
40
|
mother_name: textField(),
|
|
41
|
-
nationality:
|
|
41
|
+
nationality: NationalityEnum.default(NATIONALITY_BRAZIL)
|
|
42
42
|
}).strict()
|
|
43
43
|
)
|
|
44
44
|
});
|
|
45
|
-
var cashMePjSchema = cashMePjObject.strict().
|
|
45
|
+
var cashMePjSchema = cashMePjObject.strict().check(pjRefinement);
|
|
46
46
|
|
|
47
47
|
export { cashMePjObject, cashMePjSchema };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { formalizationExtras, UfEnum, SexEnum, emailSchema, phoneBRSchema, birthDateSchema, cpfSchema, cepSchema, textField, currencySchema, cnpjSchema, issueDateSchema,
|
|
1
|
+
import { formalizationExtras, UfEnum, SexEnum, emailSchema, phoneBRSchema, birthDateSchema, cpfSchema, cepSchema, NationalityEnum, NATIONALITY_BRAZIL, textField, currencySchema, cnpjSchema, issueDateSchema, pjRefinement } from './chunk-DKIUSETH.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
var credito77PjObject = z.object({
|
|
@@ -38,10 +38,10 @@ var credito77PjObject = z.object({
|
|
|
38
38
|
state: UfEnum,
|
|
39
39
|
office: textField(),
|
|
40
40
|
mother_name: textField(),
|
|
41
|
-
nationality:
|
|
41
|
+
nationality: NationalityEnum.default(NATIONALITY_BRAZIL)
|
|
42
42
|
}).strict()
|
|
43
43
|
)
|
|
44
44
|
});
|
|
45
|
-
var credito77PjSchema = credito77PjObject.strict().
|
|
45
|
+
var credito77PjSchema = credito77PjObject.strict().check(pjRefinement);
|
|
46
46
|
|
|
47
47
|
export { credito77PjObject, credito77PjSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DocumentTypeEnum } from './chunk-
|
|
2
|
-
import { issueDateSchema, currencySchema, emailSchema, phoneBRSchema, UfEnum, SexEnum, birthDateSchema, cpfSchema, cepSchema, formalizationExtras, textField, cpfCnpjSchema,
|
|
1
|
+
import { DocumentTypeEnum } from './chunk-ARSY3NB7.mjs';
|
|
2
|
+
import { issueDateSchema, currencySchema, emailSchema, phoneBRSchema, UfEnum, SexEnum, birthDateSchema, cpfSchema, cepSchema, formalizationExtras, textField, NationalityEnum, NATIONALITY_BRAZIL, cpfCnpjSchema, pfRefinement } from './chunk-DKIUSETH.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
var cashMePfObject = z.object({
|
|
@@ -18,7 +18,7 @@ var cashMePfObject = z.object({
|
|
|
18
18
|
city: textField(),
|
|
19
19
|
energy_bill_owner_document: cpfCnpjSchema.optional(),
|
|
20
20
|
state: UfEnum,
|
|
21
|
-
nationality:
|
|
21
|
+
nationality: NationalityEnum.default(NATIONALITY_BRAZIL),
|
|
22
22
|
cellphone: phoneBRSchema,
|
|
23
23
|
email: emailSchema,
|
|
24
24
|
monthly_income: currencySchema,
|
|
@@ -28,6 +28,6 @@ var cashMePfObject = z.object({
|
|
|
28
28
|
issuing_body: textField(6),
|
|
29
29
|
doc_issue_date: issueDateSchema
|
|
30
30
|
});
|
|
31
|
-
var cashMePfSchema = cashMePfObject.strict().
|
|
31
|
+
var cashMePfSchema = cashMePfObject.strict().check(pfRefinement);
|
|
32
32
|
|
|
33
33
|
export { cashMePfObject, cashMePfSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DocumentTypeEnum } from './chunk-
|
|
2
|
-
import { issueDateSchema, currencySchema, emailSchema, phoneBRSchema, UfEnum, SexEnum, birthDateSchema, cpfSchema, cepSchema, formalizationExtras, textField, cpfCnpjSchema,
|
|
1
|
+
import { DocumentTypeEnum } from './chunk-ARSY3NB7.mjs';
|
|
2
|
+
import { issueDateSchema, currencySchema, emailSchema, phoneBRSchema, UfEnum, SexEnum, birthDateSchema, cpfSchema, cepSchema, formalizationExtras, textField, NationalityEnum, NATIONALITY_BRAZIL, cpfCnpjSchema, pfRefinement } from './chunk-DKIUSETH.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
var caixaEconomicaFederalPfObject = z.object({
|
|
@@ -18,7 +18,7 @@ var caixaEconomicaFederalPfObject = z.object({
|
|
|
18
18
|
city: textField(),
|
|
19
19
|
energy_bill_owner_document: cpfCnpjSchema.optional(),
|
|
20
20
|
state: UfEnum,
|
|
21
|
-
nationality:
|
|
21
|
+
nationality: NationalityEnum.default(NATIONALITY_BRAZIL),
|
|
22
22
|
cellphone: phoneBRSchema,
|
|
23
23
|
email: emailSchema,
|
|
24
24
|
monthly_income: currencySchema,
|
|
@@ -28,6 +28,6 @@ var caixaEconomicaFederalPfObject = z.object({
|
|
|
28
28
|
issuing_body: textField(6),
|
|
29
29
|
doc_issue_date: issueDateSchema
|
|
30
30
|
});
|
|
31
|
-
var caixaEconomicaFederalPfSchema = caixaEconomicaFederalPfObject.strict().
|
|
31
|
+
var caixaEconomicaFederalPfSchema = caixaEconomicaFederalPfObject.strict().check(pfRefinement);
|
|
32
32
|
|
|
33
33
|
export { caixaEconomicaFederalPfObject, caixaEconomicaFederalPfSchema };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { formalizationExtras, UfEnum, SexEnum, emailSchema, phoneBRSchema, birthDateSchema, cpfSchema, cepSchema, textField, currencySchema, cnpjSchema, issueDateSchema,
|
|
1
|
+
import { formalizationExtras, UfEnum, SexEnum, emailSchema, phoneBRSchema, birthDateSchema, cpfSchema, cepSchema, NationalityEnum, NATIONALITY_BRAZIL, textField, currencySchema, cnpjSchema, issueDateSchema, pjRefinement } from './chunk-DKIUSETH.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
var caixaEconomicaFederalPjObject = z.object({
|
|
@@ -38,10 +38,10 @@ var caixaEconomicaFederalPjObject = z.object({
|
|
|
38
38
|
state: UfEnum,
|
|
39
39
|
office: textField(),
|
|
40
40
|
mother_name: textField(),
|
|
41
|
-
nationality:
|
|
41
|
+
nationality: NationalityEnum.default(NATIONALITY_BRAZIL)
|
|
42
42
|
}).strict()
|
|
43
43
|
)
|
|
44
44
|
});
|
|
45
|
-
var caixaEconomicaFederalPjSchema = caixaEconomicaFederalPjObject.strict().
|
|
45
|
+
var caixaEconomicaFederalPjSchema = caixaEconomicaFederalPjObject.strict().check(pjRefinement);
|
|
46
46
|
|
|
47
47
|
export { caixaEconomicaFederalPjObject, caixaEconomicaFederalPjSchema };
|
|
@@ -1,38 +1,35 @@
|
|
|
1
|
-
import { santanderPfObject, santanderPfSchema } from './chunk-
|
|
2
|
-
import { santanderPjObject, santanderPjSchema } from './chunk-
|
|
3
|
-
import { solAgoraPfObject, solAgoraPfSchema } from './chunk-
|
|
4
|
-
import { solAgoraPjObject, solAgoraPjSchema } from './chunk-
|
|
5
|
-
import { solfacilPfObject, solfacilPfSchema } from './chunk-
|
|
6
|
-
import { solfacilPjObject, solfacilPjSchema } from './chunk-
|
|
7
|
-
import { YesOrNoLabels, CommunionRegimeLabels, CivilStatusLabels, NatureOfOccupationTypeLabels, ResidenceTypeLabels, unifiedPfSchema, unifiedPfObject } from './chunk-
|
|
8
|
-
import { unifiedPjSchema, unifiedPjObject } from './chunk-
|
|
9
|
-
import { eosPfObject, eosPfSchema } from './chunk-
|
|
10
|
-
import { eosPjObject, eosPjSchema } from './chunk-
|
|
11
|
-
import { hdtEnergyPfObject, hdtEnergyPfSchema } from './chunk-
|
|
12
|
-
import { hdtEnergyPjObject, hdtEnergyPjSchema } from './chunk-
|
|
13
|
-
import { losangoPfObject, losangoPfSchema } from './chunk-
|
|
14
|
-
import { losangoPjObject, losangoPjSchema } from './chunk-
|
|
15
|
-
import { safraPfObject, safraPfSchema } from './chunk-
|
|
16
|
-
import { safraPjObject, safraPjSchema } from './chunk-
|
|
17
|
-
import { bvPfObject, bvPfSchema } from './chunk-
|
|
18
|
-
import { bvPjObject, bvPjSchema } from './chunk-
|
|
19
|
-
import { caixaEconomicaFederalPfObject, caixaEconomicaFederalPfSchema } from './chunk-
|
|
20
|
-
import { caixaEconomicaFederalPjObject, caixaEconomicaFederalPjSchema } from './chunk-
|
|
21
|
-
import { cashMePfObject, cashMePfSchema } from './chunk-
|
|
22
|
-
import { cashMePjObject, cashMePjSchema } from './chunk-
|
|
23
|
-
import { credito77PfObject, credito77PfSchema } from './chunk-
|
|
24
|
-
import { credito77PjObject, credito77PjSchema } from './chunk-
|
|
25
|
-
import { alfaPfObject, alfaPfSchema } from './chunk-
|
|
26
|
-
import { alfaPjObject, alfaPjSchema } from './chunk-
|
|
27
|
-
import { bancoDoBrasilPfObject, bancoDoBrasilPfSchema } from './chunk-
|
|
28
|
-
import { bancoDoBrasilPjObject, bancoDoBrasilPjSchema } from './chunk-
|
|
29
|
-
import { btgPfObject, btgPfSchema } from './chunk-
|
|
30
|
-
import { btgPjObject, btgPjSchema } from './chunk-
|
|
31
|
-
import { DocumentTypeLabels } from './chunk-
|
|
32
|
-
import { enumField, ProofKinshipTypeLabels, UfLabels, SexLabels,
|
|
33
|
-
|
|
34
|
-
// src/shared/enums/nationality.ts
|
|
35
|
-
var NATIONALITY_BRAZIL = "brasil";
|
|
1
|
+
import { santanderPfObject, santanderPfSchema } from './chunk-64RQV46Z.mjs';
|
|
2
|
+
import { santanderPjObject, santanderPjSchema } from './chunk-MKN3T4EC.mjs';
|
|
3
|
+
import { solAgoraPfObject, solAgoraPfSchema } from './chunk-LNPPAYB6.mjs';
|
|
4
|
+
import { solAgoraPjObject, solAgoraPjSchema } from './chunk-2JHLFEU7.mjs';
|
|
5
|
+
import { solfacilPfObject, solfacilPfSchema } from './chunk-VGBIJ7LQ.mjs';
|
|
6
|
+
import { solfacilPjObject, solfacilPjSchema } from './chunk-IVT2ZFVR.mjs';
|
|
7
|
+
import { YesOrNoLabels, CommunionRegimeLabels, CivilStatusLabels, NatureOfOccupationTypeLabels, ResidenceTypeLabels, unifiedPfSchema, unifiedPfObject } from './chunk-TGDPLYN3.mjs';
|
|
8
|
+
import { unifiedPjSchema, unifiedPjObject } from './chunk-QZ2BTLCH.mjs';
|
|
9
|
+
import { eosPfObject, eosPfSchema } from './chunk-QSMMXRNI.mjs';
|
|
10
|
+
import { eosPjObject, eosPjSchema } from './chunk-KOB7CHDM.mjs';
|
|
11
|
+
import { hdtEnergyPfObject, hdtEnergyPfSchema } from './chunk-FGNV6RT5.mjs';
|
|
12
|
+
import { hdtEnergyPjObject, hdtEnergyPjSchema } from './chunk-P5QT636Q.mjs';
|
|
13
|
+
import { losangoPfObject, losangoPfSchema } from './chunk-Z6PA77SA.mjs';
|
|
14
|
+
import { losangoPjObject, losangoPjSchema } from './chunk-KIN5ASCQ.mjs';
|
|
15
|
+
import { safraPfObject, safraPfSchema } from './chunk-6EBUH4MK.mjs';
|
|
16
|
+
import { safraPjObject, safraPjSchema } from './chunk-J4BYCQDX.mjs';
|
|
17
|
+
import { bvPfObject, bvPfSchema } from './chunk-26RFB4ZS.mjs';
|
|
18
|
+
import { bvPjObject, bvPjSchema } from './chunk-LCD7MY35.mjs';
|
|
19
|
+
import { caixaEconomicaFederalPfObject, caixaEconomicaFederalPfSchema } from './chunk-E5SPEAZO.mjs';
|
|
20
|
+
import { caixaEconomicaFederalPjObject, caixaEconomicaFederalPjSchema } from './chunk-ECQBM5TA.mjs';
|
|
21
|
+
import { cashMePfObject, cashMePfSchema } from './chunk-DWOFPI2A.mjs';
|
|
22
|
+
import { cashMePjObject, cashMePjSchema } from './chunk-DQ6ZS36G.mjs';
|
|
23
|
+
import { credito77PfObject, credito77PfSchema } from './chunk-LXNKU6Q5.mjs';
|
|
24
|
+
import { credito77PjObject, credito77PjSchema } from './chunk-DRLPCEVY.mjs';
|
|
25
|
+
import { alfaPfObject, alfaPfSchema } from './chunk-AFF2ESHC.mjs';
|
|
26
|
+
import { alfaPjObject, alfaPjSchema } from './chunk-NQIIQVGK.mjs';
|
|
27
|
+
import { bancoDoBrasilPfObject, bancoDoBrasilPfSchema } from './chunk-6U3W3WGJ.mjs';
|
|
28
|
+
import { bancoDoBrasilPjObject, bancoDoBrasilPjSchema } from './chunk-QGHAWR7N.mjs';
|
|
29
|
+
import { btgPfObject, btgPfSchema } from './chunk-QFCBUDTN.mjs';
|
|
30
|
+
import { btgPjObject, btgPjSchema } from './chunk-WVQ2LFIN.mjs';
|
|
31
|
+
import { DocumentTypeLabels } from './chunk-ARSY3NB7.mjs';
|
|
32
|
+
import { enumField, ProofKinshipTypeLabels, UfLabels, NationalityLabels, SexLabels, pfRefinement } from './chunk-DKIUSETH.mjs';
|
|
36
33
|
|
|
37
34
|
// src/domains/financing/enums/banks.ts
|
|
38
35
|
var BANK_SLUGS = [
|
|
@@ -56,6 +53,7 @@ var BankEnum = enumField(BANK_SLUGS);
|
|
|
56
53
|
// src/domains/financing/formalization/optionLabels.ts
|
|
57
54
|
var FORMALIZATION_OPTION_LABELS = {
|
|
58
55
|
sex: SexLabels,
|
|
56
|
+
nationality: NationalityLabels,
|
|
59
57
|
type_doc: DocumentTypeLabels,
|
|
60
58
|
partner_type_doc: DocumentTypeLabels,
|
|
61
59
|
residence_situation: ResidenceTypeLabels,
|
|
@@ -167,7 +165,7 @@ function getFormalizationSchema(bank, person, options = {}) {
|
|
|
167
165
|
return unifiedSchemaByPerson[person];
|
|
168
166
|
}
|
|
169
167
|
if (isCredito77WithoutPrestamista(bank, person, options)) {
|
|
170
|
-
return credito77PfObject.omit(CREDITO77_PRESTAMISTA_FIELDS).strict().
|
|
168
|
+
return credito77PfObject.omit(CREDITO77_PRESTAMISTA_FIELDS).strict().check(pfRefinement);
|
|
171
169
|
}
|
|
172
170
|
return person === "pf" ? pfSchemaRegistry[bank] : pjSchemaRegistry[bank];
|
|
173
171
|
}
|
|
@@ -444,4 +442,4 @@ var FORMALIZATION_FIELD_META = {
|
|
|
444
442
|
}
|
|
445
443
|
};
|
|
446
444
|
|
|
447
|
-
export { BANK_SLUGS, BankEnum, FORMALIZATION_FIELD_META, FORMALIZATION_OPTION_LABELS,
|
|
445
|
+
export { BANK_SLUGS, BankEnum, FORMALIZATION_FIELD_META, FORMALIZATION_OPTION_LABELS, UNIFIED_SLUG, getFieldOptions, getFormalizationBaseSchema, getFormalizationSchema, pfBaseSchemaRegistry, pfSchemaRegistry, pjBaseSchemaRegistry, pjSchemaRegistry };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DocumentTypeEnum } from './chunk-
|
|
2
|
-
import { issueDateSchema, currencySchema, emailSchema, phoneBRSchema, UfEnum, SexEnum, birthDateSchema, cpfSchema, cepSchema, formalizationExtras, textField, cpfCnpjSchema,
|
|
1
|
+
import { DocumentTypeEnum } from './chunk-ARSY3NB7.mjs';
|
|
2
|
+
import { issueDateSchema, currencySchema, emailSchema, phoneBRSchema, UfEnum, SexEnum, birthDateSchema, cpfSchema, cepSchema, formalizationExtras, textField, NationalityEnum, NATIONALITY_BRAZIL, cpfCnpjSchema, pfRefinement } from './chunk-DKIUSETH.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
var hdtEnergyPfObject = z.object({
|
|
@@ -18,7 +18,7 @@ var hdtEnergyPfObject = z.object({
|
|
|
18
18
|
city: textField(),
|
|
19
19
|
energy_bill_owner_document: cpfCnpjSchema.optional(),
|
|
20
20
|
state: UfEnum,
|
|
21
|
-
nationality:
|
|
21
|
+
nationality: NationalityEnum.default(NATIONALITY_BRAZIL),
|
|
22
22
|
cellphone: phoneBRSchema,
|
|
23
23
|
email: emailSchema,
|
|
24
24
|
monthly_income: currencySchema,
|
|
@@ -28,6 +28,6 @@ var hdtEnergyPfObject = z.object({
|
|
|
28
28
|
issuing_body: textField(6),
|
|
29
29
|
doc_issue_date: issueDateSchema
|
|
30
30
|
});
|
|
31
|
-
var hdtEnergyPfSchema = hdtEnergyPfObject.strict().
|
|
31
|
+
var hdtEnergyPfSchema = hdtEnergyPfObject.strict().check(pfRefinement);
|
|
32
32
|
|
|
33
33
|
export { hdtEnergyPfObject, hdtEnergyPfSchema };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { formalizationExtras, currencySchema, issueDateSchema, UfEnum, SexEnum, emailSchema, phoneBRSchema, birthDateSchema, cpfSchema, cepSchema, textField, cnpjSchema,
|
|
1
|
+
import { formalizationExtras, currencySchema, issueDateSchema, UfEnum, SexEnum, emailSchema, phoneBRSchema, birthDateSchema, cpfSchema, cepSchema, NationalityEnum, NATIONALITY_BRAZIL, textField, cnpjSchema, pjRefinement } from './chunk-DKIUSETH.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
var solfacilPjObject = z.object({
|
|
@@ -43,10 +43,10 @@ var solfacilPjObject = z.object({
|
|
|
43
43
|
mother_name: textField(),
|
|
44
44
|
monthly_income: currencySchema,
|
|
45
45
|
patrimony: currencySchema,
|
|
46
|
-
nationality:
|
|
46
|
+
nationality: NationalityEnum.default(NATIONALITY_BRAZIL)
|
|
47
47
|
}).strict()
|
|
48
48
|
)
|
|
49
49
|
});
|
|
50
|
-
var solfacilPjSchema = solfacilPjObject.strict().
|
|
50
|
+
var solfacilPjSchema = solfacilPjObject.strict().check(pjRefinement);
|
|
51
51
|
|
|
52
52
|
export { solfacilPjObject, solfacilPjSchema };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { formalizationExtras, UfEnum, SexEnum, emailSchema, phoneBRSchema, birthDateSchema, cpfSchema, cepSchema, textField, currencySchema, cnpjSchema, issueDateSchema,
|
|
1
|
+
import { formalizationExtras, UfEnum, SexEnum, emailSchema, phoneBRSchema, birthDateSchema, cpfSchema, cepSchema, NationalityEnum, NATIONALITY_BRAZIL, textField, currencySchema, cnpjSchema, issueDateSchema, pjRefinement } from './chunk-DKIUSETH.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
var safraPjObject = z.object({
|
|
@@ -38,10 +38,10 @@ var safraPjObject = z.object({
|
|
|
38
38
|
state: UfEnum,
|
|
39
39
|
office: textField(),
|
|
40
40
|
mother_name: textField(),
|
|
41
|
-
nationality:
|
|
41
|
+
nationality: NationalityEnum.default(NATIONALITY_BRAZIL)
|
|
42
42
|
}).strict()
|
|
43
43
|
)
|
|
44
44
|
});
|
|
45
|
-
var safraPjSchema = safraPjObject.strict().
|
|
45
|
+
var safraPjSchema = safraPjObject.strict().check(pjRefinement);
|
|
46
46
|
|
|
47
47
|
export { safraPjObject, safraPjSchema };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { formalizationExtras, UfEnum, SexEnum, emailSchema, phoneBRSchema, birthDateSchema, cpfSchema, cepSchema, textField, currencySchema, cnpjSchema, issueDateSchema,
|
|
1
|
+
import { formalizationExtras, UfEnum, SexEnum, emailSchema, phoneBRSchema, birthDateSchema, cpfSchema, cepSchema, NationalityEnum, NATIONALITY_BRAZIL, textField, currencySchema, cnpjSchema, issueDateSchema, pjRefinement } from './chunk-DKIUSETH.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
var losangoPjObject = z.object({
|
|
@@ -38,10 +38,10 @@ var losangoPjObject = z.object({
|
|
|
38
38
|
state: UfEnum,
|
|
39
39
|
office: textField(),
|
|
40
40
|
mother_name: textField(),
|
|
41
|
-
nationality:
|
|
41
|
+
nationality: NationalityEnum.default(NATIONALITY_BRAZIL)
|
|
42
42
|
}).strict()
|
|
43
43
|
)
|
|
44
44
|
});
|
|
45
|
-
var losangoPjSchema = losangoPjObject.strict().
|
|
45
|
+
var losangoPjSchema = losangoPjObject.strict().check(pjRefinement);
|
|
46
46
|
|
|
47
47
|
export { losangoPjObject, losangoPjSchema };
|