@77sol-lab/form-schemas 1.3.0 → 1.5.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-TEL6EWAJ.mjs → chunk-2END6TYT.mjs} +3 -3
- package/{chunk-WHVCW22E.mjs → chunk-3OIG2FI5.mjs} +3 -3
- package/{chunk-FISPUQLP.mjs → chunk-4XJZIRLT.mjs} +6 -6
- package/{chunk-SBOQWT53.mjs → chunk-53GXILC6.mjs} +3 -3
- package/{chunk-CY2EXD6C.mjs → chunk-5C4YMHXV.mjs} +5 -5
- package/{chunk-TUYULPDF.mjs → chunk-6PH42V5T.mjs} +3 -3
- package/chunk-6YS5KBXS.mjs +438 -0
- package/chunk-7I2LXGA2.mjs +13 -0
- package/{chunk-2TGZGHS3.mjs → chunk-7MWUETLP.mjs} +3 -3
- package/{chunk-W3CNJVMM.mjs → chunk-7ZF45QUN.mjs} +3 -3
- package/chunk-D2ZUTYWA.mjs +109 -0
- package/{chunk-KXEEZLMR.mjs → chunk-F27U6CXB.mjs} +3 -3
- package/{chunk-TE64VI3I.mjs → chunk-FPJKWVVF.mjs} +3 -3
- package/{chunk-G3T562PC.mjs → chunk-FRMGP3C3.mjs} +3 -3
- package/{chunk-UHMVAJYK.mjs → chunk-G5SKXDYM.mjs} +3 -3
- package/{chunk-NL4VK2TF.mjs → chunk-GQ5G2YX4.mjs} +3 -3
- package/{chunk-RMWCQ6YU.mjs → chunk-H54QBCSW.mjs} +3 -3
- package/{chunk-NDJRJOFE.mjs → chunk-HBTFOSJU.mjs} +105 -33
- package/{chunk-FVIOZ4Q5.mjs → chunk-IWSDOFBY.mjs} +6 -6
- package/{chunk-HKY6D6J5.mjs → chunk-L4EWOROT.mjs} +3 -3
- package/{chunk-7LHQ27CS.mjs → chunk-N2IX5TRK.mjs} +3 -3
- package/{chunk-XNACW46V.mjs → chunk-NCTEG6EL.mjs} +11 -11
- package/{chunk-TCPW5MUT.mjs → chunk-OARPUXXM.mjs} +3 -3
- package/{chunk-ORO6OVTB.mjs → chunk-OVANLPKX.mjs} +3 -3
- package/{chunk-B7RDVG4R.mjs → chunk-R6CEKWRQ.mjs} +6 -6
- package/{chunk-MWPQSGDD.mjs → chunk-RYJSCFSY.mjs} +3 -3
- package/{chunk-36GQASLI.mjs → chunk-UMP5UF3U.mjs} +3 -3
- package/{chunk-GCYI6OFG.mjs → chunk-UU3MRKTH.mjs} +3 -3
- package/{chunk-TTHE6D3Y.mjs → chunk-UUWULEKH.mjs} +3 -3
- package/{chunk-6BD6V7EB.mjs → chunk-VO573WIK.mjs} +3 -3
- package/{chunk-22ZUS7K3.mjs → chunk-WTHEEPBE.mjs} +3 -3
- package/{chunk-EFLW2FHX.mjs → chunk-YIUJVGT4.mjs} +3 -3
- package/{chunk-XUMC3TQU.mjs → chunk-Z2TTZ3JJ.mjs} +4 -4
- package/financing/formalization/index.d.cts +2518 -2581
- package/financing/formalization/index.d.ts +2518 -2581
- package/financing/formalization/index.js +485 -154
- package/financing/formalization/index.mjs +33 -33
- package/financing/formalization/schemas/AlfaPFSchema.d.cts +50 -58
- package/financing/formalization/schemas/AlfaPFSchema.d.ts +50 -58
- package/financing/formalization/schemas/AlfaPFSchema.js +75 -35
- package/financing/formalization/schemas/AlfaPFSchema.mjs +3 -3
- package/financing/formalization/schemas/AlfaPJSchema.d.cts +60 -68
- package/financing/formalization/schemas/AlfaPJSchema.d.ts +60 -68
- package/financing/formalization/schemas/AlfaPJSchema.js +40 -24
- package/financing/formalization/schemas/AlfaPJSchema.mjs +2 -2
- package/financing/formalization/schemas/BancoDoBrasilPFSchema.d.cts +50 -58
- package/financing/formalization/schemas/BancoDoBrasilPFSchema.d.ts +50 -58
- package/financing/formalization/schemas/BancoDoBrasilPFSchema.js +75 -35
- package/financing/formalization/schemas/BancoDoBrasilPFSchema.mjs +3 -3
- package/financing/formalization/schemas/BancoDoBrasilPJSchema.d.cts +60 -68
- package/financing/formalization/schemas/BancoDoBrasilPJSchema.d.ts +60 -68
- package/financing/formalization/schemas/BancoDoBrasilPJSchema.js +40 -24
- package/financing/formalization/schemas/BancoDoBrasilPJSchema.mjs +2 -2
- package/financing/formalization/schemas/BtgPFSchema.d.cts +50 -58
- package/financing/formalization/schemas/BtgPFSchema.d.ts +50 -58
- package/financing/formalization/schemas/BtgPFSchema.js +75 -35
- package/financing/formalization/schemas/BtgPFSchema.mjs +3 -3
- package/financing/formalization/schemas/BtgPJSchema.d.cts +106 -114
- package/financing/formalization/schemas/BtgPJSchema.d.ts +106 -114
- package/financing/formalization/schemas/BtgPJSchema.js +46 -27
- package/financing/formalization/schemas/BtgPJSchema.mjs +3 -3
- package/financing/formalization/schemas/BvPFSchema.d.cts +84 -92
- package/financing/formalization/schemas/BvPFSchema.d.ts +84 -92
- package/financing/formalization/schemas/BvPFSchema.js +77 -37
- package/financing/formalization/schemas/BvPFSchema.mjs +3 -3
- package/financing/formalization/schemas/BvPJSchema.d.cts +136 -144
- package/financing/formalization/schemas/BvPJSchema.d.ts +136 -144
- package/financing/formalization/schemas/BvPJSchema.js +46 -27
- package/financing/formalization/schemas/BvPJSchema.mjs +3 -3
- package/financing/formalization/schemas/CaixaEconomicaFederalPFSchema.d.cts +50 -58
- package/financing/formalization/schemas/CaixaEconomicaFederalPFSchema.d.ts +50 -58
- package/financing/formalization/schemas/CaixaEconomicaFederalPFSchema.js +75 -35
- package/financing/formalization/schemas/CaixaEconomicaFederalPFSchema.mjs +3 -3
- package/financing/formalization/schemas/CaixaEconomicaFederalPJSchema.d.cts +60 -68
- package/financing/formalization/schemas/CaixaEconomicaFederalPJSchema.d.ts +60 -68
- package/financing/formalization/schemas/CaixaEconomicaFederalPJSchema.js +40 -24
- package/financing/formalization/schemas/CaixaEconomicaFederalPJSchema.mjs +2 -2
- package/financing/formalization/schemas/CashMePFSchema.d.cts +50 -58
- package/financing/formalization/schemas/CashMePFSchema.d.ts +50 -58
- package/financing/formalization/schemas/CashMePFSchema.js +75 -35
- package/financing/formalization/schemas/CashMePFSchema.mjs +3 -3
- package/financing/formalization/schemas/CashMePJSchema.d.cts +60 -68
- package/financing/formalization/schemas/CashMePJSchema.d.ts +60 -68
- package/financing/formalization/schemas/CashMePJSchema.js +40 -24
- package/financing/formalization/schemas/CashMePJSchema.mjs +2 -2
- package/financing/formalization/schemas/Credito77PFSchema.d.cts +50 -58
- package/financing/formalization/schemas/Credito77PFSchema.d.ts +50 -58
- package/financing/formalization/schemas/Credito77PFSchema.js +75 -35
- package/financing/formalization/schemas/Credito77PFSchema.mjs +3 -3
- package/financing/formalization/schemas/Credito77PJSchema.d.cts +60 -68
- package/financing/formalization/schemas/Credito77PJSchema.d.ts +60 -68
- package/financing/formalization/schemas/Credito77PJSchema.js +40 -24
- package/financing/formalization/schemas/Credito77PJSchema.mjs +2 -2
- package/financing/formalization/schemas/EosPFSchema.d.cts +50 -58
- package/financing/formalization/schemas/EosPFSchema.d.ts +50 -58
- package/financing/formalization/schemas/EosPFSchema.js +75 -35
- package/financing/formalization/schemas/EosPFSchema.mjs +3 -3
- package/financing/formalization/schemas/EosPJSchema.d.cts +60 -68
- package/financing/formalization/schemas/EosPJSchema.d.ts +60 -68
- package/financing/formalization/schemas/EosPJSchema.js +40 -24
- package/financing/formalization/schemas/EosPJSchema.mjs +2 -2
- package/financing/formalization/schemas/HdtEnergyPFSchema.d.cts +50 -58
- package/financing/formalization/schemas/HdtEnergyPFSchema.d.ts +50 -58
- package/financing/formalization/schemas/HdtEnergyPFSchema.js +75 -35
- package/financing/formalization/schemas/HdtEnergyPFSchema.mjs +3 -3
- package/financing/formalization/schemas/HdtEnergyPJSchema.d.cts +60 -68
- package/financing/formalization/schemas/HdtEnergyPJSchema.d.ts +60 -68
- package/financing/formalization/schemas/HdtEnergyPJSchema.js +40 -24
- package/financing/formalization/schemas/HdtEnergyPJSchema.mjs +2 -2
- package/financing/formalization/schemas/LosangoPFSchema.d.cts +50 -58
- package/financing/formalization/schemas/LosangoPFSchema.d.ts +50 -58
- package/financing/formalization/schemas/LosangoPFSchema.js +75 -35
- package/financing/formalization/schemas/LosangoPFSchema.mjs +3 -3
- package/financing/formalization/schemas/LosangoPJSchema.d.cts +60 -68
- package/financing/formalization/schemas/LosangoPJSchema.d.ts +60 -68
- package/financing/formalization/schemas/LosangoPJSchema.js +40 -24
- package/financing/formalization/schemas/LosangoPJSchema.mjs +2 -2
- package/financing/formalization/schemas/SafraPFSchema.d.cts +50 -58
- package/financing/formalization/schemas/SafraPFSchema.d.ts +50 -58
- package/financing/formalization/schemas/SafraPFSchema.js +75 -35
- package/financing/formalization/schemas/SafraPFSchema.mjs +3 -3
- package/financing/formalization/schemas/SafraPJSchema.d.cts +60 -68
- package/financing/formalization/schemas/SafraPJSchema.d.ts +60 -68
- package/financing/formalization/schemas/SafraPJSchema.js +40 -24
- package/financing/formalization/schemas/SafraPJSchema.mjs +2 -2
- package/financing/formalization/schemas/SantanderPFSchema.d.cts +50 -58
- package/financing/formalization/schemas/SantanderPFSchema.d.ts +50 -58
- package/financing/formalization/schemas/SantanderPFSchema.js +75 -35
- package/financing/formalization/schemas/SantanderPFSchema.mjs +3 -3
- package/financing/formalization/schemas/SantanderPJSchema.d.cts +60 -68
- package/financing/formalization/schemas/SantanderPJSchema.d.ts +60 -68
- package/financing/formalization/schemas/SantanderPJSchema.js +40 -24
- package/financing/formalization/schemas/SantanderPJSchema.mjs +2 -2
- package/financing/formalization/schemas/SolAgoraPFSchema.d.cts +50 -58
- package/financing/formalization/schemas/SolAgoraPFSchema.d.ts +50 -58
- package/financing/formalization/schemas/SolAgoraPFSchema.js +75 -35
- package/financing/formalization/schemas/SolAgoraPFSchema.mjs +3 -3
- package/financing/formalization/schemas/SolAgoraPJSchema.d.cts +106 -114
- package/financing/formalization/schemas/SolAgoraPJSchema.d.ts +106 -114
- package/financing/formalization/schemas/SolAgoraPJSchema.js +46 -27
- package/financing/formalization/schemas/SolAgoraPJSchema.mjs +3 -3
- package/financing/formalization/schemas/SolfacilPFSchema.d.cts +50 -58
- package/financing/formalization/schemas/SolfacilPFSchema.d.ts +50 -58
- package/financing/formalization/schemas/SolfacilPFSchema.js +75 -35
- package/financing/formalization/schemas/SolfacilPFSchema.mjs +3 -3
- package/financing/formalization/schemas/SolfacilPJSchema.d.cts +82 -90
- package/financing/formalization/schemas/SolfacilPJSchema.d.ts +82 -90
- package/financing/formalization/schemas/SolfacilPJSchema.js +41 -25
- package/financing/formalization/schemas/SolfacilPJSchema.mjs +2 -2
- package/financing/formalization/schemas/UnifiedPFSchema.d.cts +222 -166
- package/financing/formalization/schemas/UnifiedPFSchema.d.ts +222 -166
- package/financing/formalization/schemas/UnifiedPFSchema.js +114 -43
- package/financing/formalization/schemas/UnifiedPFSchema.mjs +3 -3
- package/financing/formalization/schemas/UnifiedPJSchema.d.cts +258 -266
- package/financing/formalization/schemas/UnifiedPJSchema.d.ts +258 -266
- package/financing/formalization/schemas/UnifiedPJSchema.js +51 -32
- package/financing/formalization/schemas/UnifiedPJSchema.mjs +3 -3
- package/index.d.cts +1 -1
- package/index.d.ts +1 -1
- package/index.js +485 -154
- package/index.mjs +33 -33
- package/package.json +1 -1
- package/chunk-52KJIJBF.mjs +0 -45
- package/chunk-A2TV7TRP.mjs +0 -6
- package/chunk-KKGV43J4.mjs +0 -250
|
@@ -18,9 +18,9 @@ declare const bvPfObject: z.ZodObject<{
|
|
|
18
18
|
city: z.ZodString;
|
|
19
19
|
energy_bill_owner_document: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
|
|
20
20
|
civil_status: z.ZodString;
|
|
21
|
-
state: z.
|
|
21
|
+
state: z.ZodEnum<["AC", "AL", "AP", "AM", "BA", "CE", "DF", "ES", "GO", "MA", "MT", "MS", "MG", "PA", "PB", "PR", "PE", "PI", "RJ", "RN", "RS", "RO", "RR", "SC", "SP", "SE", "TO"]>;
|
|
22
22
|
nationality: z.ZodString;
|
|
23
|
-
uf_naturalness: z.
|
|
23
|
+
uf_naturalness: z.ZodEnum<["AC", "AL", "AP", "AM", "BA", "CE", "DF", "ES", "GO", "MA", "MT", "MS", "MG", "PA", "PB", "PR", "PE", "PI", "RJ", "RN", "RS", "RO", "RR", "SC", "SP", "SE", "TO"]>;
|
|
24
24
|
naturalness: z.ZodString;
|
|
25
25
|
cellphone: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
26
26
|
email: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -30,13 +30,13 @@ declare const bvPfObject: z.ZodObject<{
|
|
|
30
30
|
company_time: z.ZodNumber;
|
|
31
31
|
cnpj_proprietary: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
|
|
32
32
|
equity_value: z.ZodNumber;
|
|
33
|
-
type_doc: z.ZodEnum<["
|
|
33
|
+
type_doc: z.ZodEnum<["documento_de_identidade", "carteira_nacional_de_habilitação"]>;
|
|
34
34
|
doc: z.ZodString;
|
|
35
35
|
issuing_body: z.ZodString;
|
|
36
|
-
emitting_state: z.
|
|
36
|
+
emitting_state: z.ZodEnum<["AC", "AL", "AP", "AM", "BA", "CE", "DF", "ES", "GO", "MA", "MT", "MS", "MG", "PA", "PB", "PR", "PE", "PI", "RJ", "RN", "RS", "RO", "RR", "SC", "SP", "SE", "TO"]>;
|
|
37
37
|
doc_issue_date: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>;
|
|
38
38
|
pep_relationship: z.ZodOptional<z.ZodString>;
|
|
39
|
-
|
|
39
|
+
voucher_local_installation_address: z.ZodObject<{
|
|
40
40
|
url: z.ZodOptional<z.ZodString>;
|
|
41
41
|
mime: z.ZodEnum<["image/jpeg", "image/png", "application/pdf"]>;
|
|
42
42
|
sizeBytes: z.ZodNumber;
|
|
@@ -49,8 +49,7 @@ declare const bvPfObject: z.ZodObject<{
|
|
|
49
49
|
sizeBytes: number;
|
|
50
50
|
url?: string | undefined;
|
|
51
51
|
}>;
|
|
52
|
-
|
|
53
|
-
bond_document_upload: z.ZodOptional<z.ZodObject<{
|
|
52
|
+
proof_kinship: z.ZodOptional<z.ZodObject<{
|
|
54
53
|
url: z.ZodOptional<z.ZodString>;
|
|
55
54
|
mime: z.ZodEnum<["image/jpeg", "image/png", "application/pdf"]>;
|
|
56
55
|
sizeBytes: z.ZodNumber;
|
|
@@ -92,29 +91,32 @@ declare const bvPfObject: z.ZodObject<{
|
|
|
92
91
|
rd_re_insurance_toggle: z.ZodDefault<z.ZodBoolean>;
|
|
93
92
|
}, "strip", z.ZodTypeAny, {
|
|
94
93
|
number: string;
|
|
95
|
-
|
|
94
|
+
sex: "masculino" | "feminino";
|
|
95
|
+
type_doc: "documento_de_identidade" | "carteira_nacional_de_habilitação";
|
|
96
|
+
residence_situation: string;
|
|
96
97
|
nature_of_occupation: string;
|
|
97
|
-
|
|
98
|
+
civil_status: string;
|
|
99
|
+
state: "AC" | "AL" | "AP" | "AM" | "BA" | "CE" | "DF" | "ES" | "GO" | "MA" | "MT" | "MS" | "MG" | "PA" | "PB" | "PR" | "PE" | "PI" | "RJ" | "RN" | "RS" | "RO" | "RR" | "SC" | "SP" | "SE" | "TO";
|
|
100
|
+
uf_naturalness: "AC" | "AL" | "AP" | "AM" | "BA" | "CE" | "DF" | "ES" | "GO" | "MA" | "MT" | "MS" | "MG" | "PA" | "PB" | "PR" | "PE" | "PI" | "RJ" | "RN" | "RS" | "RO" | "RR" | "SC" | "SP" | "SE" | "TO";
|
|
101
|
+
emitting_state: "AC" | "AL" | "AP" | "AM" | "BA" | "CE" | "DF" | "ES" | "GO" | "MA" | "MT" | "MS" | "MG" | "PA" | "PB" | "PR" | "PE" | "PI" | "RJ" | "RN" | "RS" | "RO" | "RR" | "SC" | "SP" | "SE" | "TO";
|
|
102
|
+
energy_account_in_requester_name: string;
|
|
98
103
|
doc_issue_date: string;
|
|
99
|
-
nationality: string;
|
|
100
104
|
name: string;
|
|
101
105
|
cep: string;
|
|
102
106
|
cpf: string;
|
|
103
107
|
address: string;
|
|
104
108
|
birth_date: string;
|
|
105
|
-
sex: "masculino" | "feminino";
|
|
106
109
|
mother_name: string;
|
|
107
110
|
district: string;
|
|
108
|
-
energy_account_in_requester_name: string;
|
|
109
111
|
city: string;
|
|
110
|
-
|
|
112
|
+
nationality: string;
|
|
111
113
|
cellphone: string;
|
|
112
114
|
email: string;
|
|
113
115
|
monthly_income: number;
|
|
114
116
|
profession: string;
|
|
115
117
|
doc: string;
|
|
116
118
|
issuing_body: string;
|
|
117
|
-
|
|
119
|
+
voucher_local_installation_address: {
|
|
118
120
|
mime: "image/jpeg" | "image/png" | "application/pdf";
|
|
119
121
|
sizeBytes: number;
|
|
120
122
|
url?: string | undefined;
|
|
@@ -130,16 +132,13 @@ declare const bvPfObject: z.ZodObject<{
|
|
|
130
132
|
url?: string | undefined;
|
|
131
133
|
};
|
|
132
134
|
rd_re_insurance_toggle: boolean;
|
|
133
|
-
civil_status: string;
|
|
134
|
-
uf_naturalness: string;
|
|
135
|
-
residence_situation: string;
|
|
136
135
|
months_in_residence: number;
|
|
137
136
|
is_installation_at_requester: string;
|
|
138
137
|
naturalness: string;
|
|
139
138
|
company_time: number;
|
|
140
139
|
equity_value: number;
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
pep_relationship?: string | undefined;
|
|
141
|
+
proof_kinship?: {
|
|
143
142
|
mime: "image/jpeg" | "image/png" | "application/pdf";
|
|
144
143
|
sizeBytes: number;
|
|
145
144
|
url?: string | undefined;
|
|
@@ -147,32 +146,34 @@ declare const bvPfObject: z.ZodObject<{
|
|
|
147
146
|
cnpj_proprietary?: string | undefined;
|
|
148
147
|
complement?: string | undefined;
|
|
149
148
|
energy_bill_owner_document?: string | undefined;
|
|
150
|
-
pep_relationship?: string | undefined;
|
|
151
149
|
}, {
|
|
152
150
|
number: string;
|
|
153
|
-
|
|
151
|
+
sex: "masculino" | "feminino";
|
|
152
|
+
type_doc: "documento_de_identidade" | "carteira_nacional_de_habilitação";
|
|
153
|
+
residence_situation: string;
|
|
154
154
|
nature_of_occupation: string;
|
|
155
|
-
|
|
155
|
+
civil_status: string;
|
|
156
|
+
state: "AC" | "AL" | "AP" | "AM" | "BA" | "CE" | "DF" | "ES" | "GO" | "MA" | "MT" | "MS" | "MG" | "PA" | "PB" | "PR" | "PE" | "PI" | "RJ" | "RN" | "RS" | "RO" | "RR" | "SC" | "SP" | "SE" | "TO";
|
|
157
|
+
uf_naturalness: "AC" | "AL" | "AP" | "AM" | "BA" | "CE" | "DF" | "ES" | "GO" | "MA" | "MT" | "MS" | "MG" | "PA" | "PB" | "PR" | "PE" | "PI" | "RJ" | "RN" | "RS" | "RO" | "RR" | "SC" | "SP" | "SE" | "TO";
|
|
158
|
+
emitting_state: "AC" | "AL" | "AP" | "AM" | "BA" | "CE" | "DF" | "ES" | "GO" | "MA" | "MT" | "MS" | "MG" | "PA" | "PB" | "PR" | "PE" | "PI" | "RJ" | "RN" | "RS" | "RO" | "RR" | "SC" | "SP" | "SE" | "TO";
|
|
159
|
+
energy_account_in_requester_name: string;
|
|
156
160
|
doc_issue_date: string;
|
|
157
|
-
nationality: string;
|
|
158
161
|
name: string;
|
|
159
162
|
cep: string;
|
|
160
163
|
cpf: string;
|
|
161
164
|
address: string;
|
|
162
165
|
birth_date: string;
|
|
163
|
-
sex: "masculino" | "feminino";
|
|
164
166
|
mother_name: string;
|
|
165
167
|
district: string;
|
|
166
|
-
energy_account_in_requester_name: string;
|
|
167
168
|
city: string;
|
|
168
|
-
|
|
169
|
+
nationality: string;
|
|
169
170
|
cellphone: string;
|
|
170
171
|
email: string;
|
|
171
172
|
monthly_income: number;
|
|
172
173
|
profession: string;
|
|
173
174
|
doc: string;
|
|
174
175
|
issuing_body: string;
|
|
175
|
-
|
|
176
|
+
voucher_local_installation_address: {
|
|
176
177
|
mime: "image/jpeg" | "image/png" | "application/pdf";
|
|
177
178
|
sizeBytes: number;
|
|
178
179
|
url?: string | undefined;
|
|
@@ -187,16 +188,13 @@ declare const bvPfObject: z.ZodObject<{
|
|
|
187
188
|
sizeBytes: number;
|
|
188
189
|
url?: string | undefined;
|
|
189
190
|
};
|
|
190
|
-
civil_status: string;
|
|
191
|
-
uf_naturalness: string;
|
|
192
|
-
residence_situation: string;
|
|
193
191
|
months_in_residence: number;
|
|
194
192
|
is_installation_at_requester: string;
|
|
195
193
|
naturalness: string;
|
|
196
194
|
company_time: number;
|
|
197
195
|
equity_value: number;
|
|
198
|
-
|
|
199
|
-
|
|
196
|
+
pep_relationship?: string | undefined;
|
|
197
|
+
proof_kinship?: {
|
|
200
198
|
mime: "image/jpeg" | "image/png" | "application/pdf";
|
|
201
199
|
sizeBytes: number;
|
|
202
200
|
url?: string | undefined;
|
|
@@ -205,7 +203,6 @@ declare const bvPfObject: z.ZodObject<{
|
|
|
205
203
|
complement?: string | undefined;
|
|
206
204
|
energy_bill_owner_document?: string | undefined;
|
|
207
205
|
rd_re_insurance_toggle?: boolean | undefined;
|
|
208
|
-
pep_relationship?: string | undefined;
|
|
209
206
|
}>;
|
|
210
207
|
declare const bvPfSchema: z.ZodEffects<z.ZodObject<{
|
|
211
208
|
name: z.ZodString;
|
|
@@ -225,9 +222,9 @@ declare const bvPfSchema: z.ZodEffects<z.ZodObject<{
|
|
|
225
222
|
city: z.ZodString;
|
|
226
223
|
energy_bill_owner_document: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
|
|
227
224
|
civil_status: z.ZodString;
|
|
228
|
-
state: z.
|
|
225
|
+
state: z.ZodEnum<["AC", "AL", "AP", "AM", "BA", "CE", "DF", "ES", "GO", "MA", "MT", "MS", "MG", "PA", "PB", "PR", "PE", "PI", "RJ", "RN", "RS", "RO", "RR", "SC", "SP", "SE", "TO"]>;
|
|
229
226
|
nationality: z.ZodString;
|
|
230
|
-
uf_naturalness: z.
|
|
227
|
+
uf_naturalness: z.ZodEnum<["AC", "AL", "AP", "AM", "BA", "CE", "DF", "ES", "GO", "MA", "MT", "MS", "MG", "PA", "PB", "PR", "PE", "PI", "RJ", "RN", "RS", "RO", "RR", "SC", "SP", "SE", "TO"]>;
|
|
231
228
|
naturalness: z.ZodString;
|
|
232
229
|
cellphone: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
233
230
|
email: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -237,13 +234,13 @@ declare const bvPfSchema: z.ZodEffects<z.ZodObject<{
|
|
|
237
234
|
company_time: z.ZodNumber;
|
|
238
235
|
cnpj_proprietary: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
|
|
239
236
|
equity_value: z.ZodNumber;
|
|
240
|
-
type_doc: z.ZodEnum<["
|
|
237
|
+
type_doc: z.ZodEnum<["documento_de_identidade", "carteira_nacional_de_habilitação"]>;
|
|
241
238
|
doc: z.ZodString;
|
|
242
239
|
issuing_body: z.ZodString;
|
|
243
|
-
emitting_state: z.
|
|
240
|
+
emitting_state: z.ZodEnum<["AC", "AL", "AP", "AM", "BA", "CE", "DF", "ES", "GO", "MA", "MT", "MS", "MG", "PA", "PB", "PR", "PE", "PI", "RJ", "RN", "RS", "RO", "RR", "SC", "SP", "SE", "TO"]>;
|
|
244
241
|
doc_issue_date: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>;
|
|
245
242
|
pep_relationship: z.ZodOptional<z.ZodString>;
|
|
246
|
-
|
|
243
|
+
voucher_local_installation_address: z.ZodObject<{
|
|
247
244
|
url: z.ZodOptional<z.ZodString>;
|
|
248
245
|
mime: z.ZodEnum<["image/jpeg", "image/png", "application/pdf"]>;
|
|
249
246
|
sizeBytes: z.ZodNumber;
|
|
@@ -256,8 +253,7 @@ declare const bvPfSchema: z.ZodEffects<z.ZodObject<{
|
|
|
256
253
|
sizeBytes: number;
|
|
257
254
|
url?: string | undefined;
|
|
258
255
|
}>;
|
|
259
|
-
|
|
260
|
-
bond_document_upload: z.ZodOptional<z.ZodObject<{
|
|
256
|
+
proof_kinship: z.ZodOptional<z.ZodObject<{
|
|
261
257
|
url: z.ZodOptional<z.ZodString>;
|
|
262
258
|
mime: z.ZodEnum<["image/jpeg", "image/png", "application/pdf"]>;
|
|
263
259
|
sizeBytes: z.ZodNumber;
|
|
@@ -299,29 +295,32 @@ declare const bvPfSchema: z.ZodEffects<z.ZodObject<{
|
|
|
299
295
|
rd_re_insurance_toggle: z.ZodDefault<z.ZodBoolean>;
|
|
300
296
|
}, "strict", z.ZodTypeAny, {
|
|
301
297
|
number: string;
|
|
302
|
-
|
|
298
|
+
sex: "masculino" | "feminino";
|
|
299
|
+
type_doc: "documento_de_identidade" | "carteira_nacional_de_habilitação";
|
|
300
|
+
residence_situation: string;
|
|
303
301
|
nature_of_occupation: string;
|
|
304
|
-
|
|
302
|
+
civil_status: string;
|
|
303
|
+
state: "AC" | "AL" | "AP" | "AM" | "BA" | "CE" | "DF" | "ES" | "GO" | "MA" | "MT" | "MS" | "MG" | "PA" | "PB" | "PR" | "PE" | "PI" | "RJ" | "RN" | "RS" | "RO" | "RR" | "SC" | "SP" | "SE" | "TO";
|
|
304
|
+
uf_naturalness: "AC" | "AL" | "AP" | "AM" | "BA" | "CE" | "DF" | "ES" | "GO" | "MA" | "MT" | "MS" | "MG" | "PA" | "PB" | "PR" | "PE" | "PI" | "RJ" | "RN" | "RS" | "RO" | "RR" | "SC" | "SP" | "SE" | "TO";
|
|
305
|
+
emitting_state: "AC" | "AL" | "AP" | "AM" | "BA" | "CE" | "DF" | "ES" | "GO" | "MA" | "MT" | "MS" | "MG" | "PA" | "PB" | "PR" | "PE" | "PI" | "RJ" | "RN" | "RS" | "RO" | "RR" | "SC" | "SP" | "SE" | "TO";
|
|
306
|
+
energy_account_in_requester_name: string;
|
|
305
307
|
doc_issue_date: string;
|
|
306
|
-
nationality: string;
|
|
307
308
|
name: string;
|
|
308
309
|
cep: string;
|
|
309
310
|
cpf: string;
|
|
310
311
|
address: string;
|
|
311
312
|
birth_date: string;
|
|
312
|
-
sex: "masculino" | "feminino";
|
|
313
313
|
mother_name: string;
|
|
314
314
|
district: string;
|
|
315
|
-
energy_account_in_requester_name: string;
|
|
316
315
|
city: string;
|
|
317
|
-
|
|
316
|
+
nationality: string;
|
|
318
317
|
cellphone: string;
|
|
319
318
|
email: string;
|
|
320
319
|
monthly_income: number;
|
|
321
320
|
profession: string;
|
|
322
321
|
doc: string;
|
|
323
322
|
issuing_body: string;
|
|
324
|
-
|
|
323
|
+
voucher_local_installation_address: {
|
|
325
324
|
mime: "image/jpeg" | "image/png" | "application/pdf";
|
|
326
325
|
sizeBytes: number;
|
|
327
326
|
url?: string | undefined;
|
|
@@ -337,16 +336,13 @@ declare const bvPfSchema: z.ZodEffects<z.ZodObject<{
|
|
|
337
336
|
url?: string | undefined;
|
|
338
337
|
};
|
|
339
338
|
rd_re_insurance_toggle: boolean;
|
|
340
|
-
civil_status: string;
|
|
341
|
-
uf_naturalness: string;
|
|
342
|
-
residence_situation: string;
|
|
343
339
|
months_in_residence: number;
|
|
344
340
|
is_installation_at_requester: string;
|
|
345
341
|
naturalness: string;
|
|
346
342
|
company_time: number;
|
|
347
343
|
equity_value: number;
|
|
348
|
-
|
|
349
|
-
|
|
344
|
+
pep_relationship?: string | undefined;
|
|
345
|
+
proof_kinship?: {
|
|
350
346
|
mime: "image/jpeg" | "image/png" | "application/pdf";
|
|
351
347
|
sizeBytes: number;
|
|
352
348
|
url?: string | undefined;
|
|
@@ -354,32 +350,34 @@ declare const bvPfSchema: z.ZodEffects<z.ZodObject<{
|
|
|
354
350
|
cnpj_proprietary?: string | undefined;
|
|
355
351
|
complement?: string | undefined;
|
|
356
352
|
energy_bill_owner_document?: string | undefined;
|
|
357
|
-
pep_relationship?: string | undefined;
|
|
358
353
|
}, {
|
|
359
354
|
number: string;
|
|
360
|
-
|
|
355
|
+
sex: "masculino" | "feminino";
|
|
356
|
+
type_doc: "documento_de_identidade" | "carteira_nacional_de_habilitação";
|
|
357
|
+
residence_situation: string;
|
|
361
358
|
nature_of_occupation: string;
|
|
362
|
-
|
|
359
|
+
civil_status: string;
|
|
360
|
+
state: "AC" | "AL" | "AP" | "AM" | "BA" | "CE" | "DF" | "ES" | "GO" | "MA" | "MT" | "MS" | "MG" | "PA" | "PB" | "PR" | "PE" | "PI" | "RJ" | "RN" | "RS" | "RO" | "RR" | "SC" | "SP" | "SE" | "TO";
|
|
361
|
+
uf_naturalness: "AC" | "AL" | "AP" | "AM" | "BA" | "CE" | "DF" | "ES" | "GO" | "MA" | "MT" | "MS" | "MG" | "PA" | "PB" | "PR" | "PE" | "PI" | "RJ" | "RN" | "RS" | "RO" | "RR" | "SC" | "SP" | "SE" | "TO";
|
|
362
|
+
emitting_state: "AC" | "AL" | "AP" | "AM" | "BA" | "CE" | "DF" | "ES" | "GO" | "MA" | "MT" | "MS" | "MG" | "PA" | "PB" | "PR" | "PE" | "PI" | "RJ" | "RN" | "RS" | "RO" | "RR" | "SC" | "SP" | "SE" | "TO";
|
|
363
|
+
energy_account_in_requester_name: string;
|
|
363
364
|
doc_issue_date: string;
|
|
364
|
-
nationality: string;
|
|
365
365
|
name: string;
|
|
366
366
|
cep: string;
|
|
367
367
|
cpf: string;
|
|
368
368
|
address: string;
|
|
369
369
|
birth_date: string;
|
|
370
|
-
sex: "masculino" | "feminino";
|
|
371
370
|
mother_name: string;
|
|
372
371
|
district: string;
|
|
373
|
-
energy_account_in_requester_name: string;
|
|
374
372
|
city: string;
|
|
375
|
-
|
|
373
|
+
nationality: string;
|
|
376
374
|
cellphone: string;
|
|
377
375
|
email: string;
|
|
378
376
|
monthly_income: number;
|
|
379
377
|
profession: string;
|
|
380
378
|
doc: string;
|
|
381
379
|
issuing_body: string;
|
|
382
|
-
|
|
380
|
+
voucher_local_installation_address: {
|
|
383
381
|
mime: "image/jpeg" | "image/png" | "application/pdf";
|
|
384
382
|
sizeBytes: number;
|
|
385
383
|
url?: string | undefined;
|
|
@@ -394,16 +392,13 @@ declare const bvPfSchema: z.ZodEffects<z.ZodObject<{
|
|
|
394
392
|
sizeBytes: number;
|
|
395
393
|
url?: string | undefined;
|
|
396
394
|
};
|
|
397
|
-
civil_status: string;
|
|
398
|
-
uf_naturalness: string;
|
|
399
|
-
residence_situation: string;
|
|
400
395
|
months_in_residence: number;
|
|
401
396
|
is_installation_at_requester: string;
|
|
402
397
|
naturalness: string;
|
|
403
398
|
company_time: number;
|
|
404
399
|
equity_value: number;
|
|
405
|
-
|
|
406
|
-
|
|
400
|
+
pep_relationship?: string | undefined;
|
|
401
|
+
proof_kinship?: {
|
|
407
402
|
mime: "image/jpeg" | "image/png" | "application/pdf";
|
|
408
403
|
sizeBytes: number;
|
|
409
404
|
url?: string | undefined;
|
|
@@ -412,32 +407,34 @@ declare const bvPfSchema: z.ZodEffects<z.ZodObject<{
|
|
|
412
407
|
complement?: string | undefined;
|
|
413
408
|
energy_bill_owner_document?: string | undefined;
|
|
414
409
|
rd_re_insurance_toggle?: boolean | undefined;
|
|
415
|
-
pep_relationship?: string | undefined;
|
|
416
410
|
}>, {
|
|
417
411
|
number: string;
|
|
418
|
-
|
|
412
|
+
sex: "masculino" | "feminino";
|
|
413
|
+
type_doc: "documento_de_identidade" | "carteira_nacional_de_habilitação";
|
|
414
|
+
residence_situation: string;
|
|
419
415
|
nature_of_occupation: string;
|
|
420
|
-
|
|
416
|
+
civil_status: string;
|
|
417
|
+
state: "AC" | "AL" | "AP" | "AM" | "BA" | "CE" | "DF" | "ES" | "GO" | "MA" | "MT" | "MS" | "MG" | "PA" | "PB" | "PR" | "PE" | "PI" | "RJ" | "RN" | "RS" | "RO" | "RR" | "SC" | "SP" | "SE" | "TO";
|
|
418
|
+
uf_naturalness: "AC" | "AL" | "AP" | "AM" | "BA" | "CE" | "DF" | "ES" | "GO" | "MA" | "MT" | "MS" | "MG" | "PA" | "PB" | "PR" | "PE" | "PI" | "RJ" | "RN" | "RS" | "RO" | "RR" | "SC" | "SP" | "SE" | "TO";
|
|
419
|
+
emitting_state: "AC" | "AL" | "AP" | "AM" | "BA" | "CE" | "DF" | "ES" | "GO" | "MA" | "MT" | "MS" | "MG" | "PA" | "PB" | "PR" | "PE" | "PI" | "RJ" | "RN" | "RS" | "RO" | "RR" | "SC" | "SP" | "SE" | "TO";
|
|
420
|
+
energy_account_in_requester_name: string;
|
|
421
421
|
doc_issue_date: string;
|
|
422
|
-
nationality: string;
|
|
423
422
|
name: string;
|
|
424
423
|
cep: string;
|
|
425
424
|
cpf: string;
|
|
426
425
|
address: string;
|
|
427
426
|
birth_date: string;
|
|
428
|
-
sex: "masculino" | "feminino";
|
|
429
427
|
mother_name: string;
|
|
430
428
|
district: string;
|
|
431
|
-
energy_account_in_requester_name: string;
|
|
432
429
|
city: string;
|
|
433
|
-
|
|
430
|
+
nationality: string;
|
|
434
431
|
cellphone: string;
|
|
435
432
|
email: string;
|
|
436
433
|
monthly_income: number;
|
|
437
434
|
profession: string;
|
|
438
435
|
doc: string;
|
|
439
436
|
issuing_body: string;
|
|
440
|
-
|
|
437
|
+
voucher_local_installation_address: {
|
|
441
438
|
mime: "image/jpeg" | "image/png" | "application/pdf";
|
|
442
439
|
sizeBytes: number;
|
|
443
440
|
url?: string | undefined;
|
|
@@ -453,16 +450,13 @@ declare const bvPfSchema: z.ZodEffects<z.ZodObject<{
|
|
|
453
450
|
url?: string | undefined;
|
|
454
451
|
};
|
|
455
452
|
rd_re_insurance_toggle: boolean;
|
|
456
|
-
civil_status: string;
|
|
457
|
-
uf_naturalness: string;
|
|
458
|
-
residence_situation: string;
|
|
459
453
|
months_in_residence: number;
|
|
460
454
|
is_installation_at_requester: string;
|
|
461
455
|
naturalness: string;
|
|
462
456
|
company_time: number;
|
|
463
457
|
equity_value: number;
|
|
464
|
-
|
|
465
|
-
|
|
458
|
+
pep_relationship?: string | undefined;
|
|
459
|
+
proof_kinship?: {
|
|
466
460
|
mime: "image/jpeg" | "image/png" | "application/pdf";
|
|
467
461
|
sizeBytes: number;
|
|
468
462
|
url?: string | undefined;
|
|
@@ -470,32 +464,34 @@ declare const bvPfSchema: z.ZodEffects<z.ZodObject<{
|
|
|
470
464
|
cnpj_proprietary?: string | undefined;
|
|
471
465
|
complement?: string | undefined;
|
|
472
466
|
energy_bill_owner_document?: string | undefined;
|
|
473
|
-
pep_relationship?: string | undefined;
|
|
474
467
|
}, {
|
|
475
468
|
number: string;
|
|
476
|
-
|
|
469
|
+
sex: "masculino" | "feminino";
|
|
470
|
+
type_doc: "documento_de_identidade" | "carteira_nacional_de_habilitação";
|
|
471
|
+
residence_situation: string;
|
|
477
472
|
nature_of_occupation: string;
|
|
478
|
-
|
|
473
|
+
civil_status: string;
|
|
474
|
+
state: "AC" | "AL" | "AP" | "AM" | "BA" | "CE" | "DF" | "ES" | "GO" | "MA" | "MT" | "MS" | "MG" | "PA" | "PB" | "PR" | "PE" | "PI" | "RJ" | "RN" | "RS" | "RO" | "RR" | "SC" | "SP" | "SE" | "TO";
|
|
475
|
+
uf_naturalness: "AC" | "AL" | "AP" | "AM" | "BA" | "CE" | "DF" | "ES" | "GO" | "MA" | "MT" | "MS" | "MG" | "PA" | "PB" | "PR" | "PE" | "PI" | "RJ" | "RN" | "RS" | "RO" | "RR" | "SC" | "SP" | "SE" | "TO";
|
|
476
|
+
emitting_state: "AC" | "AL" | "AP" | "AM" | "BA" | "CE" | "DF" | "ES" | "GO" | "MA" | "MT" | "MS" | "MG" | "PA" | "PB" | "PR" | "PE" | "PI" | "RJ" | "RN" | "RS" | "RO" | "RR" | "SC" | "SP" | "SE" | "TO";
|
|
477
|
+
energy_account_in_requester_name: string;
|
|
479
478
|
doc_issue_date: string;
|
|
480
|
-
nationality: string;
|
|
481
479
|
name: string;
|
|
482
480
|
cep: string;
|
|
483
481
|
cpf: string;
|
|
484
482
|
address: string;
|
|
485
483
|
birth_date: string;
|
|
486
|
-
sex: "masculino" | "feminino";
|
|
487
484
|
mother_name: string;
|
|
488
485
|
district: string;
|
|
489
|
-
energy_account_in_requester_name: string;
|
|
490
486
|
city: string;
|
|
491
|
-
|
|
487
|
+
nationality: string;
|
|
492
488
|
cellphone: string;
|
|
493
489
|
email: string;
|
|
494
490
|
monthly_income: number;
|
|
495
491
|
profession: string;
|
|
496
492
|
doc: string;
|
|
497
493
|
issuing_body: string;
|
|
498
|
-
|
|
494
|
+
voucher_local_installation_address: {
|
|
499
495
|
mime: "image/jpeg" | "image/png" | "application/pdf";
|
|
500
496
|
sizeBytes: number;
|
|
501
497
|
url?: string | undefined;
|
|
@@ -510,16 +506,13 @@ declare const bvPfSchema: z.ZodEffects<z.ZodObject<{
|
|
|
510
506
|
sizeBytes: number;
|
|
511
507
|
url?: string | undefined;
|
|
512
508
|
};
|
|
513
|
-
civil_status: string;
|
|
514
|
-
uf_naturalness: string;
|
|
515
|
-
residence_situation: string;
|
|
516
509
|
months_in_residence: number;
|
|
517
510
|
is_installation_at_requester: string;
|
|
518
511
|
naturalness: string;
|
|
519
512
|
company_time: number;
|
|
520
513
|
equity_value: number;
|
|
521
|
-
|
|
522
|
-
|
|
514
|
+
pep_relationship?: string | undefined;
|
|
515
|
+
proof_kinship?: {
|
|
523
516
|
mime: "image/jpeg" | "image/png" | "application/pdf";
|
|
524
517
|
sizeBytes: number;
|
|
525
518
|
url?: string | undefined;
|
|
@@ -528,7 +521,6 @@ declare const bvPfSchema: z.ZodEffects<z.ZodObject<{
|
|
|
528
521
|
complement?: string | undefined;
|
|
529
522
|
energy_bill_owner_document?: string | undefined;
|
|
530
523
|
rd_re_insurance_toggle?: boolean | undefined;
|
|
531
|
-
pep_relationship?: string | undefined;
|
|
532
524
|
}>;
|
|
533
525
|
type BvPfFicha = z.infer<typeof bvPfSchema>;
|
|
534
526
|
|
|
@@ -3,20 +3,46 @@
|
|
|
3
3
|
var zod = require('zod');
|
|
4
4
|
|
|
5
5
|
// src/domains/financing/formalization/schemas/BvPFSchema.ts
|
|
6
|
-
var DocumentTypeEnum = zod.z.enum([
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
var DocumentTypeEnum = zod.z.enum([
|
|
7
|
+
"documento_de_identidade",
|
|
8
|
+
"carteira_nacional_de_habilita\xE7\xE3o"
|
|
9
|
+
]);
|
|
10
10
|
var SexEnum = zod.z.enum(["masculino", "feminino"]);
|
|
11
|
+
var UfEnum = zod.z.enum([
|
|
12
|
+
"AC",
|
|
13
|
+
"AL",
|
|
14
|
+
"AP",
|
|
15
|
+
"AM",
|
|
16
|
+
"BA",
|
|
17
|
+
"CE",
|
|
18
|
+
"DF",
|
|
19
|
+
"ES",
|
|
20
|
+
"GO",
|
|
21
|
+
"MA",
|
|
22
|
+
"MT",
|
|
23
|
+
"MS",
|
|
24
|
+
"MG",
|
|
25
|
+
"PA",
|
|
26
|
+
"PB",
|
|
27
|
+
"PR",
|
|
28
|
+
"PE",
|
|
29
|
+
"PI",
|
|
30
|
+
"RJ",
|
|
31
|
+
"RN",
|
|
32
|
+
"RS",
|
|
33
|
+
"RO",
|
|
34
|
+
"RR",
|
|
35
|
+
"SC",
|
|
36
|
+
"SP",
|
|
37
|
+
"SE",
|
|
38
|
+
"TO"
|
|
39
|
+
]);
|
|
11
40
|
function textField(maxLength) {
|
|
12
41
|
const base = zod.z.string().trim().min(1, "Campo obrigat\xF3rio");
|
|
13
42
|
return maxLength === void 0 ? base : base.max(maxLength, `M\xE1ximo ${maxLength} caracteres`);
|
|
14
43
|
}
|
|
15
44
|
var numberField = zod.z.number({ invalid_type_error: "Valor num\xE9rico inv\xE1lido" }).nonnegative("Valor n\xE3o pode ser negativo");
|
|
16
45
|
var integerField = zod.z.number({ invalid_type_error: "Valor num\xE9rico inv\xE1lido" }).int("Deve ser um n\xFAmero inteiro").nonnegative("Valor n\xE3o pode ser negativo");
|
|
17
|
-
function selectField(values) {
|
|
18
|
-
return zod.z.enum(values);
|
|
19
|
-
}
|
|
20
46
|
var MAX_UPLOAD_BYTES = 5 * 1024 * 1024;
|
|
21
47
|
var ACCEPTED_UPLOAD_MIME = ["image/jpeg", "image/png", "application/pdf"];
|
|
22
48
|
var fileUploadField = zod.z.object({
|
|
@@ -123,16 +149,16 @@ function yearsSinceDMY(value, reference = /* @__PURE__ */ new Date()) {
|
|
|
123
149
|
}
|
|
124
150
|
|
|
125
151
|
// src/shared/regex/index.ts
|
|
126
|
-
var cpfSchema = zod.z.string().transform(onlyDigits).refine((v) => PATTERNS.cpf.test(v), "CPF
|
|
127
|
-
var cnpjSchema = zod.z.string().transform(onlyDigits).refine((v) => PATTERNS.cnpj.test(v), "CNPJ
|
|
152
|
+
var cpfSchema = zod.z.string().transform(onlyDigits).refine((v) => PATTERNS.cpf.test(v), "CPF inv\xE1lido").refine(isValidCPF, "CPF inv\xE1lido");
|
|
153
|
+
var cnpjSchema = zod.z.string().transform(onlyDigits).refine((v) => PATTERNS.cnpj.test(v), "CNPJ inv\xE1lido").refine(isValidCNPJ, "CNPJ inv\xE1lido");
|
|
128
154
|
var cpfCnpjSchema = zod.z.string().transform(onlyDigits).refine(
|
|
129
155
|
(v) => PATTERNS.cpf.test(v) || PATTERNS.cnpj.test(v),
|
|
130
156
|
"Documento deve ter 11 (CPF) ou 14 (CNPJ) d\xEDgitos"
|
|
131
157
|
).refine((v) => v.length === 11 ? isValidCPF(v) : isValidCNPJ(v), "Documento inv\xE1lido");
|
|
132
|
-
var cepSchema = zod.z.string().transform(onlyDigits).refine((v) => PATTERNS.cep.test(v), "CEP
|
|
133
|
-
var phoneBRSchema = zod.z.string().transform(onlyDigits).refine((v) => PATTERNS.phoneBR.test(v), "Telefone
|
|
158
|
+
var cepSchema = zod.z.string().transform(onlyDigits).refine((v) => PATTERNS.cep.test(v), "CEP inv\xE1lido");
|
|
159
|
+
var phoneBRSchema = zod.z.string().transform(onlyDigits).refine((v) => PATTERNS.phoneBR.test(v), "Telefone inv\xE1lido");
|
|
134
160
|
var emailSchema = zod.z.string().trim().refine((v) => PATTERNS.email.test(v), "E-mail inv\xE1lido");
|
|
135
|
-
var dateDMYSchema = zod.z.string().refine((v) => PATTERNS.dateDMY.test(v), "Data
|
|
161
|
+
var dateDMYSchema = zod.z.string().refine((v) => PATTERNS.dateDMY.test(v), "Data inv\xE1lida").refine((v) => parseDMY(v) !== null, "Data inexistente no calend\xE1rio");
|
|
136
162
|
var birthDateSchema = dateDMYSchema.refine(
|
|
137
163
|
(v) => isAdultDMY(v),
|
|
138
164
|
"\xC9 necess\xE1rio ser maior de idade (18+)"
|
|
@@ -143,40 +169,61 @@ var issueDateSchema = dateDMYSchema.refine(
|
|
|
143
169
|
);
|
|
144
170
|
var currencySchema = zod.z.number({ invalid_type_error: "Valor monet\xE1rio inv\xE1lido" }).positive("Valor deve ser positivo");
|
|
145
171
|
zod.z.number().int("Deve ser um n\xFAmero inteiro").min(1, "M\xEDnimo 1").max(28, "M\xE1ximo 28");
|
|
146
|
-
var THIRD_PARTY_OPTIONS = [
|
|
147
|
-
"nao_se_aplica",
|
|
148
|
-
"conjuge",
|
|
149
|
-
"pai_mae",
|
|
150
|
-
"filho_filha",
|
|
151
|
-
"parente",
|
|
152
|
-
"outro"
|
|
153
|
-
];
|
|
154
172
|
var formalizationExtras = {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
bond_document_upload: fileUploadField.optional(),
|
|
173
|
+
voucher_local_installation_address: fileUploadField,
|
|
174
|
+
proof_kinship: fileUploadField.optional(),
|
|
158
175
|
document_front_upload: fileUploadField,
|
|
159
176
|
document_back_upload: fileUploadField,
|
|
160
|
-
// RN-014: seguro RD/RE começa ON.
|
|
161
177
|
rd_re_insurance_toggle: zod.z.boolean().default(true)
|
|
162
178
|
};
|
|
163
179
|
|
|
180
|
+
// src/domains/financing/enums/civil-status.ts
|
|
181
|
+
var CIVIL_STATUS_REQUIRING_PARTNER = ["casado"];
|
|
182
|
+
var PARTNER_FIELDS = [
|
|
183
|
+
"partner_name",
|
|
184
|
+
"partner_birth",
|
|
185
|
+
"partner_type_doc",
|
|
186
|
+
"partner_doc",
|
|
187
|
+
"partner_cpf",
|
|
188
|
+
"partner_city",
|
|
189
|
+
"communion_regime"
|
|
190
|
+
];
|
|
191
|
+
|
|
164
192
|
// src/domains/financing/enums/occupation.ts
|
|
165
193
|
var OCCUPATIONS_REQUIRING_CNPJ = ["empresario", "empresario_ou_proprietario"];
|
|
166
194
|
|
|
167
195
|
// src/domains/financing/formalization/refinements.ts
|
|
168
196
|
var RG_MAX_EMISSION_YEARS = 10;
|
|
197
|
+
function applyPartnerRefinement(data, ctx) {
|
|
198
|
+
const civilStatus = data.civil_status;
|
|
199
|
+
const requiresPartner = typeof civilStatus === "string" && CIVIL_STATUS_REQUIRING_PARTNER.includes(civilStatus);
|
|
200
|
+
if (!requiresPartner) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
for (const field of PARTNER_FIELDS) {
|
|
204
|
+
const value = data[field];
|
|
205
|
+
const isEmpty = value === void 0 || value === null || typeof value === "string" && value.trim().length === 0;
|
|
206
|
+
if (isEmpty) {
|
|
207
|
+
ctx.addIssue({
|
|
208
|
+
code: zod.z.ZodIssueCode.custom,
|
|
209
|
+
path: [field],
|
|
210
|
+
message: "Campo obrigat\xF3rio para o estado civil informado"
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
169
215
|
function applyCommonRefinements(data, ctx) {
|
|
170
|
-
if ("
|
|
216
|
+
if ("energy_account_in_requester_name" in data && typeof data.energy_account_in_requester_name === "string" && data.energy_account_in_requester_name !== "nao_aplica" && !data.proof_kinship) {
|
|
171
217
|
ctx.addIssue({
|
|
172
218
|
code: zod.z.ZodIssueCode.custom,
|
|
173
|
-
path: ["
|
|
219
|
+
path: ["proof_kinship"],
|
|
174
220
|
message: "Documento de v\xEDnculo \xE9 obrigat\xF3rio quando a conta est\xE1 em nome de terceiro"
|
|
175
221
|
});
|
|
176
222
|
}
|
|
177
223
|
}
|
|
178
224
|
function applyPfRefinements(data, ctx) {
|
|
179
225
|
applyCommonRefinements(data, ctx);
|
|
226
|
+
applyPartnerRefinement(data, ctx);
|
|
180
227
|
if ("nature_of_occupation" in data && typeof data.nature_of_occupation === "string" && OCCUPATIONS_REQUIRING_CNPJ.includes(data.nature_of_occupation) && !data.cnpj_proprietary) {
|
|
181
228
|
ctx.addIssue({
|
|
182
229
|
code: zod.z.ZodIssueCode.custom,
|
|
@@ -184,7 +231,7 @@ function applyPfRefinements(data, ctx) {
|
|
|
184
231
|
message: "CNPJ do propriet\xE1rio \xE9 obrigat\xF3rio para esta ocupa\xE7\xE3o"
|
|
185
232
|
});
|
|
186
233
|
}
|
|
187
|
-
if (data.type_doc === "
|
|
234
|
+
if (data.type_doc === "documento_de_identidade" && typeof data.doc_issue_date === "string") {
|
|
188
235
|
const years = yearsSinceDMY(data.doc_issue_date);
|
|
189
236
|
if (years !== null && years > RG_MAX_EMISSION_YEARS) {
|
|
190
237
|
ctx.addIssue({
|
|
@@ -194,13 +241,6 @@ function applyPfRefinements(data, ctx) {
|
|
|
194
241
|
});
|
|
195
242
|
}
|
|
196
243
|
}
|
|
197
|
-
if (typeof data.nationality === "string" && data.nationality.toLowerCase() !== NATIONALITY_BRAZIL && "type_doc" in data && data.type_doc !== "rne") {
|
|
198
|
-
ctx.addIssue({
|
|
199
|
-
code: zod.z.ZodIssueCode.custom,
|
|
200
|
-
path: ["type_doc"],
|
|
201
|
-
message: "Para nacionalidade estrangeira, o documento deve ser Registro de Estrangeiro (RNE)"
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
244
|
}
|
|
205
245
|
|
|
206
246
|
// src/domains/financing/formalization/schemas/BvPFSchema.ts
|
|
@@ -223,9 +263,9 @@ var bvPfObject = zod.z.object({
|
|
|
223
263
|
city: textField(),
|
|
224
264
|
energy_bill_owner_document: cpfCnpjSchema.optional(),
|
|
225
265
|
civil_status: textField(),
|
|
226
|
-
state:
|
|
266
|
+
state: UfEnum,
|
|
227
267
|
nationality: textField(),
|
|
228
|
-
uf_naturalness:
|
|
268
|
+
uf_naturalness: UfEnum,
|
|
229
269
|
naturalness: textField(),
|
|
230
270
|
cellphone: phoneBRSchema,
|
|
231
271
|
email: emailSchema,
|
|
@@ -238,7 +278,7 @@ var bvPfObject = zod.z.object({
|
|
|
238
278
|
type_doc: DocumentTypeEnum,
|
|
239
279
|
doc: textField(15),
|
|
240
280
|
issuing_body: textField(6),
|
|
241
|
-
emitting_state:
|
|
281
|
+
emitting_state: UfEnum,
|
|
242
282
|
doc_issue_date: issueDateSchema,
|
|
243
283
|
pep_relationship: textField().optional()
|
|
244
284
|
});
|