evo360-types 1.3.809 → 1.3.814
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 +275 -14
- package/dist/apps/evo-finops/zod-schemas.js +53 -3
- package/dist/apps/evo-finops/zod-schemas.ts +56 -1
- package/dist/apps/evo-modules/zod-schemas.d.ts +4 -4
- package/dist/types/evo-chat/search/index.d.ts +44 -2
- package/dist/types/evo-chat/search/index.js +3 -0
- package/dist/types/evo-chat/search/index.ts +47 -1
- 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/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/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;
|
|
@@ -17147,6 +17289,7 @@ export declare const zNexVendasOfferWriteSchema: z.ZodObject<{
|
|
|
17147
17289
|
loyalty_period: z.ZodEnum<["none", "3m", "6m", "1y", "2y"]>;
|
|
17148
17290
|
contract_template_key: z.ZodString;
|
|
17149
17291
|
contract_type: z.ZodNullable<z.ZodOptional<z.ZodEnum<["assinatura_eletronica", "adesao"]>>>;
|
|
17292
|
+
/** @deprecated feat-353 — usar `package.allowances` (o backend força null). */
|
|
17150
17293
|
allowances: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
17151
17294
|
included: z.ZodNumber;
|
|
17152
17295
|
/** Reservado para a feat-150 cheia (preço do excedente). Não usar ainda. */
|
|
@@ -17158,6 +17301,84 @@ export declare const zNexVendasOfferWriteSchema: z.ZodObject<{
|
|
|
17158
17301
|
included: number;
|
|
17159
17302
|
unit_price_excess?: number | null | undefined;
|
|
17160
17303
|
}>>>;
|
|
17304
|
+
/** feat-353 — pacote comercial. Ausente/null = oferta v1. */
|
|
17305
|
+
package: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
17306
|
+
price_table_id: z.ZodString;
|
|
17307
|
+
list_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
17308
|
+
fixed_service_category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17309
|
+
fixed_service_description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17310
|
+
modules: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
17311
|
+
enabled: z.ZodBoolean;
|
|
17312
|
+
capabilities: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>>>>;
|
|
17313
|
+
}, "strip", z.ZodTypeAny, {
|
|
17314
|
+
enabled: boolean;
|
|
17315
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
17316
|
+
}, {
|
|
17317
|
+
enabled: boolean;
|
|
17318
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
17319
|
+
}>>;
|
|
17320
|
+
allowances: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
17321
|
+
included: z.ZodNumber;
|
|
17322
|
+
/** Reservado para a feat-150 cheia (preço do excedente). Não usar ainda. */
|
|
17323
|
+
unit_price_excess: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
17324
|
+
}, "strip", z.ZodTypeAny, {
|
|
17325
|
+
included: number;
|
|
17326
|
+
unit_price_excess?: number | null | undefined;
|
|
17327
|
+
}, {
|
|
17328
|
+
included: number;
|
|
17329
|
+
unit_price_excess?: number | null | undefined;
|
|
17330
|
+
}>>;
|
|
17331
|
+
display_allowances: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
17332
|
+
metric: z.ZodString;
|
|
17333
|
+
included: z.ZodNumber;
|
|
17334
|
+
}, "strip", z.ZodTypeAny, {
|
|
17335
|
+
included: number;
|
|
17336
|
+
metric: string;
|
|
17337
|
+
}, {
|
|
17338
|
+
included: number;
|
|
17339
|
+
metric: string;
|
|
17340
|
+
}>, "many">>>;
|
|
17341
|
+
not_included: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
17342
|
+
highlights: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
17343
|
+
}, "strip", z.ZodTypeAny, {
|
|
17344
|
+
modules: Record<string, {
|
|
17345
|
+
enabled: boolean;
|
|
17346
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
17347
|
+
}>;
|
|
17348
|
+
allowances: Record<string, {
|
|
17349
|
+
included: number;
|
|
17350
|
+
unit_price_excess?: number | null | undefined;
|
|
17351
|
+
}>;
|
|
17352
|
+
price_table_id: string;
|
|
17353
|
+
highlights?: string[] | null | undefined;
|
|
17354
|
+
list_amount?: number | null | undefined;
|
|
17355
|
+
fixed_service_category?: string | null | undefined;
|
|
17356
|
+
fixed_service_description?: string | null | undefined;
|
|
17357
|
+
display_allowances?: {
|
|
17358
|
+
included: number;
|
|
17359
|
+
metric: string;
|
|
17360
|
+
}[] | null | undefined;
|
|
17361
|
+
not_included?: string[] | null | undefined;
|
|
17362
|
+
}, {
|
|
17363
|
+
modules: Record<string, {
|
|
17364
|
+
enabled: boolean;
|
|
17365
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
17366
|
+
}>;
|
|
17367
|
+
allowances: Record<string, {
|
|
17368
|
+
included: number;
|
|
17369
|
+
unit_price_excess?: number | null | undefined;
|
|
17370
|
+
}>;
|
|
17371
|
+
price_table_id: string;
|
|
17372
|
+
highlights?: string[] | null | undefined;
|
|
17373
|
+
list_amount?: number | null | undefined;
|
|
17374
|
+
fixed_service_category?: string | null | undefined;
|
|
17375
|
+
fixed_service_description?: string | null | undefined;
|
|
17376
|
+
display_allowances?: {
|
|
17377
|
+
included: number;
|
|
17378
|
+
metric: string;
|
|
17379
|
+
}[] | null | undefined;
|
|
17380
|
+
not_included?: string[] | null | undefined;
|
|
17381
|
+
}>>>;
|
|
17161
17382
|
terms: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
17162
17383
|
proposal_valid_days: z.ZodNumber;
|
|
17163
17384
|
site: z.ZodString;
|
|
@@ -17171,9 +17392,9 @@ export declare const zNexVendasOfferWriteSchema: z.ZodObject<{
|
|
|
17171
17392
|
name: string;
|
|
17172
17393
|
active: boolean;
|
|
17173
17394
|
site: string;
|
|
17395
|
+
base_amount: number;
|
|
17174
17396
|
slug: string;
|
|
17175
17397
|
headline: string;
|
|
17176
|
-
base_amount: number;
|
|
17177
17398
|
due_day: number;
|
|
17178
17399
|
accepted_payment_methods: ("payment_link" | "boleto" | "card_subscription")[];
|
|
17179
17400
|
loyalty_period: "none" | "3m" | "6m" | "1y" | "2y";
|
|
@@ -17186,9 +17407,29 @@ export declare const zNexVendasOfferWriteSchema: z.ZodObject<{
|
|
|
17186
17407
|
listed: boolean;
|
|
17187
17408
|
created_by?: string | undefined;
|
|
17188
17409
|
description?: string | null | undefined;
|
|
17410
|
+
terms?: string | null | undefined;
|
|
17189
17411
|
html_content?: string | null | undefined;
|
|
17190
17412
|
contract_type?: "assinatura_eletronica" | "adesao" | null | undefined;
|
|
17191
|
-
|
|
17413
|
+
package?: {
|
|
17414
|
+
modules: Record<string, {
|
|
17415
|
+
enabled: boolean;
|
|
17416
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
17417
|
+
}>;
|
|
17418
|
+
allowances: Record<string, {
|
|
17419
|
+
included: number;
|
|
17420
|
+
unit_price_excess?: number | null | undefined;
|
|
17421
|
+
}>;
|
|
17422
|
+
price_table_id: string;
|
|
17423
|
+
highlights?: string[] | null | undefined;
|
|
17424
|
+
list_amount?: number | null | undefined;
|
|
17425
|
+
fixed_service_category?: string | null | undefined;
|
|
17426
|
+
fixed_service_description?: string | null | undefined;
|
|
17427
|
+
display_allowances?: {
|
|
17428
|
+
included: number;
|
|
17429
|
+
metric: string;
|
|
17430
|
+
}[] | null | undefined;
|
|
17431
|
+
not_included?: string[] | null | undefined;
|
|
17432
|
+
} | null | undefined;
|
|
17192
17433
|
origem?: string | null | undefined;
|
|
17193
17434
|
start_count?: number | null | undefined;
|
|
17194
17435
|
last_start_at?: Date | null | undefined;
|
|
@@ -17196,9 +17437,9 @@ export declare const zNexVendasOfferWriteSchema: z.ZodObject<{
|
|
|
17196
17437
|
name: string;
|
|
17197
17438
|
active: boolean;
|
|
17198
17439
|
site: string;
|
|
17440
|
+
base_amount: number;
|
|
17199
17441
|
slug: string;
|
|
17200
17442
|
headline: string;
|
|
17201
|
-
base_amount: number;
|
|
17202
17443
|
due_day: number;
|
|
17203
17444
|
accepted_payment_methods: ("payment_link" | "boleto" | "card_subscription")[];
|
|
17204
17445
|
loyalty_period: "none" | "3m" | "6m" | "1y" | "2y";
|
|
@@ -17211,9 +17452,29 @@ export declare const zNexVendasOfferWriteSchema: z.ZodObject<{
|
|
|
17211
17452
|
listed: boolean;
|
|
17212
17453
|
created_by?: string | undefined;
|
|
17213
17454
|
description?: string | null | undefined;
|
|
17455
|
+
terms?: string | null | undefined;
|
|
17214
17456
|
html_content?: string | null | undefined;
|
|
17215
17457
|
contract_type?: "assinatura_eletronica" | "adesao" | null | undefined;
|
|
17216
|
-
|
|
17458
|
+
package?: {
|
|
17459
|
+
modules: Record<string, {
|
|
17460
|
+
enabled: boolean;
|
|
17461
|
+
capabilities?: Record<string, string | number | boolean> | null | undefined;
|
|
17462
|
+
}>;
|
|
17463
|
+
allowances: Record<string, {
|
|
17464
|
+
included: number;
|
|
17465
|
+
unit_price_excess?: number | null | undefined;
|
|
17466
|
+
}>;
|
|
17467
|
+
price_table_id: string;
|
|
17468
|
+
highlights?: string[] | null | undefined;
|
|
17469
|
+
list_amount?: number | null | undefined;
|
|
17470
|
+
fixed_service_category?: string | null | undefined;
|
|
17471
|
+
fixed_service_description?: string | null | undefined;
|
|
17472
|
+
display_allowances?: {
|
|
17473
|
+
included: number;
|
|
17474
|
+
metric: string;
|
|
17475
|
+
}[] | null | undefined;
|
|
17476
|
+
not_included?: string[] | null | undefined;
|
|
17477
|
+
} | null | undefined;
|
|
17217
17478
|
origem?: string | null | undefined;
|
|
17218
17479
|
start_count?: number | null | undefined;
|
|
17219
17480
|
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) ----
|
|
@@ -1318,7 +1365,10 @@ exports.zNexVendasOfferWriteSchema = zod_1.z
|
|
|
1318
1365
|
loyalty_period: exports.zNexFinopsProposalLoyaltyPeriodSchema,
|
|
1319
1366
|
contract_template_key: zod_1.z.string().min(1).max(64),
|
|
1320
1367
|
contract_type: exports.zNexVendasContractTypeSchema.optional().nullable(),
|
|
1368
|
+
/** @deprecated feat-353 — usar `package.allowances` (o backend força null). */
|
|
1321
1369
|
allowances: exports.zNexFinopsContractAllowancesSchema.nullable(),
|
|
1370
|
+
/** feat-353 — pacote comercial. Ausente/null = oferta v1. */
|
|
1371
|
+
package: exports.zNexVendasOfferPackageSchema.nullable().optional(),
|
|
1322
1372
|
terms: zod_1.z.string().optional().nullable(),
|
|
1323
1373
|
proposal_valid_days: zod_1.z.number().int().min(1).max(90),
|
|
1324
1374
|
site: zod_1.z.string().min(1).max(64),
|
|
@@ -976,7 +976,11 @@ export const zNexFinopsProposalWriteSchema = z
|
|
|
976
976
|
* sobrescrito). Está no schema para o backend não perder o campo no `.strip()`.
|
|
977
977
|
*/
|
|
978
978
|
contract_type: zNexVendasContractTypeSchema.optional().nullable(),
|
|
979
|
-
/**
|
|
979
|
+
/**
|
|
980
|
+
* feat-326 — preenchidos pelo `start` da oferta; no CRUD do vendedor ficam ausentes.
|
|
981
|
+
* feat-353: `package` (cópia congelada do pacote) NÃO entra aqui de propósito — só o
|
|
982
|
+
* `start` grava, direto no documento; o PUT/POST de proposta descarta.
|
|
983
|
+
*/
|
|
980
984
|
offer_slug: z.string().max(64).optional().nullable(),
|
|
981
985
|
attribution: zNexVendasAttributionSchema.optional().nullable(),
|
|
982
986
|
client_request_id: z.string().max(64).optional().nullable(),
|
|
@@ -1144,6 +1148,50 @@ export const zNexFinopsContractAllowancesSchema = z.record(
|
|
|
1144
1148
|
zNexFinopsContractAllowanceSchema,
|
|
1145
1149
|
);
|
|
1146
1150
|
|
|
1151
|
+
// ---- Nexus Vendas — pacote da oferta (feat-353) ----
|
|
1152
|
+
//
|
|
1153
|
+
// Só a FORMA (chave/tipo). Regras de negócio (todos os módulos do catálogo
|
|
1154
|
+
// declarados, capability do catálogo com o tipo do default, franquia de módulo
|
|
1155
|
+
// desligado, `list_amount > base_amount`, categoria ≠ SSR, tabela existente…)
|
|
1156
|
+
// ficam no backend (`validateOfferPackage`).
|
|
1157
|
+
|
|
1158
|
+
/** Estado de um módulo no pacote (`INexVendasPackageModule`). */
|
|
1159
|
+
export const zNexVendasPackageModuleSchema = z
|
|
1160
|
+
.object({
|
|
1161
|
+
enabled: z.boolean(),
|
|
1162
|
+
capabilities: z
|
|
1163
|
+
.record(z.string().min(1).max(64), z.union([z.boolean(), z.number().finite(), z.string().max(255)]))
|
|
1164
|
+
.nullable()
|
|
1165
|
+
.optional(),
|
|
1166
|
+
})
|
|
1167
|
+
.strip();
|
|
1168
|
+
|
|
1169
|
+
/** Módulos do pacote por chave do catálogo (`PLATFORM_MODULE_CATALOG`). */
|
|
1170
|
+
export const zNexVendasPackageModulesSchema = z.record(z.string().min(1).max(64), zNexVendasPackageModuleSchema);
|
|
1171
|
+
|
|
1172
|
+
/** Franquia só exibida (`INexVendasPackageDisplayAllowance`). */
|
|
1173
|
+
export const zNexVendasPackageDisplayAllowanceSchema = z
|
|
1174
|
+
.object({
|
|
1175
|
+
metric: z.string().min(1).max(64),
|
|
1176
|
+
included: z.number().int().nonnegative(),
|
|
1177
|
+
})
|
|
1178
|
+
.strip();
|
|
1179
|
+
|
|
1180
|
+
/** Pacote comercial da oferta (`INexVendasOfferPackage`). Cobre TODOS os campos. */
|
|
1181
|
+
export const zNexVendasOfferPackageSchema = z
|
|
1182
|
+
.object({
|
|
1183
|
+
price_table_id: z.string().min(1).max(128),
|
|
1184
|
+
list_amount: z.number().finite().nonnegative().nullable().optional(),
|
|
1185
|
+
fixed_service_category: z.string().min(1).max(32).nullable().optional(),
|
|
1186
|
+
fixed_service_description: z.string().max(255).nullable().optional(),
|
|
1187
|
+
modules: zNexVendasPackageModulesSchema,
|
|
1188
|
+
allowances: zNexFinopsContractAllowancesSchema,
|
|
1189
|
+
display_allowances: z.array(zNexVendasPackageDisplayAllowanceSchema).max(20).nullable().optional(),
|
|
1190
|
+
not_included: z.array(z.string().min(1).max(255)).max(20).nullable().optional(),
|
|
1191
|
+
highlights: z.array(z.string().min(1).max(255)).max(20).nullable().optional(),
|
|
1192
|
+
})
|
|
1193
|
+
.strip();
|
|
1194
|
+
|
|
1147
1195
|
/**
|
|
1148
1196
|
* Gatilho de alerta: **fração** da franquia, não percentual — `0.8` é 80%.
|
|
1149
1197
|
* `0` é rejeitado porque dispararia em qualquer consumo.
|
|
@@ -1179,6 +1227,10 @@ export const zNexFinopsContractAllowancesWriteSchema = z
|
|
|
1179
1227
|
nfse_fee_reimbursement: z.boolean().optional().nullable(),
|
|
1180
1228
|
/** feat-328 — tabela de preço do contrato. Ausente/null = tabela padrão. */
|
|
1181
1229
|
price_table_id: z.string().min(1).nullable().optional(),
|
|
1230
|
+
/** feat-353 — snapshot dos módulos vendidos (autoritativo no runner da feat-297). */
|
|
1231
|
+
package_modules: zNexVendasPackageModulesSchema.nullable().optional(),
|
|
1232
|
+
/** feat-353 — slug da oferta de origem. */
|
|
1233
|
+
offer_slug: z.string().max(64).nullable().optional(),
|
|
1182
1234
|
})
|
|
1183
1235
|
.strip();
|
|
1184
1236
|
|
|
@@ -1450,7 +1502,10 @@ export const zNexVendasOfferWriteSchema = z
|
|
|
1450
1502
|
loyalty_period: zNexFinopsProposalLoyaltyPeriodSchema,
|
|
1451
1503
|
contract_template_key: z.string().min(1).max(64),
|
|
1452
1504
|
contract_type: zNexVendasContractTypeSchema.optional().nullable(),
|
|
1505
|
+
/** @deprecated feat-353 — usar `package.allowances` (o backend força null). */
|
|
1453
1506
|
allowances: zNexFinopsContractAllowancesSchema.nullable(),
|
|
1507
|
+
/** feat-353 — pacote comercial. Ausente/null = oferta v1. */
|
|
1508
|
+
package: zNexVendasOfferPackageSchema.nullable().optional(),
|
|
1454
1509
|
terms: z.string().optional().nullable(),
|
|
1455
1510
|
proposal_valid_days: z.number().int().min(1).max(90),
|
|
1456
1511
|
site: z.string().min(1).max(64),
|
|
@@ -65,13 +65,13 @@ export declare const zModuleChangeRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
65
65
|
suspend?: boolean | undefined;
|
|
66
66
|
};
|
|
67
67
|
reason: string;
|
|
68
|
-
action: "trial" | "enable" | "disable" | "override" | "configure";
|
|
69
68
|
module: string;
|
|
69
|
+
action: "trial" | "override" | "enable" | "disable" | "configure";
|
|
70
70
|
}, {
|
|
71
71
|
tenant: string;
|
|
72
72
|
reason: string;
|
|
73
|
-
action: "trial" | "enable" | "disable" | "override" | "configure";
|
|
74
73
|
module: string;
|
|
74
|
+
action: "trial" | "override" | "enable" | "disable" | "configure";
|
|
75
75
|
params?: {
|
|
76
76
|
capabilities?: Record<string, string | number | boolean> | undefined;
|
|
77
77
|
expires_at?: unknown;
|
|
@@ -91,13 +91,13 @@ export declare const zModuleChangeRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
91
91
|
suspend?: boolean | undefined;
|
|
92
92
|
};
|
|
93
93
|
reason: string;
|
|
94
|
-
action: "trial" | "enable" | "disable" | "override" | "configure";
|
|
95
94
|
module: string;
|
|
95
|
+
action: "trial" | "override" | "enable" | "disable" | "configure";
|
|
96
96
|
}, {
|
|
97
97
|
tenant: string;
|
|
98
98
|
reason: string;
|
|
99
|
-
action: "trial" | "enable" | "disable" | "override" | "configure";
|
|
100
99
|
module: string;
|
|
100
|
+
action: "trial" | "override" | "enable" | "disable" | "configure";
|
|
101
101
|
params?: {
|
|
102
102
|
capabilities?: Record<string, string | number | boolean> | undefined;
|
|
103
103
|
expires_at?: unknown;
|