evo360-types 1.3.659 → 1.3.662
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 +8 -8
- package/dist/apps/evo-task/zod-schemas.d.ts +201 -4
- package/dist/apps/evo-task/zod-schemas.js +22 -2
- package/dist/apps/evo-task/zod-schemas.ts +23 -1
- package/dist/types/evo-task/index.d.ts +14 -0
- package/dist/types/evo-task/index.js +3 -0
- package/dist/types/evo-task/index.ts +25 -0
- package/dist/types/evo-task-runner/index.d.ts +2 -1
- package/dist/types/evo-task-runner/index.ts +5 -1
- package/package.json +1 -1
|
@@ -1964,7 +1964,7 @@ export declare const zCsqCrossCheckSchema: z.ZodObject<{
|
|
|
1964
1964
|
}, "strip", z.ZodTypeAny, {
|
|
1965
1965
|
result: "match" | "inconclusive" | "mismatch" | "missing" | "cancelled_after";
|
|
1966
1966
|
expected: string;
|
|
1967
|
-
claim_type: "
|
|
1967
|
+
claim_type: "outcome" | "promise" | "appointment_informed" | "data_collected" | "required_data" | "question_requires_answer" | "first_concrete_offer" | "patient_status" | "price_informed";
|
|
1968
1968
|
found: string | null;
|
|
1969
1969
|
calendar_id?: string | undefined;
|
|
1970
1970
|
note?: string | undefined;
|
|
@@ -1974,7 +1974,7 @@ export declare const zCsqCrossCheckSchema: z.ZodObject<{
|
|
|
1974
1974
|
}, {
|
|
1975
1975
|
result: "match" | "inconclusive" | "mismatch" | "missing" | "cancelled_after";
|
|
1976
1976
|
expected: string;
|
|
1977
|
-
claim_type: "
|
|
1977
|
+
claim_type: "outcome" | "promise" | "appointment_informed" | "data_collected" | "required_data" | "question_requires_answer" | "first_concrete_offer" | "patient_status" | "price_informed";
|
|
1978
1978
|
found: string | null;
|
|
1979
1979
|
calendar_id?: string | undefined;
|
|
1980
1980
|
note?: string | undefined;
|
|
@@ -7042,7 +7042,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
7042
7042
|
}, "strip", z.ZodTypeAny, {
|
|
7043
7043
|
result: "match" | "inconclusive" | "mismatch" | "missing" | "cancelled_after";
|
|
7044
7044
|
expected: string;
|
|
7045
|
-
claim_type: "
|
|
7045
|
+
claim_type: "outcome" | "promise" | "appointment_informed" | "data_collected" | "required_data" | "question_requires_answer" | "first_concrete_offer" | "patient_status" | "price_informed";
|
|
7046
7046
|
found: string | null;
|
|
7047
7047
|
calendar_id?: string | undefined;
|
|
7048
7048
|
note?: string | undefined;
|
|
@@ -7052,7 +7052,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
7052
7052
|
}, {
|
|
7053
7053
|
result: "match" | "inconclusive" | "mismatch" | "missing" | "cancelled_after";
|
|
7054
7054
|
expected: string;
|
|
7055
|
-
claim_type: "
|
|
7055
|
+
claim_type: "outcome" | "promise" | "appointment_informed" | "data_collected" | "required_data" | "question_requires_answer" | "first_concrete_offer" | "patient_status" | "price_informed";
|
|
7056
7056
|
found: string | null;
|
|
7057
7057
|
calendar_id?: string | undefined;
|
|
7058
7058
|
note?: string | undefined;
|
|
@@ -9499,7 +9499,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
9499
9499
|
}, "strip", z.ZodTypeAny, {
|
|
9500
9500
|
result: "match" | "inconclusive" | "mismatch" | "missing" | "cancelled_after";
|
|
9501
9501
|
expected: string;
|
|
9502
|
-
claim_type: "
|
|
9502
|
+
claim_type: "outcome" | "promise" | "appointment_informed" | "data_collected" | "required_data" | "question_requires_answer" | "first_concrete_offer" | "patient_status" | "price_informed";
|
|
9503
9503
|
found: string | null;
|
|
9504
9504
|
calendar_id?: string | undefined;
|
|
9505
9505
|
note?: string | undefined;
|
|
@@ -9509,7 +9509,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
9509
9509
|
}, {
|
|
9510
9510
|
result: "match" | "inconclusive" | "mismatch" | "missing" | "cancelled_after";
|
|
9511
9511
|
expected: string;
|
|
9512
|
-
claim_type: "
|
|
9512
|
+
claim_type: "outcome" | "promise" | "appointment_informed" | "data_collected" | "required_data" | "question_requires_answer" | "first_concrete_offer" | "patient_status" | "price_informed";
|
|
9513
9513
|
found: string | null;
|
|
9514
9514
|
calendar_id?: string | undefined;
|
|
9515
9515
|
note?: string | undefined;
|
|
@@ -11956,7 +11956,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
11956
11956
|
}, "strip", z.ZodTypeAny, {
|
|
11957
11957
|
result: "match" | "inconclusive" | "mismatch" | "missing" | "cancelled_after";
|
|
11958
11958
|
expected: string;
|
|
11959
|
-
claim_type: "
|
|
11959
|
+
claim_type: "outcome" | "promise" | "appointment_informed" | "data_collected" | "required_data" | "question_requires_answer" | "first_concrete_offer" | "patient_status" | "price_informed";
|
|
11960
11960
|
found: string | null;
|
|
11961
11961
|
calendar_id?: string | undefined;
|
|
11962
11962
|
note?: string | undefined;
|
|
@@ -11966,7 +11966,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
11966
11966
|
}, {
|
|
11967
11967
|
result: "match" | "inconclusive" | "mismatch" | "missing" | "cancelled_after";
|
|
11968
11968
|
expected: string;
|
|
11969
|
-
claim_type: "
|
|
11969
|
+
claim_type: "outcome" | "promise" | "appointment_informed" | "data_collected" | "required_data" | "question_requires_answer" | "first_concrete_offer" | "patient_status" | "price_informed";
|
|
11970
11970
|
found: string | null;
|
|
11971
11971
|
calendar_id?: string | undefined;
|
|
11972
11972
|
note?: 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([
|
|
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([
|
|
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();
|
|
@@ -191,6 +191,7 @@ export interface IAutoTask extends ITaskBase {
|
|
|
191
191
|
retry?: ITaskRetryPolicy;
|
|
192
192
|
on_failure?: ITaskOnFailure;
|
|
193
193
|
runner_state?: ITaskRunnerState;
|
|
194
|
+
outcome?: ITaskOutcome | null;
|
|
194
195
|
auto: ITaskAutoSpec;
|
|
195
196
|
}
|
|
196
197
|
export type ITask = IHumanTask | IAutoTask;
|
|
@@ -198,8 +199,20 @@ export declare const TaskExecutionStatusEnum: {
|
|
|
198
199
|
readonly Success: "success";
|
|
199
200
|
readonly Error: "error";
|
|
200
201
|
readonly Retry: "retry";
|
|
202
|
+
readonly Suppressed: "suppressed";
|
|
201
203
|
};
|
|
202
204
|
export type TaskExecutionStatus = (typeof TaskExecutionStatusEnum)[keyof typeof TaskExecutionStatusEnum];
|
|
205
|
+
export type TaskOutcomeClass = "legitimate" | "defect";
|
|
206
|
+
export interface ITaskOutcome {
|
|
207
|
+
class: TaskOutcomeClass;
|
|
208
|
+
reason: string;
|
|
209
|
+
label: string;
|
|
210
|
+
message: string;
|
|
211
|
+
action_hint?: string;
|
|
212
|
+
scope?: string;
|
|
213
|
+
details?: Record<string, unknown>;
|
|
214
|
+
at: Date;
|
|
215
|
+
}
|
|
203
216
|
export interface ITaskExecution extends IFireDoc {
|
|
204
217
|
taskId: string;
|
|
205
218
|
handler: TaskAutoHandler;
|
|
@@ -214,6 +227,7 @@ export interface ITaskExecution extends IFireDoc {
|
|
|
214
227
|
code?: string | number;
|
|
215
228
|
details?: Record<string, unknown>;
|
|
216
229
|
};
|
|
230
|
+
outcome?: ITaskOutcome;
|
|
217
231
|
provider?: {
|
|
218
232
|
name?: string;
|
|
219
233
|
message_id?: string;
|
|
@@ -167,4 +167,7 @@ exports.TaskExecutionStatusEnum = {
|
|
|
167
167
|
Success: "success",
|
|
168
168
|
Error: "error",
|
|
169
169
|
Retry: "retry",
|
|
170
|
+
// Handler ran and decided not to deliver; `outcome` says why. The runner
|
|
171
|
+
// finalizes the task directly (no retry, fallback or handoff).
|
|
172
|
+
Suppressed: "suppressed",
|
|
170
173
|
};
|
|
@@ -357,6 +357,10 @@ export interface IAutoTask extends ITaskBase {
|
|
|
357
357
|
// Runtime state populated by the Task Runner
|
|
358
358
|
runner_state?: ITaskRunnerState;
|
|
359
359
|
|
|
360
|
+
// Why the handler decided not to deliver (suppressed | failed by defect).
|
|
361
|
+
// Reset to null when the task completes or is retried manually.
|
|
362
|
+
outcome?: ITaskOutcome | null;
|
|
363
|
+
|
|
360
364
|
// What to execute
|
|
361
365
|
auto: ITaskAutoSpec;
|
|
362
366
|
}
|
|
@@ -369,11 +373,29 @@ export const TaskExecutionStatusEnum = {
|
|
|
369
373
|
Success: "success",
|
|
370
374
|
Error: "error",
|
|
371
375
|
Retry: "retry",
|
|
376
|
+
// Handler ran and decided not to deliver; `outcome` says why. The runner
|
|
377
|
+
// finalizes the task directly (no retry, fallback or handoff).
|
|
378
|
+
Suppressed: "suppressed",
|
|
372
379
|
} as const;
|
|
373
380
|
|
|
374
381
|
export type TaskExecutionStatus =
|
|
375
382
|
(typeof TaskExecutionStatusEnum)[keyof typeof TaskExecutionStatusEnum];
|
|
376
383
|
|
|
384
|
+
export type TaskOutcomeClass = "legitimate" | "defect";
|
|
385
|
+
|
|
386
|
+
// Outcome of an execution that did not deliver. `legitimate` ends the task as
|
|
387
|
+
// `suppressed`; `defect` ends it as `failed` (actionable problem).
|
|
388
|
+
export interface ITaskOutcome {
|
|
389
|
+
class: TaskOutcomeClass;
|
|
390
|
+
reason: string;
|
|
391
|
+
label: string;
|
|
392
|
+
message: string;
|
|
393
|
+
action_hint?: string;
|
|
394
|
+
scope?: string;
|
|
395
|
+
details?: Record<string, unknown>;
|
|
396
|
+
at: Date;
|
|
397
|
+
}
|
|
398
|
+
|
|
377
399
|
export interface ITaskExecution extends IFireDoc {
|
|
378
400
|
taskId: string;
|
|
379
401
|
handler: TaskAutoHandler;
|
|
@@ -391,6 +413,9 @@ export interface ITaskExecution extends IFireDoc {
|
|
|
391
413
|
details?: Record<string, unknown>;
|
|
392
414
|
};
|
|
393
415
|
|
|
416
|
+
// Present when status is suppressed
|
|
417
|
+
outcome?: ITaskOutcome;
|
|
418
|
+
|
|
394
419
|
// Optional provider metadata (e.g. WhatsApp provider message id)
|
|
395
420
|
provider?: {
|
|
396
421
|
name?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "./fb_collections";
|
|
2
2
|
import type { IFireDoc } from "../shared";
|
|
3
|
-
import type { TaskAutoHandler, TaskExecutionStatus, TaskRetryStrategy } from "../evo-task";
|
|
3
|
+
import type { TaskAutoHandler, ITaskOutcome, TaskExecutionStatus, TaskRetryStrategy } from "../evo-task";
|
|
4
4
|
export declare const EvoTaskRunnerPermissions: {
|
|
5
5
|
readonly List: "evo_task_runner_read";
|
|
6
6
|
readonly Get: "evo_task_runner_read";
|
|
@@ -55,6 +55,7 @@ export interface ITaskExecutionReport {
|
|
|
55
55
|
attempt: number;
|
|
56
56
|
correlation_id?: string;
|
|
57
57
|
status: TaskExecutionStatus;
|
|
58
|
+
outcome?: ITaskOutcome;
|
|
58
59
|
started_at: Date;
|
|
59
60
|
completed_at: Date;
|
|
60
61
|
suggested_retry?: {
|
|
@@ -2,6 +2,7 @@ export * from "./fb_collections";
|
|
|
2
2
|
import type { IFireDoc } from "../shared";
|
|
3
3
|
import type {
|
|
4
4
|
TaskAutoHandler,
|
|
5
|
+
ITaskOutcome,
|
|
5
6
|
TaskExecutionStatus,
|
|
6
7
|
TaskRetryStrategy,
|
|
7
8
|
} from "../evo-task";
|
|
@@ -115,7 +116,10 @@ export interface ITaskExecutionReport {
|
|
|
115
116
|
correlation_id?: string;
|
|
116
117
|
|
|
117
118
|
// Status/result
|
|
118
|
-
status: TaskExecutionStatus; // success | error | retry
|
|
119
|
+
status: TaskExecutionStatus; // success | error | retry | suppressed
|
|
120
|
+
|
|
121
|
+
// Required when status is suppressed: why nothing was delivered
|
|
122
|
+
outcome?: ITaskOutcome;
|
|
119
123
|
|
|
120
124
|
started_at: Date;
|
|
121
125
|
completed_at: Date;
|