evo360-types 1.3.659 → 1.3.664

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.
Files changed (30) hide show
  1. package/dist/apps/evo-core/zod-schemas.d.ts +157 -8
  2. package/dist/apps/evo-core/zod-schemas.js +15 -2
  3. package/dist/apps/evo-core/zod-schemas.ts +15 -1
  4. package/dist/apps/evo-crm/lead/zod-schemas.d.ts +6 -6
  5. package/dist/apps/evo-csq/zod-schemas.d.ts +8 -8
  6. package/dist/apps/evo-finops/zod-schemas.d.ts +67 -24
  7. package/dist/apps/evo-finops/zod-schemas.js +23 -1
  8. package/dist/apps/evo-finops/zod-schemas.ts +25 -0
  9. package/dist/apps/evo-med/insurance/zod-schemas.d.ts +6 -6
  10. package/dist/apps/evo-med/people/zod-schemas.d.ts +12 -12
  11. package/dist/apps/evo-task/zod-schemas.d.ts +201 -4
  12. package/dist/apps/evo-task/zod-schemas.js +22 -2
  13. package/dist/apps/evo-task/zod-schemas.ts +23 -1
  14. package/dist/apps/shared/zod-schemas.d.ts +2 -2
  15. package/dist/types/evo-core/index.d.ts +14 -2
  16. package/dist/types/evo-core/index.ts +20 -2
  17. package/dist/types/evo-finops/common/contract.d.ts +2 -0
  18. package/dist/types/evo-finops/common/contract.ts +3 -0
  19. package/dist/types/evo-finops/common/nfse-fee-reimbursement.d.ts +105 -0
  20. package/dist/types/evo-finops/common/nfse-fee-reimbursement.js +34 -0
  21. package/dist/types/evo-finops/common/nfse-fee-reimbursement.ts +134 -0
  22. package/dist/types/evo-finops/index.d.ts +1 -0
  23. package/dist/types/evo-finops/index.js +1 -0
  24. package/dist/types/evo-finops/index.ts +1 -0
  25. package/dist/types/evo-task/index.d.ts +14 -0
  26. package/dist/types/evo-task/index.js +3 -0
  27. package/dist/types/evo-task/index.ts +25 -0
  28. package/dist/types/evo-task-runner/index.d.ts +2 -1
  29. package/dist/types/evo-task-runner/index.ts +5 -1
  30. package/package.json +1 -1
@@ -1,7 +1,7 @@
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.zNexFinopsPaymentMethodsDiscoverSchema = exports.zEvoBillingPortalCardCaptureSchema = exports.zNexFinopsBillingCardChargeSchema = exports.zNexFinopsContractPaymentMethodsWriteSchema = exports.zNexFinopsPaymentMethodPatchSchema = exports.zNexFinopsPaymentMethodStatusSchema = exports.zNexFinopsPaymentMethodKindSchema = exports.zNexFinopsContractAllowancesWriteSchema = exports.zNexFinopsUsageAlertDefaultsSchema = exports.zNexFinopsAlertThresholdSchema = 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.zNexFinopsProposalStatusSchema = exports.zServiceInvoiceSchema = exports.zPaymentLinkSchema = exports.zPaymentLinkDocumentStateSchema = exports.zAsaasPaymentLinkSubscriptionCycleSchema = exports.zAsaasPaymentLinkChargeTypeSchema = exports.zAsaasPaymentLinkBillingTypeSchema = exports.zProviderPayloadSnapshotSchema = exports.zProviderTraceSchema = exports.zProviderInvoiceErrorSchema = exports.zProviderInvoiceIdentifiersSchema = exports.zProviderInvoiceLinksSchema = void 0;
4
+ exports.zNfseFeeReimbursementExecuteSchema = exports.zNfseFeeReimbursementCompetenciaSchema = exports.zNexFinopsPaymentMethodsDiscoverSchema = exports.zEvoBillingPortalCardCaptureSchema = exports.zNexFinopsBillingCardChargeSchema = exports.zNexFinopsContractPaymentMethodsWriteSchema = exports.zNexFinopsPaymentMethodPatchSchema = exports.zNexFinopsPaymentMethodStatusSchema = exports.zNexFinopsPaymentMethodKindSchema = exports.zNexFinopsContractAllowancesWriteSchema = exports.zNexFinopsUsageAlertDefaultsSchema = exports.zNexFinopsAlertThresholdSchema = 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.zNexFinopsProposalStatusSchema = exports.zServiceInvoiceSchema = exports.zPaymentLinkSchema = exports.zPaymentLinkDocumentStateSchema = exports.zAsaasPaymentLinkSubscriptionCycleSchema = exports.zAsaasPaymentLinkChargeTypeSchema = exports.zAsaasPaymentLinkBillingTypeSchema = exports.zProviderPayloadSnapshotSchema = exports.zProviderTraceSchema = exports.zProviderInvoiceErrorSchema = exports.zProviderInvoiceIdentifiersSchema = exports.zProviderInvoiceLinksSchema = void 0;
5
5
  const zod_1 = require("zod");
6
6
  const zod_schemas_1 = require("../shared/zod-schemas");
7
7
  // ---- Provider enums and base ----
@@ -932,6 +932,8 @@ exports.zNexFinopsContractAllowancesWriteSchema = zod_1.z
932
932
  allowances: exports.zNexFinopsContractAllowancesSchema.optional().nullable(),
933
933
  alerts_enabled: zod_1.z.boolean().optional().nullable(),
934
934
  alert_thresholds: zod_1.z.array(exports.zNexFinopsAlertThresholdSchema).optional().nullable(),
935
+ /** feat-264 D4 — ausente/null = TRUE (reembolsa). */
936
+ nfse_fee_reimbursement: zod_1.z.boolean().optional().nullable(),
935
937
  })
936
938
  .strip();
937
939
  // ---- Nexus FinOps — métodos de pagamento do cliente (feat-253) ----
@@ -1007,3 +1009,23 @@ exports.zNexFinopsPaymentMethodsDiscoverSchema = zod_1.z
1007
1009
  .optional(),
1008
1010
  })
1009
1011
  .strip();
1012
+ // ---- Nexus FinOps — reembolso da taxa de NFS-e (feat-264) ----
1013
+ /** Competência `"YYYY-MM"`. */
1014
+ exports.zNfseFeeReimbursementCompetenciaSchema = zod_1.z
1015
+ .string()
1016
+ .regex(/^\d{4}-(0[1-9]|1[0-2])$/);
1017
+ /**
1018
+ * `POST /nfse-fee-reimbursements/execute`. `expected` é o que o operador viu
1019
+ * na prévia; o backend recalcula e recusa se divergir.
1020
+ */
1021
+ exports.zNfseFeeReimbursementExecuteSchema = zod_1.z
1022
+ .object({
1023
+ tenant: zod_1.z.string().min(1),
1024
+ competencia: exports.zNfseFeeReimbursementCompetenciaSchema,
1025
+ expected: zod_1.z.object({
1026
+ invoice_count: zod_1.z.number().int().positive(),
1027
+ fee_value: zod_1.z.number().positive(),
1028
+ amount: zod_1.z.number().positive(),
1029
+ }),
1030
+ })
1031
+ .strict();
@@ -1021,6 +1021,8 @@ export const zNexFinopsContractAllowancesWriteSchema = z
1021
1021
  allowances: zNexFinopsContractAllowancesSchema.optional().nullable(),
1022
1022
  alerts_enabled: z.boolean().optional().nullable(),
1023
1023
  alert_thresholds: z.array(zNexFinopsAlertThresholdSchema).optional().nullable(),
1024
+ /** feat-264 D4 — ausente/null = TRUE (reembolsa). */
1025
+ nfse_fee_reimbursement: z.boolean().optional().nullable(),
1024
1026
  })
1025
1027
  .strip();
1026
1028
 
@@ -1104,3 +1106,26 @@ export const zNexFinopsPaymentMethodsDiscoverSchema = z
1104
1106
  .optional(),
1105
1107
  })
1106
1108
  .strip();
1109
+
1110
+ // ---- Nexus FinOps — reembolso da taxa de NFS-e (feat-264) ----
1111
+
1112
+ /** Competência `"YYYY-MM"`. */
1113
+ export const zNfseFeeReimbursementCompetenciaSchema = z
1114
+ .string()
1115
+ .regex(/^\d{4}-(0[1-9]|1[0-2])$/);
1116
+
1117
+ /**
1118
+ * `POST /nfse-fee-reimbursements/execute`. `expected` é o que o operador viu
1119
+ * na prévia; o backend recalcula e recusa se divergir.
1120
+ */
1121
+ export const zNfseFeeReimbursementExecuteSchema = z
1122
+ .object({
1123
+ tenant: z.string().min(1),
1124
+ competencia: zNfseFeeReimbursementCompetenciaSchema,
1125
+ expected: z.object({
1126
+ invoice_count: z.number().int().positive(),
1127
+ fee_value: z.number().positive(),
1128
+ amount: z.number().positive(),
1129
+ }),
1130
+ })
1131
+ .strict();
@@ -140,8 +140,8 @@ export declare const zInsuranceCompanySchema: z.ZodObject<{
140
140
  name: string;
141
141
  kind: string;
142
142
  country: string;
143
- city: string;
144
143
  state: string;
144
+ city: string;
145
145
  line1: string;
146
146
  line2: string;
147
147
  neighborhood: string;
@@ -151,8 +151,8 @@ export declare const zInsuranceCompanySchema: z.ZodObject<{
151
151
  name?: string | undefined;
152
152
  kind?: string | undefined;
153
153
  country?: string | undefined;
154
- city?: string | undefined;
155
154
  state?: string | undefined;
155
+ city?: string | undefined;
156
156
  line1?: string | undefined;
157
157
  line2?: string | undefined;
158
158
  neighborhood?: string | undefined;
@@ -279,8 +279,8 @@ export declare const zInsuranceCompanySchema: z.ZodObject<{
279
279
  name: string;
280
280
  kind: string;
281
281
  country: string;
282
- city: string;
283
282
  state: string;
283
+ city: string;
284
284
  line1: string;
285
285
  line2: string;
286
286
  neighborhood: string;
@@ -290,8 +290,8 @@ export declare const zInsuranceCompanySchema: z.ZodObject<{
290
290
  name?: string | undefined;
291
291
  kind?: string | undefined;
292
292
  country?: string | undefined;
293
- city?: string | undefined;
294
293
  state?: string | undefined;
294
+ city?: string | undefined;
295
295
  line1?: string | undefined;
296
296
  line2?: string | undefined;
297
297
  neighborhood?: string | undefined;
@@ -418,8 +418,8 @@ export declare const zInsuranceCompanySchema: z.ZodObject<{
418
418
  name: string;
419
419
  kind: string;
420
420
  country: string;
421
- city: string;
422
421
  state: string;
422
+ city: string;
423
423
  line1: string;
424
424
  line2: string;
425
425
  neighborhood: string;
@@ -429,8 +429,8 @@ export declare const zInsuranceCompanySchema: z.ZodObject<{
429
429
  name?: string | undefined;
430
430
  kind?: string | undefined;
431
431
  country?: string | undefined;
432
- city?: string | undefined;
433
432
  state?: string | undefined;
433
+ city?: string | undefined;
434
434
  line1?: string | undefined;
435
435
  line2?: string | undefined;
436
436
  neighborhood?: string | undefined;
@@ -135,8 +135,8 @@ export declare const zProfessionalSchema: z.ZodObject<{
135
135
  name: string;
136
136
  kind: string;
137
137
  country: string;
138
- city: string;
139
138
  state: string;
139
+ city: string;
140
140
  line1: string;
141
141
  line2: string;
142
142
  neighborhood: string;
@@ -146,8 +146,8 @@ export declare const zProfessionalSchema: z.ZodObject<{
146
146
  name?: string | undefined;
147
147
  kind?: string | undefined;
148
148
  country?: string | undefined;
149
- city?: string | undefined;
150
149
  state?: string | undefined;
150
+ city?: string | undefined;
151
151
  line1?: string | undefined;
152
152
  line2?: string | undefined;
153
153
  neighborhood?: string | undefined;
@@ -289,8 +289,8 @@ export declare const zProfessionalSchema: z.ZodObject<{
289
289
  name: string;
290
290
  kind: string;
291
291
  country: string;
292
- city: string;
293
292
  state: string;
293
+ city: string;
294
294
  line1: string;
295
295
  line2: string;
296
296
  neighborhood: string;
@@ -300,8 +300,8 @@ export declare const zProfessionalSchema: z.ZodObject<{
300
300
  name?: string | undefined;
301
301
  kind?: string | undefined;
302
302
  country?: string | undefined;
303
- city?: string | undefined;
304
303
  state?: string | undefined;
304
+ city?: string | undefined;
305
305
  line1?: string | undefined;
306
306
  line2?: string | undefined;
307
307
  neighborhood?: string | undefined;
@@ -443,8 +443,8 @@ export declare const zProfessionalSchema: z.ZodObject<{
443
443
  name: string;
444
444
  kind: string;
445
445
  country: string;
446
- city: string;
447
446
  state: string;
447
+ city: string;
448
448
  line1: string;
449
449
  line2: string;
450
450
  neighborhood: string;
@@ -454,8 +454,8 @@ export declare const zProfessionalSchema: z.ZodObject<{
454
454
  name?: string | undefined;
455
455
  kind?: string | undefined;
456
456
  country?: string | undefined;
457
- city?: string | undefined;
458
457
  state?: string | undefined;
458
+ city?: string | undefined;
459
459
  line1?: string | undefined;
460
460
  line2?: string | undefined;
461
461
  neighborhood?: string | undefined;
@@ -984,8 +984,8 @@ export declare const zPatientSchema: z.ZodObject<{
984
984
  name: string;
985
985
  kind: string;
986
986
  country: string;
987
- city: string;
988
987
  state: string;
988
+ city: string;
989
989
  line1: string;
990
990
  line2: string;
991
991
  neighborhood: string;
@@ -995,8 +995,8 @@ export declare const zPatientSchema: z.ZodObject<{
995
995
  name?: string | undefined;
996
996
  kind?: string | undefined;
997
997
  country?: string | undefined;
998
- city?: string | undefined;
999
998
  state?: string | undefined;
999
+ city?: string | undefined;
1000
1000
  line1?: string | undefined;
1001
1001
  line2?: string | undefined;
1002
1002
  neighborhood?: string | undefined;
@@ -1632,8 +1632,8 @@ export declare const zPatientSchema: z.ZodObject<{
1632
1632
  name: string;
1633
1633
  kind: string;
1634
1634
  country: string;
1635
- city: string;
1636
1635
  state: string;
1636
+ city: string;
1637
1637
  line1: string;
1638
1638
  line2: string;
1639
1639
  neighborhood: string;
@@ -1643,8 +1643,8 @@ export declare const zPatientSchema: z.ZodObject<{
1643
1643
  name?: string | undefined;
1644
1644
  kind?: string | undefined;
1645
1645
  country?: string | undefined;
1646
- city?: string | undefined;
1647
1646
  state?: string | undefined;
1647
+ city?: string | undefined;
1648
1648
  line1?: string | undefined;
1649
1649
  line2?: string | undefined;
1650
1650
  neighborhood?: string | undefined;
@@ -2280,8 +2280,8 @@ export declare const zPatientSchema: z.ZodObject<{
2280
2280
  name: string;
2281
2281
  kind: string;
2282
2282
  country: string;
2283
- city: string;
2284
2283
  state: string;
2284
+ city: string;
2285
2285
  line1: string;
2286
2286
  line2: string;
2287
2287
  neighborhood: string;
@@ -2291,8 +2291,8 @@ export declare const zPatientSchema: z.ZodObject<{
2291
2291
  name?: string | undefined;
2292
2292
  kind?: string | undefined;
2293
2293
  country?: string | undefined;
2294
- city?: string | undefined;
2295
2294
  state?: string | undefined;
2295
+ city?: string | undefined;
2296
2296
  line1?: string | undefined;
2297
2297
  line2?: string | undefined;
2298
2298
  neighborhood?: string | undefined;
@@ -10,7 +10,36 @@ export declare const zTaskDedupScopeSchema: z.ZodEnum<["per_recipient", "per_rec
10
10
  export declare const zTaskDedupWindowSchema: z.ZodEnum<["same_day", "n_hours", "custom"]>;
11
11
  export declare const zExternalObjectTypeSchema: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact", "evo_task", "campaign", "nex_billing", "nex_contract", "nex_customer", "teleconsultation"]>;
12
12
  export declare const zTaskExternalObjectTypeSchema: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact", "evo_task", "campaign", "nex_billing", "nex_contract", "nex_customer", "teleconsultation"]>;
13
- export declare const zTaskExecutionStatusSchema: z.ZodEnum<["success", "error", "retry"]>;
13
+ export declare const zTaskExecutionStatusSchema: z.ZodEnum<["success", "error", "retry", "suppressed"]>;
14
+ export declare const zTaskOutcomeClassSchema: z.ZodEnum<["legitimate", "defect"]>;
15
+ export declare const zTaskOutcomeSchema: z.ZodObject<{
16
+ class: z.ZodEnum<["legitimate", "defect"]>;
17
+ reason: z.ZodString;
18
+ label: z.ZodString;
19
+ message: z.ZodString;
20
+ action_hint: z.ZodOptional<z.ZodString>;
21
+ scope: z.ZodOptional<z.ZodString>;
22
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
23
+ at: z.ZodDate;
24
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
25
+ class: z.ZodEnum<["legitimate", "defect"]>;
26
+ reason: z.ZodString;
27
+ label: z.ZodString;
28
+ message: z.ZodString;
29
+ action_hint: z.ZodOptional<z.ZodString>;
30
+ scope: z.ZodOptional<z.ZodString>;
31
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
32
+ at: z.ZodDate;
33
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
34
+ class: z.ZodEnum<["legitimate", "defect"]>;
35
+ reason: z.ZodString;
36
+ label: z.ZodString;
37
+ message: z.ZodString;
38
+ action_hint: z.ZodOptional<z.ZodString>;
39
+ scope: z.ZodOptional<z.ZodString>;
40
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
41
+ at: z.ZodDate;
42
+ }, z.ZodTypeAny, "passthrough">>;
14
43
  export declare const zExternalOwnerSystemSchema: z.ZodEnum<["nexus"]>;
15
44
  export declare const zExternalLinkKindSchema: z.ZodEnum<["identity", "representation"]>;
16
45
  export declare const zExternalLinkStatusSchema: z.ZodEnum<["suggested", "confirmed", "rejected"]>;
@@ -1106,6 +1135,34 @@ export declare const zTaskSchema: z.ZodObject<{
1106
1135
  payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1107
1136
  idempotency_key: z.ZodOptional<z.ZodString>;
1108
1137
  }, z.ZodTypeAny, "passthrough">>>;
1138
+ outcome: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1139
+ class: z.ZodEnum<["legitimate", "defect"]>;
1140
+ reason: z.ZodString;
1141
+ label: z.ZodString;
1142
+ message: z.ZodString;
1143
+ action_hint: z.ZodOptional<z.ZodString>;
1144
+ scope: z.ZodOptional<z.ZodString>;
1145
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1146
+ at: z.ZodDate;
1147
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1148
+ class: z.ZodEnum<["legitimate", "defect"]>;
1149
+ reason: z.ZodString;
1150
+ label: z.ZodString;
1151
+ message: z.ZodString;
1152
+ action_hint: z.ZodOptional<z.ZodString>;
1153
+ scope: z.ZodOptional<z.ZodString>;
1154
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1155
+ at: z.ZodDate;
1156
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1157
+ class: z.ZodEnum<["legitimate", "defect"]>;
1158
+ reason: z.ZodString;
1159
+ label: z.ZodString;
1160
+ message: z.ZodString;
1161
+ action_hint: z.ZodOptional<z.ZodString>;
1162
+ scope: z.ZodOptional<z.ZodString>;
1163
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1164
+ at: z.ZodDate;
1165
+ }, z.ZodTypeAny, "passthrough">>>>;
1109
1166
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1110
1167
  id: z.ZodString;
1111
1168
  ref: z.ZodAny;
@@ -1619,6 +1676,34 @@ export declare const zTaskSchema: z.ZodObject<{
1619
1676
  payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1620
1677
  idempotency_key: z.ZodOptional<z.ZodString>;
1621
1678
  }, z.ZodTypeAny, "passthrough">>>;
1679
+ outcome: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1680
+ class: z.ZodEnum<["legitimate", "defect"]>;
1681
+ reason: z.ZodString;
1682
+ label: z.ZodString;
1683
+ message: z.ZodString;
1684
+ action_hint: z.ZodOptional<z.ZodString>;
1685
+ scope: z.ZodOptional<z.ZodString>;
1686
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1687
+ at: z.ZodDate;
1688
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1689
+ class: z.ZodEnum<["legitimate", "defect"]>;
1690
+ reason: z.ZodString;
1691
+ label: z.ZodString;
1692
+ message: z.ZodString;
1693
+ action_hint: z.ZodOptional<z.ZodString>;
1694
+ scope: z.ZodOptional<z.ZodString>;
1695
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1696
+ at: z.ZodDate;
1697
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1698
+ class: z.ZodEnum<["legitimate", "defect"]>;
1699
+ reason: z.ZodString;
1700
+ label: z.ZodString;
1701
+ message: z.ZodString;
1702
+ action_hint: z.ZodOptional<z.ZodString>;
1703
+ scope: z.ZodOptional<z.ZodString>;
1704
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1705
+ at: z.ZodDate;
1706
+ }, z.ZodTypeAny, "passthrough">>>>;
1622
1707
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1623
1708
  id: z.ZodString;
1624
1709
  ref: z.ZodAny;
@@ -2132,6 +2217,34 @@ export declare const zTaskSchema: z.ZodObject<{
2132
2217
  payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2133
2218
  idempotency_key: z.ZodOptional<z.ZodString>;
2134
2219
  }, z.ZodTypeAny, "passthrough">>>;
2220
+ outcome: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2221
+ class: z.ZodEnum<["legitimate", "defect"]>;
2222
+ reason: z.ZodString;
2223
+ label: z.ZodString;
2224
+ message: z.ZodString;
2225
+ action_hint: z.ZodOptional<z.ZodString>;
2226
+ scope: z.ZodOptional<z.ZodString>;
2227
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2228
+ at: z.ZodDate;
2229
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2230
+ class: z.ZodEnum<["legitimate", "defect"]>;
2231
+ reason: z.ZodString;
2232
+ label: z.ZodString;
2233
+ message: z.ZodString;
2234
+ action_hint: z.ZodOptional<z.ZodString>;
2235
+ scope: z.ZodOptional<z.ZodString>;
2236
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2237
+ at: z.ZodDate;
2238
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2239
+ class: z.ZodEnum<["legitimate", "defect"]>;
2240
+ reason: z.ZodString;
2241
+ label: z.ZodString;
2242
+ message: z.ZodString;
2243
+ action_hint: z.ZodOptional<z.ZodString>;
2244
+ scope: z.ZodOptional<z.ZodString>;
2245
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2246
+ at: z.ZodDate;
2247
+ }, z.ZodTypeAny, "passthrough">>>>;
2135
2248
  }, z.ZodTypeAny, "passthrough">>;
2136
2249
  export declare const zTaskCommentAuthorSchema: z.ZodObject<{
2137
2250
  name: z.ZodString;
@@ -2248,7 +2361,7 @@ export declare const zTaskExecutionSchema: z.ZodObject<{
2248
2361
  taskId: z.ZodString;
2249
2362
  handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "appointment_confirmation", "appointment_post_consultation", "evo-integrations.sync-run", "lead_form_capture", "campaign.materialize", "campaign.dispatch_batch", "telemedicine_join_reminder", "appointment_invoice"]>;
2250
2363
  kind: z.ZodString;
2251
- status: z.ZodEnum<["success", "error", "retry"]>;
2364
+ status: z.ZodEnum<["success", "error", "retry", "suppressed"]>;
2252
2365
  attempt: z.ZodNumber;
2253
2366
  started_at: z.ZodDate;
2254
2367
  completed_at: z.ZodOptional<z.ZodDate>;
@@ -2266,6 +2379,34 @@ export declare const zTaskExecutionSchema: z.ZodObject<{
2266
2379
  code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
2267
2380
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2268
2381
  }, z.ZodTypeAny, "passthrough">>>;
2382
+ outcome: z.ZodOptional<z.ZodObject<{
2383
+ class: z.ZodEnum<["legitimate", "defect"]>;
2384
+ reason: z.ZodString;
2385
+ label: z.ZodString;
2386
+ message: z.ZodString;
2387
+ action_hint: z.ZodOptional<z.ZodString>;
2388
+ scope: z.ZodOptional<z.ZodString>;
2389
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2390
+ at: z.ZodDate;
2391
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2392
+ class: z.ZodEnum<["legitimate", "defect"]>;
2393
+ reason: z.ZodString;
2394
+ label: z.ZodString;
2395
+ message: z.ZodString;
2396
+ action_hint: z.ZodOptional<z.ZodString>;
2397
+ scope: z.ZodOptional<z.ZodString>;
2398
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2399
+ at: z.ZodDate;
2400
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2401
+ class: z.ZodEnum<["legitimate", "defect"]>;
2402
+ reason: z.ZodString;
2403
+ label: z.ZodString;
2404
+ message: z.ZodString;
2405
+ action_hint: z.ZodOptional<z.ZodString>;
2406
+ scope: z.ZodOptional<z.ZodString>;
2407
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2408
+ at: z.ZodDate;
2409
+ }, z.ZodTypeAny, "passthrough">>>;
2269
2410
  provider: z.ZodOptional<z.ZodObject<{
2270
2411
  name: z.ZodOptional<z.ZodString>;
2271
2412
  message_id: z.ZodOptional<z.ZodString>;
@@ -2288,7 +2429,7 @@ export declare const zTaskExecutionSchema: z.ZodObject<{
2288
2429
  taskId: z.ZodString;
2289
2430
  handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "appointment_confirmation", "appointment_post_consultation", "evo-integrations.sync-run", "lead_form_capture", "campaign.materialize", "campaign.dispatch_batch", "telemedicine_join_reminder", "appointment_invoice"]>;
2290
2431
  kind: z.ZodString;
2291
- status: z.ZodEnum<["success", "error", "retry"]>;
2432
+ status: z.ZodEnum<["success", "error", "retry", "suppressed"]>;
2292
2433
  attempt: z.ZodNumber;
2293
2434
  started_at: z.ZodDate;
2294
2435
  completed_at: z.ZodOptional<z.ZodDate>;
@@ -2306,6 +2447,34 @@ export declare const zTaskExecutionSchema: z.ZodObject<{
2306
2447
  code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
2307
2448
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2308
2449
  }, z.ZodTypeAny, "passthrough">>>;
2450
+ outcome: z.ZodOptional<z.ZodObject<{
2451
+ class: z.ZodEnum<["legitimate", "defect"]>;
2452
+ reason: z.ZodString;
2453
+ label: z.ZodString;
2454
+ message: z.ZodString;
2455
+ action_hint: z.ZodOptional<z.ZodString>;
2456
+ scope: z.ZodOptional<z.ZodString>;
2457
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2458
+ at: z.ZodDate;
2459
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2460
+ class: z.ZodEnum<["legitimate", "defect"]>;
2461
+ reason: z.ZodString;
2462
+ label: z.ZodString;
2463
+ message: z.ZodString;
2464
+ action_hint: z.ZodOptional<z.ZodString>;
2465
+ scope: z.ZodOptional<z.ZodString>;
2466
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2467
+ at: z.ZodDate;
2468
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2469
+ class: z.ZodEnum<["legitimate", "defect"]>;
2470
+ reason: z.ZodString;
2471
+ label: z.ZodString;
2472
+ message: z.ZodString;
2473
+ action_hint: z.ZodOptional<z.ZodString>;
2474
+ scope: z.ZodOptional<z.ZodString>;
2475
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2476
+ at: z.ZodDate;
2477
+ }, z.ZodTypeAny, "passthrough">>>;
2309
2478
  provider: z.ZodOptional<z.ZodObject<{
2310
2479
  name: z.ZodOptional<z.ZodString>;
2311
2480
  message_id: z.ZodOptional<z.ZodString>;
@@ -2328,7 +2497,7 @@ export declare const zTaskExecutionSchema: z.ZodObject<{
2328
2497
  taskId: z.ZodString;
2329
2498
  handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "appointment_confirmation", "appointment_post_consultation", "evo-integrations.sync-run", "lead_form_capture", "campaign.materialize", "campaign.dispatch_batch", "telemedicine_join_reminder", "appointment_invoice"]>;
2330
2499
  kind: z.ZodString;
2331
- status: z.ZodEnum<["success", "error", "retry"]>;
2500
+ status: z.ZodEnum<["success", "error", "retry", "suppressed"]>;
2332
2501
  attempt: z.ZodNumber;
2333
2502
  started_at: z.ZodDate;
2334
2503
  completed_at: z.ZodOptional<z.ZodDate>;
@@ -2346,6 +2515,34 @@ export declare const zTaskExecutionSchema: z.ZodObject<{
2346
2515
  code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
2347
2516
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2348
2517
  }, z.ZodTypeAny, "passthrough">>>;
2518
+ outcome: z.ZodOptional<z.ZodObject<{
2519
+ class: z.ZodEnum<["legitimate", "defect"]>;
2520
+ reason: z.ZodString;
2521
+ label: z.ZodString;
2522
+ message: z.ZodString;
2523
+ action_hint: z.ZodOptional<z.ZodString>;
2524
+ scope: z.ZodOptional<z.ZodString>;
2525
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2526
+ at: z.ZodDate;
2527
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2528
+ class: z.ZodEnum<["legitimate", "defect"]>;
2529
+ reason: z.ZodString;
2530
+ label: z.ZodString;
2531
+ message: z.ZodString;
2532
+ action_hint: z.ZodOptional<z.ZodString>;
2533
+ scope: z.ZodOptional<z.ZodString>;
2534
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2535
+ at: z.ZodDate;
2536
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2537
+ class: z.ZodEnum<["legitimate", "defect"]>;
2538
+ reason: z.ZodString;
2539
+ label: z.ZodString;
2540
+ message: z.ZodString;
2541
+ action_hint: z.ZodOptional<z.ZodString>;
2542
+ scope: z.ZodOptional<z.ZodString>;
2543
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2544
+ at: z.ZodDate;
2545
+ }, z.ZodTypeAny, "passthrough">>>;
2349
2546
  provider: z.ZodOptional<z.ZodObject<{
2350
2547
  name: z.ZodOptional<z.ZodString>;
2351
2548
  message_id: z.ZodOptional<z.ZodString>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zTaskLogSchema = exports.zTaskExecutionSchema = exports.zTaskExecutionProviderSchema = exports.zTaskExecutionErrorSchema = exports.zTaskCommentSchema = exports.zTaskCommentAuthorSchema = exports.zTaskSchema = exports.zTaskCreatorSchema = exports.zTaskOnFailureSchema = exports.zTaskAutoSpecSchema = exports.zTaskDedupSchema = exports.zTaskRetryPolicySchema = exports.zTaskRunnerStateSchema = exports.zTaskLockSchema = exports.zTaskUserAssigneeSchema = exports.zTaskScheduleSchema = exports.zTaskExternalLinkSchema = exports.zExternalLinkSchema = exports.zExternalLinkRelationSchema = exports.zLinkRelationRoleSchema = exports.zLinkRelationPairSchema = exports.zExternalLinkSourceSchema = exports.zExternalLinkStatusSchema = exports.zExternalLinkKindSchema = exports.zExternalOwnerSystemSchema = exports.zTaskExecutionStatusSchema = exports.zTaskExternalObjectTypeSchema = exports.zExternalObjectTypeSchema = exports.zTaskDedupWindowSchema = exports.zTaskDedupScopeSchema = exports.zTaskRetryStrategySchema = exports.zTaskAutoHandlerSchema = exports.zTaskModeSchema = exports.zTaskSourceSchema = exports.zTaskPrioritySchema = exports.zTaskStatusSchema = exports.zTaskActionSchema = void 0;
3
+ exports.zTaskLogSchema = exports.zTaskExecutionSchema = exports.zTaskExecutionProviderSchema = exports.zTaskExecutionErrorSchema = exports.zTaskCommentSchema = exports.zTaskCommentAuthorSchema = exports.zTaskSchema = exports.zTaskCreatorSchema = exports.zTaskOnFailureSchema = exports.zTaskAutoSpecSchema = exports.zTaskDedupSchema = exports.zTaskRetryPolicySchema = exports.zTaskRunnerStateSchema = exports.zTaskLockSchema = exports.zTaskUserAssigneeSchema = exports.zTaskScheduleSchema = exports.zTaskExternalLinkSchema = exports.zExternalLinkSchema = exports.zExternalLinkRelationSchema = exports.zLinkRelationRoleSchema = exports.zLinkRelationPairSchema = exports.zExternalLinkSourceSchema = exports.zExternalLinkStatusSchema = exports.zExternalLinkKindSchema = exports.zExternalOwnerSystemSchema = exports.zTaskOutcomeSchema = exports.zTaskOutcomeClassSchema = exports.zTaskExecutionStatusSchema = exports.zTaskExternalObjectTypeSchema = exports.zExternalObjectTypeSchema = exports.zTaskDedupWindowSchema = exports.zTaskDedupScopeSchema = exports.zTaskRetryStrategySchema = exports.zTaskAutoHandlerSchema = exports.zTaskModeSchema = exports.zTaskSourceSchema = exports.zTaskPrioritySchema = exports.zTaskStatusSchema = exports.zTaskActionSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const zod_schemas_1 = require("../shared/zod-schemas");
6
6
  exports.zTaskActionSchema = zod_1.z.enum([
@@ -105,7 +105,25 @@ exports.zExternalObjectTypeSchema = zod_1.z.enum([
105
105
  ]);
106
106
  // Backward compatibility alias
107
107
  exports.zTaskExternalObjectTypeSchema = exports.zExternalObjectTypeSchema;
108
- exports.zTaskExecutionStatusSchema = zod_1.z.enum(["success", "error", "retry"]);
108
+ exports.zTaskExecutionStatusSchema = zod_1.z.enum([
109
+ "success",
110
+ "error",
111
+ "retry",
112
+ "suppressed",
113
+ ]);
114
+ exports.zTaskOutcomeClassSchema = zod_1.z.enum(["legitimate", "defect"]);
115
+ exports.zTaskOutcomeSchema = zod_1.z
116
+ .object({
117
+ class: exports.zTaskOutcomeClassSchema,
118
+ reason: zod_1.z.string(),
119
+ label: zod_1.z.string(),
120
+ message: zod_1.z.string(),
121
+ action_hint: zod_1.z.string().optional(),
122
+ scope: zod_1.z.string().optional(),
123
+ details: zod_1.z.record(zod_1.z.unknown()).optional(),
124
+ at: zod_1.z.coerce.date(),
125
+ })
126
+ .passthrough();
109
127
  // Schema para IExternalLink (promoted to shared, renamed from Task-specific)
110
128
  exports.zExternalOwnerSystemSchema = zod_1.z.enum(["nexus"]);
111
129
  // feat-193 — contrato do vínculo lead/paciente (espelha os enums de
@@ -319,6 +337,7 @@ exports.zTaskSchema = zod_schemas_1.zFireDocSchema
319
337
  on_failure: exports.zTaskOnFailureSchema.optional(), // for auto tasks
320
338
  runner_state: exports.zTaskRunnerStateSchema.optional(), // for auto tasks (maintained by Task Runner)
321
339
  auto: exports.zTaskAutoSpecSchema.optional(), // for auto tasks (required when mode=auto)
340
+ outcome: exports.zTaskOutcomeSchema.nullable().optional(), // for auto tasks (suppressed | failed by defect)
322
341
  })
323
342
  .passthrough();
324
343
  // Schema para ITaskComment
@@ -360,6 +379,7 @@ exports.zTaskExecutionSchema = zod_schemas_1.zFireDocSchema
360
379
  completed_at: zod_1.z.coerce.date().optional(),
361
380
  result: zod_1.z.record(zod_1.z.unknown()).optional(),
362
381
  error: exports.zTaskExecutionErrorSchema.optional(),
382
+ outcome: exports.zTaskOutcomeSchema.optional(),
363
383
  provider: exports.zTaskExecutionProviderSchema.optional(),
364
384
  })
365
385
  .passthrough();
@@ -114,7 +114,27 @@ export const zExternalObjectTypeSchema = z.enum([
114
114
  // Backward compatibility alias
115
115
  export const zTaskExternalObjectTypeSchema = zExternalObjectTypeSchema;
116
116
 
117
- export const zTaskExecutionStatusSchema = z.enum(["success", "error", "retry"]);
117
+ export const zTaskExecutionStatusSchema = z.enum([
118
+ "success",
119
+ "error",
120
+ "retry",
121
+ "suppressed",
122
+ ]);
123
+
124
+ export const zTaskOutcomeClassSchema = z.enum(["legitimate", "defect"]);
125
+
126
+ export const zTaskOutcomeSchema = z
127
+ .object({
128
+ class: zTaskOutcomeClassSchema,
129
+ reason: z.string(),
130
+ label: z.string(),
131
+ message: z.string(),
132
+ action_hint: z.string().optional(),
133
+ scope: z.string().optional(),
134
+ details: z.record(z.unknown()).optional(),
135
+ at: z.coerce.date(),
136
+ })
137
+ .passthrough();
118
138
 
119
139
  // Schema para IExternalLink (promoted to shared, renamed from Task-specific)
120
140
  export const zExternalOwnerSystemSchema = z.enum(["nexus"]);
@@ -352,6 +372,7 @@ export const zTaskSchema = zFireDocSchema
352
372
  on_failure: zTaskOnFailureSchema.optional(), // for auto tasks
353
373
  runner_state: zTaskRunnerStateSchema.optional(), // for auto tasks (maintained by Task Runner)
354
374
  auto: zTaskAutoSpecSchema.optional(), // for auto tasks (required when mode=auto)
375
+ outcome: zTaskOutcomeSchema.nullable().optional(), // for auto tasks (suppressed | failed by defect)
355
376
  })
356
377
  .passthrough();
357
378
 
@@ -398,6 +419,7 @@ export const zTaskExecutionSchema = zFireDocSchema
398
419
  completed_at: z.coerce.date().optional(),
399
420
  result: z.record(z.unknown()).optional(),
400
421
  error: zTaskExecutionErrorSchema.optional(),
422
+ outcome: zTaskOutcomeSchema.optional(),
401
423
  provider: zTaskExecutionProviderSchema.optional(),
402
424
  })
403
425
  .passthrough();
@@ -64,8 +64,8 @@ export declare const zAddressSchema: z.ZodObject<{
64
64
  name: string;
65
65
  kind: string;
66
66
  country: string;
67
- city: string;
68
67
  state: string;
68
+ city: string;
69
69
  line1: string;
70
70
  line2: string;
71
71
  neighborhood: string;
@@ -75,8 +75,8 @@ export declare const zAddressSchema: z.ZodObject<{
75
75
  name?: string | undefined;
76
76
  kind?: string | undefined;
77
77
  country?: string | undefined;
78
- city?: string | undefined;
79
78
  state?: string | undefined;
79
+ city?: string | undefined;
80
80
  line1?: string | undefined;
81
81
  line2?: string | undefined;
82
82
  neighborhood?: string | undefined;