evo360-types 1.3.811 → 1.3.816
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/apps/evo-csq/zod-schemas.d.ts +62 -62
- package/dist/apps/evo-finops/zod-schemas.d.ts +304 -22
- package/dist/apps/evo-finops/zod-schemas.js +65 -7
- package/dist/apps/evo-finops/zod-schemas.ts +68 -5
- package/dist/apps/evo-modules/zod-schemas.d.ts +4 -4
- package/dist/types/evo-finops/common/contract.d.ts +10 -0
- package/dist/types/evo-finops/common/contract.ts +13 -0
- package/dist/types/evo-finops/common/proposal.d.ts +13 -0
- package/dist/types/evo-finops/common/proposal.ts +16 -0
- package/dist/types/nex-vendas/adhesion.d.ts +37 -4
- package/dist/types/nex-vendas/adhesion.ts +38 -4
- package/dist/types/nex-vendas/index.d.ts +1 -0
- package/dist/types/nex-vendas/index.js +1 -0
- package/dist/types/nex-vendas/index.ts +1 -0
- package/dist/types/nex-vendas/journey.d.ts +8 -0
- package/dist/types/nex-vendas/journey.ts +6 -0
- package/dist/types/nex-vendas/offer-package.d.ts +165 -0
- package/dist/types/nex-vendas/offer-package.js +255 -0
- package/dist/types/nex-vendas/offer-package.ts +387 -0
- package/dist/types/nex-vendas/offer.d.ts +15 -1
- package/dist/types/nex-vendas/offer.ts +15 -1
- package/package.json +1 -1
|
@@ -15831,7 +15831,11 @@ export declare const zNexFinopsProposalWriteSchema: z.ZodObject<{
|
|
|
15831
15831
|
* sobrescrito). Está no schema para o backend não perder o campo no `.strip()`.
|
|
15832
15832
|
*/
|
|
15833
15833
|
contract_type: z.ZodNullable<z.ZodOptional<z.ZodEnum<["assinatura_eletronica", "adesao"]>>>;
|
|
15834
|
-
/**
|
|
15834
|
+
/**
|
|
15835
|
+
* feat-326 — preenchidos pelo `start` da oferta; no CRUD do vendedor ficam ausentes.
|
|
15836
|
+
* feat-353: `package` (cópia congelada do pacote) NÃO entra aqui de propósito — só o
|
|
15837
|
+
* `start` grava, direto no documento; o PUT/POST de proposta descarta.
|
|
15838
|
+
*/
|
|
15835
15839
|
offer_slug: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
15836
15840
|
attribution: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
15837
15841
|
utm_source: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -15874,14 +15878,14 @@ export declare const zNexFinopsProposalWriteSchema: z.ZodObject<{
|
|
|
15874
15878
|
name?: string | null | undefined;
|
|
15875
15879
|
created_by?: string | null | undefined;
|
|
15876
15880
|
notes?: string | null | undefined;
|
|
15877
|
-
|
|
15881
|
+
terms?: string | null | undefined;
|
|
15878
15882
|
base_amount?: number | undefined;
|
|
15883
|
+
html_content?: string | undefined;
|
|
15879
15884
|
due_day?: number | undefined;
|
|
15880
15885
|
accepted_payment_methods?: ("payment_link" | "boleto" | "card_subscription")[] | undefined;
|
|
15881
15886
|
loyalty_period?: "none" | "3m" | "6m" | "1y" | "2y" | null | undefined;
|
|
15882
15887
|
contract_template_key?: string | null | undefined;
|
|
15883
15888
|
contract_type?: "assinatura_eletronica" | "adesao" | null | undefined;
|
|
15884
|
-
terms?: string | null | undefined;
|
|
15885
15889
|
origem?: string | undefined;
|
|
15886
15890
|
customer_id?: string | null | undefined;
|
|
15887
15891
|
customer_ref?: string | null | undefined;
|
|
@@ -15920,14 +15924,14 @@ export declare const zNexFinopsProposalWriteSchema: z.ZodObject<{
|
|
|
15920
15924
|
name?: string | null | undefined;
|
|
15921
15925
|
created_by?: string | null | undefined;
|
|
15922
15926
|
notes?: string | null | undefined;
|
|
15923
|
-
|
|
15927
|
+
terms?: string | null | undefined;
|
|
15924
15928
|
base_amount?: number | undefined;
|
|
15929
|
+
html_content?: string | undefined;
|
|
15925
15930
|
due_day?: number | undefined;
|
|
15926
15931
|
accepted_payment_methods?: ("payment_link" | "boleto" | "card_subscription")[] | undefined;
|
|
15927
15932
|
loyalty_period?: "none" | "3m" | "6m" | "1y" | "2y" | null | undefined;
|
|
15928
15933
|
contract_template_key?: string | null | undefined;
|
|
15929
15934
|
contract_type?: "assinatura_eletronica" | "adesao" | null | undefined;
|
|
15930
|
-
terms?: string | null | undefined;
|
|
15931
15935
|
origem?: string | undefined;
|
|
15932
15936
|
customer_id?: string | null | undefined;
|
|
15933
15937
|
customer_ref?: string | null | undefined;
|
|
@@ -16029,7 +16033,11 @@ export declare const zNexFinopsProposalSchema: z.ZodObject<{
|
|
|
16029
16033
|
* sobrescrito). Está no schema para o backend não perder o campo no `.strip()`.
|
|
16030
16034
|
*/
|
|
16031
16035
|
contract_type: z.ZodNullable<z.ZodOptional<z.ZodEnum<["assinatura_eletronica", "adesao"]>>>;
|
|
16032
|
-
/**
|
|
16036
|
+
/**
|
|
16037
|
+
* feat-326 — preenchidos pelo `start` da oferta; no CRUD do vendedor ficam ausentes.
|
|
16038
|
+
* feat-353: `package` (cópia congelada do pacote) NÃO entra aqui de propósito — só o
|
|
16039
|
+
* `start` grava, direto no documento; o PUT/POST de proposta descarta.
|
|
16040
|
+
*/
|
|
16033
16041
|
offer_slug: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
16034
16042
|
attribution: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
16035
16043
|
utm_source: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -16079,14 +16087,14 @@ export declare const zNexFinopsProposalSchema: z.ZodObject<{
|
|
|
16079
16087
|
name?: string | null | undefined;
|
|
16080
16088
|
created_by?: string | null | undefined;
|
|
16081
16089
|
notes?: string | null | undefined;
|
|
16082
|
-
|
|
16090
|
+
terms?: string | null | undefined;
|
|
16083
16091
|
base_amount?: number | undefined;
|
|
16092
|
+
html_content?: string | undefined;
|
|
16084
16093
|
due_day?: number | undefined;
|
|
16085
16094
|
accepted_payment_methods?: ("payment_link" | "boleto" | "card_subscription")[] | undefined;
|
|
16086
16095
|
loyalty_period?: "none" | "3m" | "6m" | "1y" | "2y" | null | undefined;
|
|
16087
16096
|
contract_template_key?: string | null | undefined;
|
|
16088
16097
|
contract_type?: "assinatura_eletronica" | "adesao" | null | undefined;
|
|
16089
|
-
terms?: string | null | undefined;
|
|
16090
16098
|
origem?: string | undefined;
|
|
16091
16099
|
customer_id?: string | null | undefined;
|
|
16092
16100
|
customer_ref?: string | null | undefined;
|
|
@@ -16128,14 +16136,14 @@ export declare const zNexFinopsProposalSchema: z.ZodObject<{
|
|
|
16128
16136
|
name?: string | null | undefined;
|
|
16129
16137
|
created_by?: string | null | undefined;
|
|
16130
16138
|
notes?: string | null | undefined;
|
|
16131
|
-
|
|
16139
|
+
terms?: string | null | undefined;
|
|
16132
16140
|
base_amount?: number | undefined;
|
|
16141
|
+
html_content?: string | undefined;
|
|
16133
16142
|
due_day?: number | undefined;
|
|
16134
16143
|
accepted_payment_methods?: ("payment_link" | "boleto" | "card_subscription")[] | undefined;
|
|
16135
16144
|
loyalty_period?: "none" | "3m" | "6m" | "1y" | "2y" | null | undefined;
|
|
16136
16145
|
contract_template_key?: string | null | undefined;
|
|
16137
16146
|
contract_type?: "assinatura_eletronica" | "adesao" | null | undefined;
|
|
16138
|
-
terms?: string | null | undefined;
|
|
16139
16147
|
origem?: string | undefined;
|
|
16140
16148
|
customer_id?: string | null | undefined;
|
|
16141
16149
|
customer_ref?: string | null | undefined;
|
|
@@ -16484,6 +16492,117 @@ export declare const zNexFinopsContractAllowancesSchema: z.ZodRecord<z.ZodString
|
|
|
16484
16492
|
included: number;
|
|
16485
16493
|
unit_price_excess?: number | null | undefined;
|
|
16486
16494
|
}>>;
|
|
16495
|
+
/** Estado de um módulo no pacote (`INexVendasPackageModule`). */
|
|
16496
|
+
export declare const zNexVendasPackageModuleSchema: z.ZodObject<{
|
|
16497
|
+
enabled: z.ZodBoolean;
|
|
16498
|
+
capabilities: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>>>>;
|
|
16499
|
+
}, "strip", z.ZodTypeAny, {
|
|
16500
|
+
enabled: boolean;
|
|
16501
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
16502
|
+
}, {
|
|
16503
|
+
enabled: boolean;
|
|
16504
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
16505
|
+
}>;
|
|
16506
|
+
/** Módulos do pacote por chave do catálogo (`PLATFORM_MODULE_CATALOG`). */
|
|
16507
|
+
export declare const zNexVendasPackageModulesSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
16508
|
+
enabled: z.ZodBoolean;
|
|
16509
|
+
capabilities: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>>>>;
|
|
16510
|
+
}, "strip", z.ZodTypeAny, {
|
|
16511
|
+
enabled: boolean;
|
|
16512
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
16513
|
+
}, {
|
|
16514
|
+
enabled: boolean;
|
|
16515
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
16516
|
+
}>>;
|
|
16517
|
+
/** Franquia só exibida (`INexVendasPackageDisplayAllowance`). */
|
|
16518
|
+
export declare const zNexVendasPackageDisplayAllowanceSchema: z.ZodObject<{
|
|
16519
|
+
metric: z.ZodString;
|
|
16520
|
+
included: z.ZodNumber;
|
|
16521
|
+
}, "strip", z.ZodTypeAny, {
|
|
16522
|
+
included: number;
|
|
16523
|
+
metric: string;
|
|
16524
|
+
}, {
|
|
16525
|
+
included: number;
|
|
16526
|
+
metric: string;
|
|
16527
|
+
}>;
|
|
16528
|
+
/** Pacote comercial da oferta (`INexVendasOfferPackage`). Cobre TODOS os campos. */
|
|
16529
|
+
export declare const zNexVendasOfferPackageSchema: z.ZodObject<{
|
|
16530
|
+
price_table_id: z.ZodString;
|
|
16531
|
+
list_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
16532
|
+
fixed_service_category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16533
|
+
fixed_service_description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16534
|
+
modules: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
16535
|
+
enabled: z.ZodBoolean;
|
|
16536
|
+
capabilities: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>>>>;
|
|
16537
|
+
}, "strip", z.ZodTypeAny, {
|
|
16538
|
+
enabled: boolean;
|
|
16539
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
16540
|
+
}, {
|
|
16541
|
+
enabled: boolean;
|
|
16542
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
16543
|
+
}>>;
|
|
16544
|
+
allowances: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
16545
|
+
included: z.ZodNumber;
|
|
16546
|
+
/** Reservado para a feat-150 cheia (preço do excedente). Não usar ainda. */
|
|
16547
|
+
unit_price_excess: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
16548
|
+
}, "strip", z.ZodTypeAny, {
|
|
16549
|
+
included: number;
|
|
16550
|
+
unit_price_excess?: number | null | undefined;
|
|
16551
|
+
}, {
|
|
16552
|
+
included: number;
|
|
16553
|
+
unit_price_excess?: number | null | undefined;
|
|
16554
|
+
}>>;
|
|
16555
|
+
display_allowances: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
16556
|
+
metric: z.ZodString;
|
|
16557
|
+
included: z.ZodNumber;
|
|
16558
|
+
}, "strip", z.ZodTypeAny, {
|
|
16559
|
+
included: number;
|
|
16560
|
+
metric: string;
|
|
16561
|
+
}, {
|
|
16562
|
+
included: number;
|
|
16563
|
+
metric: string;
|
|
16564
|
+
}>, "many">>>;
|
|
16565
|
+
not_included: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
16566
|
+
highlights: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
16567
|
+
}, "strip", z.ZodTypeAny, {
|
|
16568
|
+
modules: Record<string, {
|
|
16569
|
+
enabled: boolean;
|
|
16570
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
16571
|
+
}>;
|
|
16572
|
+
allowances: Record<string, {
|
|
16573
|
+
included: number;
|
|
16574
|
+
unit_price_excess?: number | null | undefined;
|
|
16575
|
+
}>;
|
|
16576
|
+
price_table_id: string;
|
|
16577
|
+
highlights?: string[] | null | undefined;
|
|
16578
|
+
list_amount?: number | null | undefined;
|
|
16579
|
+
fixed_service_category?: string | null | undefined;
|
|
16580
|
+
fixed_service_description?: string | null | undefined;
|
|
16581
|
+
display_allowances?: {
|
|
16582
|
+
included: number;
|
|
16583
|
+
metric: string;
|
|
16584
|
+
}[] | null | undefined;
|
|
16585
|
+
not_included?: string[] | null | undefined;
|
|
16586
|
+
}, {
|
|
16587
|
+
modules: Record<string, {
|
|
16588
|
+
enabled: boolean;
|
|
16589
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
16590
|
+
}>;
|
|
16591
|
+
allowances: Record<string, {
|
|
16592
|
+
included: number;
|
|
16593
|
+
unit_price_excess?: number | null | undefined;
|
|
16594
|
+
}>;
|
|
16595
|
+
price_table_id: string;
|
|
16596
|
+
highlights?: string[] | null | undefined;
|
|
16597
|
+
list_amount?: number | null | undefined;
|
|
16598
|
+
fixed_service_category?: string | null | undefined;
|
|
16599
|
+
fixed_service_description?: string | null | undefined;
|
|
16600
|
+
display_allowances?: {
|
|
16601
|
+
included: number;
|
|
16602
|
+
metric: string;
|
|
16603
|
+
}[] | null | undefined;
|
|
16604
|
+
not_included?: string[] | null | undefined;
|
|
16605
|
+
}>;
|
|
16487
16606
|
/**
|
|
16488
16607
|
* Gatilho de alerta: **fração** da franquia, não percentual — `0.8` é 80%.
|
|
16489
16608
|
* `0` é rejeitado porque dispararia em qualquer consumo.
|
|
@@ -16527,24 +16646,47 @@ export declare const zNexFinopsContractAllowancesWriteSchema: z.ZodObject<{
|
|
|
16527
16646
|
nfse_fee_reimbursement: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
16528
16647
|
/** feat-328 — tabela de preço do contrato. Ausente/null = tabela padrão. */
|
|
16529
16648
|
price_table_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16649
|
+
/** feat-353 — snapshot dos módulos vendidos (autoritativo no runner da feat-297). */
|
|
16650
|
+
package_modules: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
16651
|
+
enabled: z.ZodBoolean;
|
|
16652
|
+
capabilities: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>>>>;
|
|
16653
|
+
}, "strip", z.ZodTypeAny, {
|
|
16654
|
+
enabled: boolean;
|
|
16655
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
16656
|
+
}, {
|
|
16657
|
+
enabled: boolean;
|
|
16658
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
16659
|
+
}>>>>;
|
|
16660
|
+
/** feat-353 — slug da oferta de origem. */
|
|
16661
|
+
offer_slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16530
16662
|
}, "strip", z.ZodTypeAny, {
|
|
16531
16663
|
allowances?: Record<string, {
|
|
16532
16664
|
included: number;
|
|
16533
16665
|
unit_price_excess?: number | null | undefined;
|
|
16534
16666
|
}> | null | undefined;
|
|
16667
|
+
offer_slug?: string | null | undefined;
|
|
16535
16668
|
alerts_enabled?: boolean | null | undefined;
|
|
16536
16669
|
alert_thresholds?: number[] | null | undefined;
|
|
16537
16670
|
nfse_fee_reimbursement?: boolean | null | undefined;
|
|
16538
16671
|
price_table_id?: string | null | undefined;
|
|
16672
|
+
package_modules?: Record<string, {
|
|
16673
|
+
enabled: boolean;
|
|
16674
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
16675
|
+
}> | null | undefined;
|
|
16539
16676
|
}, {
|
|
16540
16677
|
allowances?: Record<string, {
|
|
16541
16678
|
included: number;
|
|
16542
16679
|
unit_price_excess?: number | null | undefined;
|
|
16543
16680
|
}> | null | undefined;
|
|
16681
|
+
offer_slug?: string | null | undefined;
|
|
16544
16682
|
alerts_enabled?: boolean | null | undefined;
|
|
16545
16683
|
alert_thresholds?: number[] | null | undefined;
|
|
16546
16684
|
nfse_fee_reimbursement?: boolean | null | undefined;
|
|
16547
16685
|
price_table_id?: string | null | undefined;
|
|
16686
|
+
package_modules?: Record<string, {
|
|
16687
|
+
enabled: boolean;
|
|
16688
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
16689
|
+
}> | null | undefined;
|
|
16548
16690
|
}>;
|
|
16549
16691
|
export declare const zNexFinopsPriceCapTierSchema: z.ZodObject<{
|
|
16550
16692
|
up_to: z.ZodNumber;
|
|
@@ -17036,27 +17178,48 @@ export declare const zNfseFeeReimbursementExecuteSchema: z.ZodObject<{
|
|
|
17036
17178
|
competencia: string;
|
|
17037
17179
|
}>;
|
|
17038
17180
|
/**
|
|
17039
|
-
* Corpo de `POST /journeys/:short_code/
|
|
17181
|
+
* Corpo de `POST /journeys/:short_code/acceptance` (público). IP, user-agent,
|
|
17040
17182
|
* idioma e trace vêm da requisição, nunca do corpo.
|
|
17183
|
+
*
|
|
17184
|
+
* feat-353: `contract_sha256` (contrato consolidado) OU o par legado
|
|
17185
|
+
* `cg_sha256` + `summary_sha256` — qual deles vale é decidido pelo documento da
|
|
17186
|
+
* jornada no backend.
|
|
17041
17187
|
*/
|
|
17042
|
-
export declare const zNexVendasAcceptanceRequestSchema: z.ZodObject<{
|
|
17043
|
-
|
|
17044
|
-
|
|
17188
|
+
export declare const zNexVendasAcceptanceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
17189
|
+
contract_sha256: z.ZodOptional<z.ZodString>;
|
|
17190
|
+
cg_sha256: z.ZodOptional<z.ZodString>;
|
|
17191
|
+
summary_sha256: z.ZodOptional<z.ZodString>;
|
|
17045
17192
|
declaration_version: z.ZodString;
|
|
17046
17193
|
viewed_to_end: z.ZodBoolean;
|
|
17047
17194
|
client_request_id: z.ZodString;
|
|
17048
17195
|
}, "strip", z.ZodTypeAny, {
|
|
17049
17196
|
client_request_id: string;
|
|
17050
|
-
cg_sha256: string;
|
|
17051
|
-
summary_sha256: string;
|
|
17052
17197
|
declaration_version: string;
|
|
17053
17198
|
viewed_to_end: boolean;
|
|
17199
|
+
contract_sha256?: string | undefined;
|
|
17200
|
+
cg_sha256?: string | undefined;
|
|
17201
|
+
summary_sha256?: string | undefined;
|
|
17054
17202
|
}, {
|
|
17055
17203
|
client_request_id: string;
|
|
17056
|
-
cg_sha256: string;
|
|
17057
|
-
summary_sha256: string;
|
|
17058
17204
|
declaration_version: string;
|
|
17059
17205
|
viewed_to_end: boolean;
|
|
17206
|
+
contract_sha256?: string | undefined;
|
|
17207
|
+
cg_sha256?: string | undefined;
|
|
17208
|
+
summary_sha256?: string | undefined;
|
|
17209
|
+
}>, {
|
|
17210
|
+
client_request_id: string;
|
|
17211
|
+
declaration_version: string;
|
|
17212
|
+
viewed_to_end: boolean;
|
|
17213
|
+
contract_sha256?: string | undefined;
|
|
17214
|
+
cg_sha256?: string | undefined;
|
|
17215
|
+
summary_sha256?: string | undefined;
|
|
17216
|
+
}, {
|
|
17217
|
+
client_request_id: string;
|
|
17218
|
+
declaration_version: string;
|
|
17219
|
+
viewed_to_end: boolean;
|
|
17220
|
+
contract_sha256?: string | undefined;
|
|
17221
|
+
cg_sha256?: string | undefined;
|
|
17222
|
+
summary_sha256?: string | undefined;
|
|
17060
17223
|
}>;
|
|
17061
17224
|
/** Bloco `adhesion` do modelo de contrato (metadados das CG gravados pelo backend no upload). */
|
|
17062
17225
|
export declare const zNexVendasContractTemplateAdhesionSchema: z.ZodObject<{
|
|
@@ -17147,6 +17310,7 @@ export declare const zNexVendasOfferWriteSchema: z.ZodObject<{
|
|
|
17147
17310
|
loyalty_period: z.ZodEnum<["none", "3m", "6m", "1y", "2y"]>;
|
|
17148
17311
|
contract_template_key: z.ZodString;
|
|
17149
17312
|
contract_type: z.ZodNullable<z.ZodOptional<z.ZodEnum<["assinatura_eletronica", "adesao"]>>>;
|
|
17313
|
+
/** @deprecated feat-353 — usar `package.allowances` (o backend força null). */
|
|
17150
17314
|
allowances: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
17151
17315
|
included: z.ZodNumber;
|
|
17152
17316
|
/** Reservado para a feat-150 cheia (preço do excedente). Não usar ainda. */
|
|
@@ -17158,6 +17322,84 @@ export declare const zNexVendasOfferWriteSchema: z.ZodObject<{
|
|
|
17158
17322
|
included: number;
|
|
17159
17323
|
unit_price_excess?: number | null | undefined;
|
|
17160
17324
|
}>>>;
|
|
17325
|
+
/** feat-353 — pacote comercial. Ausente/null = oferta v1. */
|
|
17326
|
+
package: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
17327
|
+
price_table_id: z.ZodString;
|
|
17328
|
+
list_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
17329
|
+
fixed_service_category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17330
|
+
fixed_service_description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17331
|
+
modules: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
17332
|
+
enabled: z.ZodBoolean;
|
|
17333
|
+
capabilities: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>>>>;
|
|
17334
|
+
}, "strip", z.ZodTypeAny, {
|
|
17335
|
+
enabled: boolean;
|
|
17336
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
17337
|
+
}, {
|
|
17338
|
+
enabled: boolean;
|
|
17339
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
17340
|
+
}>>;
|
|
17341
|
+
allowances: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
17342
|
+
included: z.ZodNumber;
|
|
17343
|
+
/** Reservado para a feat-150 cheia (preço do excedente). Não usar ainda. */
|
|
17344
|
+
unit_price_excess: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
17345
|
+
}, "strip", z.ZodTypeAny, {
|
|
17346
|
+
included: number;
|
|
17347
|
+
unit_price_excess?: number | null | undefined;
|
|
17348
|
+
}, {
|
|
17349
|
+
included: number;
|
|
17350
|
+
unit_price_excess?: number | null | undefined;
|
|
17351
|
+
}>>;
|
|
17352
|
+
display_allowances: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
17353
|
+
metric: z.ZodString;
|
|
17354
|
+
included: z.ZodNumber;
|
|
17355
|
+
}, "strip", z.ZodTypeAny, {
|
|
17356
|
+
included: number;
|
|
17357
|
+
metric: string;
|
|
17358
|
+
}, {
|
|
17359
|
+
included: number;
|
|
17360
|
+
metric: string;
|
|
17361
|
+
}>, "many">>>;
|
|
17362
|
+
not_included: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
17363
|
+
highlights: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
17364
|
+
}, "strip", z.ZodTypeAny, {
|
|
17365
|
+
modules: Record<string, {
|
|
17366
|
+
enabled: boolean;
|
|
17367
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
17368
|
+
}>;
|
|
17369
|
+
allowances: Record<string, {
|
|
17370
|
+
included: number;
|
|
17371
|
+
unit_price_excess?: number | null | undefined;
|
|
17372
|
+
}>;
|
|
17373
|
+
price_table_id: string;
|
|
17374
|
+
highlights?: string[] | null | undefined;
|
|
17375
|
+
list_amount?: number | null | undefined;
|
|
17376
|
+
fixed_service_category?: string | null | undefined;
|
|
17377
|
+
fixed_service_description?: string | null | undefined;
|
|
17378
|
+
display_allowances?: {
|
|
17379
|
+
included: number;
|
|
17380
|
+
metric: string;
|
|
17381
|
+
}[] | null | undefined;
|
|
17382
|
+
not_included?: string[] | null | undefined;
|
|
17383
|
+
}, {
|
|
17384
|
+
modules: Record<string, {
|
|
17385
|
+
enabled: boolean;
|
|
17386
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
17387
|
+
}>;
|
|
17388
|
+
allowances: Record<string, {
|
|
17389
|
+
included: number;
|
|
17390
|
+
unit_price_excess?: number | null | undefined;
|
|
17391
|
+
}>;
|
|
17392
|
+
price_table_id: string;
|
|
17393
|
+
highlights?: string[] | null | undefined;
|
|
17394
|
+
list_amount?: number | null | undefined;
|
|
17395
|
+
fixed_service_category?: string | null | undefined;
|
|
17396
|
+
fixed_service_description?: string | null | undefined;
|
|
17397
|
+
display_allowances?: {
|
|
17398
|
+
included: number;
|
|
17399
|
+
metric: string;
|
|
17400
|
+
}[] | null | undefined;
|
|
17401
|
+
not_included?: string[] | null | undefined;
|
|
17402
|
+
}>>>;
|
|
17161
17403
|
terms: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
17162
17404
|
proposal_valid_days: z.ZodNumber;
|
|
17163
17405
|
site: z.ZodString;
|
|
@@ -17171,9 +17413,9 @@ export declare const zNexVendasOfferWriteSchema: z.ZodObject<{
|
|
|
17171
17413
|
name: string;
|
|
17172
17414
|
active: boolean;
|
|
17173
17415
|
site: string;
|
|
17416
|
+
base_amount: number;
|
|
17174
17417
|
slug: string;
|
|
17175
17418
|
headline: string;
|
|
17176
|
-
base_amount: number;
|
|
17177
17419
|
due_day: number;
|
|
17178
17420
|
accepted_payment_methods: ("payment_link" | "boleto" | "card_subscription")[];
|
|
17179
17421
|
loyalty_period: "none" | "3m" | "6m" | "1y" | "2y";
|
|
@@ -17186,9 +17428,29 @@ export declare const zNexVendasOfferWriteSchema: z.ZodObject<{
|
|
|
17186
17428
|
listed: boolean;
|
|
17187
17429
|
created_by?: string | undefined;
|
|
17188
17430
|
description?: string | null | undefined;
|
|
17431
|
+
terms?: string | null | undefined;
|
|
17189
17432
|
html_content?: string | null | undefined;
|
|
17190
17433
|
contract_type?: "assinatura_eletronica" | "adesao" | null | undefined;
|
|
17191
|
-
|
|
17434
|
+
package?: {
|
|
17435
|
+
modules: Record<string, {
|
|
17436
|
+
enabled: boolean;
|
|
17437
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
17438
|
+
}>;
|
|
17439
|
+
allowances: Record<string, {
|
|
17440
|
+
included: number;
|
|
17441
|
+
unit_price_excess?: number | null | undefined;
|
|
17442
|
+
}>;
|
|
17443
|
+
price_table_id: string;
|
|
17444
|
+
highlights?: string[] | null | undefined;
|
|
17445
|
+
list_amount?: number | null | undefined;
|
|
17446
|
+
fixed_service_category?: string | null | undefined;
|
|
17447
|
+
fixed_service_description?: string | null | undefined;
|
|
17448
|
+
display_allowances?: {
|
|
17449
|
+
included: number;
|
|
17450
|
+
metric: string;
|
|
17451
|
+
}[] | null | undefined;
|
|
17452
|
+
not_included?: string[] | null | undefined;
|
|
17453
|
+
} | null | undefined;
|
|
17192
17454
|
origem?: string | null | undefined;
|
|
17193
17455
|
start_count?: number | null | undefined;
|
|
17194
17456
|
last_start_at?: Date | null | undefined;
|
|
@@ -17196,9 +17458,9 @@ export declare const zNexVendasOfferWriteSchema: z.ZodObject<{
|
|
|
17196
17458
|
name: string;
|
|
17197
17459
|
active: boolean;
|
|
17198
17460
|
site: string;
|
|
17461
|
+
base_amount: number;
|
|
17199
17462
|
slug: string;
|
|
17200
17463
|
headline: string;
|
|
17201
|
-
base_amount: number;
|
|
17202
17464
|
due_day: number;
|
|
17203
17465
|
accepted_payment_methods: ("payment_link" | "boleto" | "card_subscription")[];
|
|
17204
17466
|
loyalty_period: "none" | "3m" | "6m" | "1y" | "2y";
|
|
@@ -17211,9 +17473,29 @@ export declare const zNexVendasOfferWriteSchema: z.ZodObject<{
|
|
|
17211
17473
|
listed: boolean;
|
|
17212
17474
|
created_by?: string | undefined;
|
|
17213
17475
|
description?: string | null | undefined;
|
|
17476
|
+
terms?: string | null | undefined;
|
|
17214
17477
|
html_content?: string | null | undefined;
|
|
17215
17478
|
contract_type?: "assinatura_eletronica" | "adesao" | null | undefined;
|
|
17216
|
-
|
|
17479
|
+
package?: {
|
|
17480
|
+
modules: Record<string, {
|
|
17481
|
+
enabled: boolean;
|
|
17482
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
17483
|
+
}>;
|
|
17484
|
+
allowances: Record<string, {
|
|
17485
|
+
included: number;
|
|
17486
|
+
unit_price_excess?: number | null | undefined;
|
|
17487
|
+
}>;
|
|
17488
|
+
price_table_id: string;
|
|
17489
|
+
highlights?: string[] | null | undefined;
|
|
17490
|
+
list_amount?: number | null | undefined;
|
|
17491
|
+
fixed_service_category?: string | null | undefined;
|
|
17492
|
+
fixed_service_description?: string | null | undefined;
|
|
17493
|
+
display_allowances?: {
|
|
17494
|
+
included: number;
|
|
17495
|
+
metric: string;
|
|
17496
|
+
}[] | null | undefined;
|
|
17497
|
+
not_included?: string[] | null | undefined;
|
|
17498
|
+
} | null | undefined;
|
|
17217
17499
|
origem?: string | null | undefined;
|
|
17218
17500
|
start_count?: number | null | undefined;
|
|
17219
17501
|
last_start_at?: unknown;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.zServiceTaxInfoSchema = exports.zServiceLineItemSchema = exports.zServiceInvoiceStateSchema = exports.zProviderServiceInvoiceStatusSchema = exports.zExternalLinkSchema = exports.zExternalObjectTypeSchema = exports.zInvoiceSourceRefSchema = exports.zInvoiceSourceTypeSchema = exports.zInvoiceTakerRefSchema = exports.zInvoiceTakerSnapshotSchema = exports.zInvoiceTakerSnapshotAddressSchema = exports.zTakerDocumentSchema = exports.zTakerTaxProfileSchema = exports.zTakerProviderRefsSchema = exports.zTakerAddressSchema = exports.zInvoiceTakerTypeSchema = exports.zServiceSchema = exports.zCustomerServiceTaxInfoSchema = exports.zIssuerTaxProfileSchema = exports.zIssuerNfseConfigSchema = exports.zIssuerMunicipalCredentialsRefSchema = exports.zIssuerTaxRegimeSchema = exports.zIssuerCompanyIdentitySchema = exports.zIssuerCompanyAddressSchema = exports.zTaxProfileSyncStateSchema = exports.zAsaasProviderSchema = exports.zAsaasProviderAsaasBlockSchema = exports.zAsaasProviderCapabilitiesSchema = exports.zAsaasPaymentsCapabilitiesSchema = exports.zAsaasEnvFlagSchema = exports.zAsaasNfseCapabilitiesSchema = exports.zAsaasEnvAuthConfigSchema = exports.zAsaasSubaccountInputSchema = exports.zAsaasAccountScopeSchema = exports.zAsaasWebhookConfigSchema = exports.zRetryPolicySchema = exports.zAsaasWebhookEventSchema = exports.zAsaasAccountScopeModeSchema = exports.zProviderRemoteRefsSchema = exports.zProviderFiscalInfoPayloadSchema = exports.zProviderCredentialsInputSchema = exports.zProviderCredentialsSecretRefsSchema = exports.zProviderMunicipalOptionsSnapshotSchema = exports.zProviderOptionItemSchema = exports.zProviderMunicipalAuthTypeSchema = exports.zFinopsProviderBaseSchema = exports.zProviderStatusSchema = exports.zFinopsActionSchema = exports.zFinopsProviderTypeSchema = exports.zProviderEnvSchema = void 0;
|
|
4
|
-
exports.
|
|
5
|
-
exports.zNexVendasOfferStartRequestSchema = exports.zNexVendasOfferWriteSchema = exports.zNexVendasAdhesionConfigWriteSchema = exports.zNexVendasContractTemplateAdhesionSchema = exports.zNexVendasAcceptanceRequestSchema = exports.zNfseFeeReimbursementExecuteSchema = exports.zNfseFeeReimbursementCompetenciaSchema = exports.zNexFinopsPaymentMethodsDiscoverSchema = exports.zNexFinopsBillingCardChargeSweepSchema = exports.zEvoBillingPortalCardCaptureSchema = exports.zNexFinopsBillingCardChargeSchema = exports.zNexFinopsContractPaymentMethodsWriteSchema = exports.zNexFinopsPaymentMethodPatchSchema = void 0;
|
|
4
|
+
exports.zNexFinopsPriceLineSchema = exports.zNexFinopsPriceCapSchema = exports.zNexFinopsPriceCapTierSchema = exports.zNexFinopsContractAllowancesWriteSchema = exports.zNexFinopsUsageAlertDefaultsSchema = exports.zNexFinopsAlertThresholdSchema = exports.zNexVendasOfferPackageSchema = exports.zNexVendasPackageDisplayAllowanceSchema = exports.zNexVendasPackageModulesSchema = exports.zNexVendasPackageModuleSchema = exports.zNexFinopsContractAllowancesSchema = exports.zNexFinopsContractAllowanceSchema = exports.zNexVendasJourneyPaymentSchema = exports.zNexVendasJourneyPaymentSupersededSchema = exports.zNexVendasJourneyPaymentWebhookEventSchema = exports.zNexVendasJourneyBoletoSchema = exports.zNexVendasJourneyPaymentChooseSchema = exports.zNexVendasJourneyPaymentStateSchema = exports.zNexVendasJourneyPaymentKindSchema = exports.zNexVendasJourneyPaymentMethodSchema = exports.zNexFinopsContractAsaasInfoSchema = exports.zNexFinopsAsaasSubscriptionStatusSchema = exports.zNexFinopsPaymentMethodSchema = exports.zNexFinopsProposalSchema = exports.zNexFinopsProposalWriteSchema = exports.zNexFinopsProposalPrefillSchema = exports.zNexFinopsProposalLoyaltyPeriodSchema = exports.zNexFinopsProposalPaymentMethodSchema = exports.zNexVendasContractTypeSchema = exports.zNexVendasAttributionSchema = exports.zNexFinopsProposalStatusSchema = exports.zServiceInvoiceSchema = exports.zServiceInvoiceReplacedBySchema = exports.zServiceInvoiceReissuedFromSchema = exports.zServiceInvoiceReissueSchema = exports.zNfseReissueStageSchema = exports.zNfseReissueFieldSchema = exports.zNfseReissueStatusSchema = exports.zServiceInvoiceCancellationSchema = exports.zNfseCancellationStatusSchema = exports.zPaymentLinkSchema = exports.zPaymentLinkDocumentStateSchema = exports.zAsaasPaymentLinkSubscriptionCycleSchema = exports.zAsaasPaymentLinkChargeTypeSchema = exports.zAsaasPaymentLinkBillingTypeSchema = exports.zProviderPayloadSnapshotSchema = exports.zProviderTraceSchema = exports.zProviderInvoiceErrorSchema = exports.zProviderInvoiceIdentifiersSchema = exports.zProviderInvoiceLinksSchema = void 0;
|
|
5
|
+
exports.zNexVendasOfferStartRequestSchema = exports.zNexVendasOfferWriteSchema = exports.zNexVendasAdhesionConfigWriteSchema = exports.zNexVendasContractTemplateAdhesionSchema = exports.zNexVendasAcceptanceRequestSchema = exports.zNfseFeeReimbursementExecuteSchema = exports.zNfseFeeReimbursementCompetenciaSchema = exports.zNexFinopsPaymentMethodsDiscoverSchema = exports.zNexFinopsBillingCardChargeSweepSchema = exports.zEvoBillingPortalCardCaptureSchema = exports.zNexFinopsBillingCardChargeSchema = exports.zNexFinopsContractPaymentMethodsWriteSchema = exports.zNexFinopsPaymentMethodPatchSchema = exports.zNexFinopsPaymentMethodStatusSchema = exports.zNexFinopsPaymentMethodKindSchema = exports.zNexFinopsPriceTableWriteSchema = exports.zNexFinopsPriceLinesSchema = void 0;
|
|
6
6
|
const zod_1 = require("zod");
|
|
7
7
|
const zod_schemas_1 = require("../shared/zod-schemas");
|
|
8
8
|
// ---- Provider enums and base ----
|
|
@@ -895,7 +895,11 @@ exports.zNexFinopsProposalWriteSchema = zod_1.z
|
|
|
895
895
|
* sobrescrito). Está no schema para o backend não perder o campo no `.strip()`.
|
|
896
896
|
*/
|
|
897
897
|
contract_type: exports.zNexVendasContractTypeSchema.optional().nullable(),
|
|
898
|
-
/**
|
|
898
|
+
/**
|
|
899
|
+
* feat-326 — preenchidos pelo `start` da oferta; no CRUD do vendedor ficam ausentes.
|
|
900
|
+
* feat-353: `package` (cópia congelada do pacote) NÃO entra aqui de propósito — só o
|
|
901
|
+
* `start` grava, direto no documento; o PUT/POST de proposta descarta.
|
|
902
|
+
*/
|
|
899
903
|
offer_slug: zod_1.z.string().max(64).optional().nullable(),
|
|
900
904
|
attribution: exports.zNexVendasAttributionSchema.optional().nullable(),
|
|
901
905
|
client_request_id: zod_1.z.string().max(64).optional().nullable(),
|
|
@@ -1043,6 +1047,45 @@ exports.zNexFinopsContractAllowanceSchema = zod_1.z
|
|
|
1043
1047
|
* evo-types. Métrica ausente = não contratada ⇒ não alerta.
|
|
1044
1048
|
*/
|
|
1045
1049
|
exports.zNexFinopsContractAllowancesSchema = zod_1.z.record(zod_1.z.string().min(1).max(64), exports.zNexFinopsContractAllowanceSchema);
|
|
1050
|
+
// ---- Nexus Vendas — pacote da oferta (feat-353) ----
|
|
1051
|
+
//
|
|
1052
|
+
// Só a FORMA (chave/tipo). Regras de negócio (todos os módulos do catálogo
|
|
1053
|
+
// declarados, capability do catálogo com o tipo do default, franquia de módulo
|
|
1054
|
+
// desligado, `list_amount > base_amount`, categoria ≠ SSR, tabela existente…)
|
|
1055
|
+
// ficam no backend (`validateOfferPackage`).
|
|
1056
|
+
/** Estado de um módulo no pacote (`INexVendasPackageModule`). */
|
|
1057
|
+
exports.zNexVendasPackageModuleSchema = zod_1.z
|
|
1058
|
+
.object({
|
|
1059
|
+
enabled: zod_1.z.boolean(),
|
|
1060
|
+
capabilities: zod_1.z
|
|
1061
|
+
.record(zod_1.z.string().min(1).max(64), zod_1.z.union([zod_1.z.boolean(), zod_1.z.number().finite(), zod_1.z.string().max(255)]))
|
|
1062
|
+
.nullable()
|
|
1063
|
+
.optional(),
|
|
1064
|
+
})
|
|
1065
|
+
.strip();
|
|
1066
|
+
/** Módulos do pacote por chave do catálogo (`PLATFORM_MODULE_CATALOG`). */
|
|
1067
|
+
exports.zNexVendasPackageModulesSchema = zod_1.z.record(zod_1.z.string().min(1).max(64), exports.zNexVendasPackageModuleSchema);
|
|
1068
|
+
/** Franquia só exibida (`INexVendasPackageDisplayAllowance`). */
|
|
1069
|
+
exports.zNexVendasPackageDisplayAllowanceSchema = zod_1.z
|
|
1070
|
+
.object({
|
|
1071
|
+
metric: zod_1.z.string().min(1).max(64),
|
|
1072
|
+
included: zod_1.z.number().int().nonnegative(),
|
|
1073
|
+
})
|
|
1074
|
+
.strip();
|
|
1075
|
+
/** Pacote comercial da oferta (`INexVendasOfferPackage`). Cobre TODOS os campos. */
|
|
1076
|
+
exports.zNexVendasOfferPackageSchema = zod_1.z
|
|
1077
|
+
.object({
|
|
1078
|
+
price_table_id: zod_1.z.string().min(1).max(128),
|
|
1079
|
+
list_amount: zod_1.z.number().finite().nonnegative().nullable().optional(),
|
|
1080
|
+
fixed_service_category: zod_1.z.string().min(1).max(32).nullable().optional(),
|
|
1081
|
+
fixed_service_description: zod_1.z.string().max(255).nullable().optional(),
|
|
1082
|
+
modules: exports.zNexVendasPackageModulesSchema,
|
|
1083
|
+
allowances: exports.zNexFinopsContractAllowancesSchema,
|
|
1084
|
+
display_allowances: zod_1.z.array(exports.zNexVendasPackageDisplayAllowanceSchema).max(20).nullable().optional(),
|
|
1085
|
+
not_included: zod_1.z.array(zod_1.z.string().min(1).max(255)).max(20).nullable().optional(),
|
|
1086
|
+
highlights: zod_1.z.array(zod_1.z.string().min(1).max(255)).max(20).nullable().optional(),
|
|
1087
|
+
})
|
|
1088
|
+
.strip();
|
|
1046
1089
|
/**
|
|
1047
1090
|
* Gatilho de alerta: **fração** da franquia, não percentual — `0.8` é 80%.
|
|
1048
1091
|
* `0` é rejeitado porque dispararia em qualquer consumo.
|
|
@@ -1076,6 +1119,10 @@ exports.zNexFinopsContractAllowancesWriteSchema = zod_1.z
|
|
|
1076
1119
|
nfse_fee_reimbursement: zod_1.z.boolean().optional().nullable(),
|
|
1077
1120
|
/** feat-328 — tabela de preço do contrato. Ausente/null = tabela padrão. */
|
|
1078
1121
|
price_table_id: zod_1.z.string().min(1).nullable().optional(),
|
|
1122
|
+
/** feat-353 — snapshot dos módulos vendidos (autoritativo no runner da feat-297). */
|
|
1123
|
+
package_modules: exports.zNexVendasPackageModulesSchema.nullable().optional(),
|
|
1124
|
+
/** feat-353 — slug da oferta de origem. */
|
|
1125
|
+
offer_slug: zod_1.z.string().max(64).nullable().optional(),
|
|
1079
1126
|
})
|
|
1080
1127
|
.strip();
|
|
1081
1128
|
// ---- Nexus FinOps — tabelas de preço (feat-328) ----
|
|
@@ -1251,18 +1298,26 @@ exports.zNfseFeeReimbursementExecuteSchema = zod_1.z
|
|
|
1251
1298
|
// ---- Nexus Vendas — contrato por adesão (feat-325) ----
|
|
1252
1299
|
const zSha256HexSchema = zod_1.z.string().regex(/^[a-f0-9]{64}$/, "sha256 must be 64 lowercase hex chars");
|
|
1253
1300
|
/**
|
|
1254
|
-
* Corpo de `POST /journeys/:short_code/
|
|
1301
|
+
* Corpo de `POST /journeys/:short_code/acceptance` (público). IP, user-agent,
|
|
1255
1302
|
* idioma e trace vêm da requisição, nunca do corpo.
|
|
1303
|
+
*
|
|
1304
|
+
* feat-353: `contract_sha256` (contrato consolidado) OU o par legado
|
|
1305
|
+
* `cg_sha256` + `summary_sha256` — qual deles vale é decidido pelo documento da
|
|
1306
|
+
* jornada no backend.
|
|
1256
1307
|
*/
|
|
1257
1308
|
exports.zNexVendasAcceptanceRequestSchema = zod_1.z
|
|
1258
1309
|
.object({
|
|
1259
|
-
|
|
1260
|
-
|
|
1310
|
+
contract_sha256: zSha256HexSchema.optional(),
|
|
1311
|
+
cg_sha256: zSha256HexSchema.optional(),
|
|
1312
|
+
summary_sha256: zSha256HexSchema.optional(),
|
|
1261
1313
|
declaration_version: zod_1.z.string().min(1).max(64),
|
|
1262
1314
|
viewed_to_end: zod_1.z.boolean(),
|
|
1263
1315
|
client_request_id: zod_1.z.string().min(8).max(64),
|
|
1264
1316
|
})
|
|
1265
|
-
.strip()
|
|
1317
|
+
.strip()
|
|
1318
|
+
.refine((body) => Boolean(body.contract_sha256) || (Boolean(body.cg_sha256) && Boolean(body.summary_sha256)), {
|
|
1319
|
+
message: "contract_sha256 (or cg_sha256 + summary_sha256) is required",
|
|
1320
|
+
});
|
|
1266
1321
|
/** Bloco `adhesion` do modelo de contrato (metadados das CG gravados pelo backend no upload). */
|
|
1267
1322
|
exports.zNexVendasContractTemplateAdhesionSchema = zod_1.z
|
|
1268
1323
|
.object({
|
|
@@ -1318,7 +1373,10 @@ exports.zNexVendasOfferWriteSchema = zod_1.z
|
|
|
1318
1373
|
loyalty_period: exports.zNexFinopsProposalLoyaltyPeriodSchema,
|
|
1319
1374
|
contract_template_key: zod_1.z.string().min(1).max(64),
|
|
1320
1375
|
contract_type: exports.zNexVendasContractTypeSchema.optional().nullable(),
|
|
1376
|
+
/** @deprecated feat-353 — usar `package.allowances` (o backend força null). */
|
|
1321
1377
|
allowances: exports.zNexFinopsContractAllowancesSchema.nullable(),
|
|
1378
|
+
/** feat-353 — pacote comercial. Ausente/null = oferta v1. */
|
|
1379
|
+
package: exports.zNexVendasOfferPackageSchema.nullable().optional(),
|
|
1322
1380
|
terms: zod_1.z.string().optional().nullable(),
|
|
1323
1381
|
proposal_valid_days: zod_1.z.number().int().min(1).max(90),
|
|
1324
1382
|
site: zod_1.z.string().min(1).max(64),
|