asfur 1.0.112 → 1.0.113
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/index.d.ts +6 -6
- package/dist/types.d.ts +536 -149
- package/dist/types.js +20 -19
- package/package.json +1 -1
- package/types.ts +20 -19
package/dist/index.d.ts
CHANGED
|
@@ -427,8 +427,8 @@ export declare const MongoScenarioSchema: Schema<any, import("mongoose").Model<a
|
|
|
427
427
|
user_id: string;
|
|
428
428
|
created_at: number;
|
|
429
429
|
updated_at: number;
|
|
430
|
-
scenario: string;
|
|
431
430
|
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
431
|
+
scenario: string;
|
|
432
432
|
time_range?: any;
|
|
433
433
|
schedule?: string | null | undefined;
|
|
434
434
|
schedule_text?: string | null | undefined;
|
|
@@ -443,8 +443,8 @@ export declare const MongoScenarioSchema: Schema<any, import("mongoose").Model<a
|
|
|
443
443
|
user_id: string;
|
|
444
444
|
created_at: number;
|
|
445
445
|
updated_at: number;
|
|
446
|
-
scenario: string;
|
|
447
446
|
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
447
|
+
scenario: string;
|
|
448
448
|
time_range?: any;
|
|
449
449
|
schedule?: string | null | undefined;
|
|
450
450
|
schedule_text?: string | null | undefined;
|
|
@@ -459,8 +459,8 @@ export declare const MongoScenarioSchema: Schema<any, import("mongoose").Model<a
|
|
|
459
459
|
user_id: string;
|
|
460
460
|
created_at: number;
|
|
461
461
|
updated_at: number;
|
|
462
|
-
scenario: string;
|
|
463
462
|
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
463
|
+
scenario: string;
|
|
464
464
|
time_range?: any;
|
|
465
465
|
schedule?: string | null | undefined;
|
|
466
466
|
schedule_text?: string | null | undefined;
|
|
@@ -486,9 +486,9 @@ export declare const MongoScenarioScoreSchema: Schema<any, import("mongoose").Mo
|
|
|
486
486
|
user_id: string;
|
|
487
487
|
created_at: number;
|
|
488
488
|
updated_at: number;
|
|
489
|
-
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
490
489
|
scenario_id: string;
|
|
491
490
|
score: number;
|
|
491
|
+
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
492
492
|
key_evidence: any[];
|
|
493
493
|
text?: string | null | undefined;
|
|
494
494
|
alert?: any;
|
|
@@ -498,9 +498,9 @@ export declare const MongoScenarioScoreSchema: Schema<any, import("mongoose").Mo
|
|
|
498
498
|
user_id: string;
|
|
499
499
|
created_at: number;
|
|
500
500
|
updated_at: number;
|
|
501
|
-
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
502
501
|
scenario_id: string;
|
|
503
502
|
score: number;
|
|
503
|
+
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
504
504
|
key_evidence: any[];
|
|
505
505
|
text?: string | null | undefined;
|
|
506
506
|
alert?: any;
|
|
@@ -510,9 +510,9 @@ export declare const MongoScenarioScoreSchema: Schema<any, import("mongoose").Mo
|
|
|
510
510
|
user_id: string;
|
|
511
511
|
created_at: number;
|
|
512
512
|
updated_at: number;
|
|
513
|
-
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
514
513
|
scenario_id: string;
|
|
515
514
|
score: number;
|
|
515
|
+
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
516
516
|
key_evidence: any[];
|
|
517
517
|
text?: string | null | undefined;
|
|
518
518
|
alert?: any;
|
package/dist/types.d.ts
CHANGED
|
@@ -947,153 +947,6 @@ export declare const zodAlertSchema: z.ZodObject<{
|
|
|
947
947
|
by_whatsapp?: boolean | undefined;
|
|
948
948
|
phone_numbers?: string[] | undefined;
|
|
949
949
|
}>;
|
|
950
|
-
export declare const zodScenarioSchema: z.ZodObject<{
|
|
951
|
-
_id: z.ZodOptional<z.ZodString>;
|
|
952
|
-
title: z.ZodString;
|
|
953
|
-
scenario: z.ZodString;
|
|
954
|
-
geos: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
955
|
-
time_range: z.ZodUnion<[z.ZodObject<{
|
|
956
|
-
type: z.ZodLiteral<"relative">;
|
|
957
|
-
time: z.ZodEnum<["last_30_minutes", "last_1_hour", "last_2_hours", "last_6_hours", "last_12_hours", "last_24_hours", "last_48_hours", "last_72_hours", "last_week"]>;
|
|
958
|
-
}, "strip", z.ZodTypeAny, {
|
|
959
|
-
type: "relative";
|
|
960
|
-
time: "last_30_minutes" | "last_1_hour" | "last_2_hours" | "last_6_hours" | "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
961
|
-
}, {
|
|
962
|
-
type: "relative";
|
|
963
|
-
time: "last_30_minutes" | "last_1_hour" | "last_2_hours" | "last_6_hours" | "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
964
|
-
}>, z.ZodObject<{
|
|
965
|
-
type: z.ZodLiteral<"absolute">;
|
|
966
|
-
start: z.ZodNumber;
|
|
967
|
-
end: z.ZodNumber;
|
|
968
|
-
}, "strip", z.ZodTypeAny, {
|
|
969
|
-
type: "absolute";
|
|
970
|
-
start: number;
|
|
971
|
-
end: number;
|
|
972
|
-
}, {
|
|
973
|
-
type: "absolute";
|
|
974
|
-
start: number;
|
|
975
|
-
end: number;
|
|
976
|
-
}>]>;
|
|
977
|
-
user_id: z.ZodString;
|
|
978
|
-
additional_instructions: z.ZodOptional<z.ZodString>;
|
|
979
|
-
status: z.ZodDefault<z.ZodEnum<["active", "inactive"]>>;
|
|
980
|
-
score_type: z.ZodEnum<["ten_score", "hundred_score", "percentage_score", "four_point_scale"]>;
|
|
981
|
-
schedule: z.ZodOptional<z.ZodString>;
|
|
982
|
-
schedule_text: z.ZodOptional<z.ZodString>;
|
|
983
|
-
created_at: z.ZodOptional<z.ZodNumber>;
|
|
984
|
-
updated_at: z.ZodOptional<z.ZodNumber>;
|
|
985
|
-
active_until: z.ZodOptional<z.ZodNumber>;
|
|
986
|
-
time_zone: z.ZodOptional<z.ZodString>;
|
|
987
|
-
alert: z.ZodOptional<z.ZodObject<{
|
|
988
|
-
title: z.ZodOptional<z.ZodString>;
|
|
989
|
-
threshold: z.ZodOptional<z.ZodNumber>;
|
|
990
|
-
is_on: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
991
|
-
is_triggered: z.ZodOptional<z.ZodBoolean>;
|
|
992
|
-
triggered_at: z.ZodOptional<z.ZodNumber>;
|
|
993
|
-
is_sent: z.ZodOptional<z.ZodBoolean>;
|
|
994
|
-
message: z.ZodOptional<z.ZodString>;
|
|
995
|
-
by_email: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
996
|
-
by_whatsapp: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
997
|
-
emails: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
998
|
-
phone_numbers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
999
|
-
}, "strip", z.ZodTypeAny, {
|
|
1000
|
-
is_on: boolean;
|
|
1001
|
-
by_email: boolean;
|
|
1002
|
-
by_whatsapp: boolean;
|
|
1003
|
-
message?: string | undefined;
|
|
1004
|
-
title?: string | undefined;
|
|
1005
|
-
emails?: string[] | undefined;
|
|
1006
|
-
threshold?: number | undefined;
|
|
1007
|
-
is_triggered?: boolean | undefined;
|
|
1008
|
-
triggered_at?: number | undefined;
|
|
1009
|
-
is_sent?: boolean | undefined;
|
|
1010
|
-
phone_numbers?: string[] | undefined;
|
|
1011
|
-
}, {
|
|
1012
|
-
message?: string | undefined;
|
|
1013
|
-
title?: string | undefined;
|
|
1014
|
-
emails?: string[] | undefined;
|
|
1015
|
-
threshold?: number | undefined;
|
|
1016
|
-
is_on?: boolean | undefined;
|
|
1017
|
-
is_triggered?: boolean | undefined;
|
|
1018
|
-
triggered_at?: number | undefined;
|
|
1019
|
-
is_sent?: boolean | undefined;
|
|
1020
|
-
by_email?: boolean | undefined;
|
|
1021
|
-
by_whatsapp?: boolean | undefined;
|
|
1022
|
-
phone_numbers?: string[] | undefined;
|
|
1023
|
-
}>>;
|
|
1024
|
-
}, "strip", z.ZodTypeAny, {
|
|
1025
|
-
status: "active" | "inactive";
|
|
1026
|
-
title: string;
|
|
1027
|
-
time_range: {
|
|
1028
|
-
type: "relative";
|
|
1029
|
-
time: "last_30_minutes" | "last_1_hour" | "last_2_hours" | "last_6_hours" | "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
1030
|
-
} | {
|
|
1031
|
-
type: "absolute";
|
|
1032
|
-
start: number;
|
|
1033
|
-
end: number;
|
|
1034
|
-
};
|
|
1035
|
-
user_id: string;
|
|
1036
|
-
scenario: string;
|
|
1037
|
-
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
1038
|
-
_id?: string | undefined;
|
|
1039
|
-
geos?: string[] | undefined;
|
|
1040
|
-
created_at?: number | undefined;
|
|
1041
|
-
updated_at?: number | undefined;
|
|
1042
|
-
schedule?: string | undefined;
|
|
1043
|
-
schedule_text?: string | undefined;
|
|
1044
|
-
active_until?: number | undefined;
|
|
1045
|
-
time_zone?: string | undefined;
|
|
1046
|
-
additional_instructions?: string | undefined;
|
|
1047
|
-
alert?: {
|
|
1048
|
-
is_on: boolean;
|
|
1049
|
-
by_email: boolean;
|
|
1050
|
-
by_whatsapp: boolean;
|
|
1051
|
-
message?: string | undefined;
|
|
1052
|
-
title?: string | undefined;
|
|
1053
|
-
emails?: string[] | undefined;
|
|
1054
|
-
threshold?: number | undefined;
|
|
1055
|
-
is_triggered?: boolean | undefined;
|
|
1056
|
-
triggered_at?: number | undefined;
|
|
1057
|
-
is_sent?: boolean | undefined;
|
|
1058
|
-
phone_numbers?: string[] | undefined;
|
|
1059
|
-
} | undefined;
|
|
1060
|
-
}, {
|
|
1061
|
-
title: string;
|
|
1062
|
-
time_range: {
|
|
1063
|
-
type: "relative";
|
|
1064
|
-
time: "last_30_minutes" | "last_1_hour" | "last_2_hours" | "last_6_hours" | "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
1065
|
-
} | {
|
|
1066
|
-
type: "absolute";
|
|
1067
|
-
start: number;
|
|
1068
|
-
end: number;
|
|
1069
|
-
};
|
|
1070
|
-
user_id: string;
|
|
1071
|
-
scenario: string;
|
|
1072
|
-
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
1073
|
-
status?: "active" | "inactive" | undefined;
|
|
1074
|
-
_id?: string | undefined;
|
|
1075
|
-
geos?: string[] | undefined;
|
|
1076
|
-
created_at?: number | undefined;
|
|
1077
|
-
updated_at?: number | undefined;
|
|
1078
|
-
schedule?: string | undefined;
|
|
1079
|
-
schedule_text?: string | undefined;
|
|
1080
|
-
active_until?: number | undefined;
|
|
1081
|
-
time_zone?: string | undefined;
|
|
1082
|
-
additional_instructions?: string | undefined;
|
|
1083
|
-
alert?: {
|
|
1084
|
-
message?: string | undefined;
|
|
1085
|
-
title?: string | undefined;
|
|
1086
|
-
emails?: string[] | undefined;
|
|
1087
|
-
threshold?: number | undefined;
|
|
1088
|
-
is_on?: boolean | undefined;
|
|
1089
|
-
is_triggered?: boolean | undefined;
|
|
1090
|
-
triggered_at?: number | undefined;
|
|
1091
|
-
is_sent?: boolean | undefined;
|
|
1092
|
-
by_email?: boolean | undefined;
|
|
1093
|
-
by_whatsapp?: boolean | undefined;
|
|
1094
|
-
phone_numbers?: string[] | undefined;
|
|
1095
|
-
} | undefined;
|
|
1096
|
-
}>;
|
|
1097
950
|
export declare const zodScenarioScoreSchema: z.ZodObject<{
|
|
1098
951
|
_id: z.ZodOptional<z.ZodString>;
|
|
1099
952
|
scenario_id: z.ZodString;
|
|
@@ -1257,9 +1110,9 @@ export declare const zodScenarioScoreSchema: z.ZodObject<{
|
|
|
1257
1110
|
}, "strip", z.ZodTypeAny, {
|
|
1258
1111
|
text: string;
|
|
1259
1112
|
user_id: string;
|
|
1260
|
-
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
1261
1113
|
scenario_id: string;
|
|
1262
1114
|
score: number;
|
|
1115
|
+
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
1263
1116
|
heatmap?: {
|
|
1264
1117
|
user_id: string;
|
|
1265
1118
|
timestamp: number;
|
|
@@ -1313,9 +1166,9 @@ export declare const zodScenarioScoreSchema: z.ZodObject<{
|
|
|
1313
1166
|
}, {
|
|
1314
1167
|
text: string;
|
|
1315
1168
|
user_id: string;
|
|
1316
|
-
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
1317
1169
|
scenario_id: string;
|
|
1318
1170
|
score: number;
|
|
1171
|
+
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
1319
1172
|
heatmap?: {
|
|
1320
1173
|
user_id: string;
|
|
1321
1174
|
timestamp: number;
|
|
@@ -1367,6 +1220,540 @@ export declare const zodScenarioScoreSchema: z.ZodObject<{
|
|
|
1367
1220
|
}[] | undefined;
|
|
1368
1221
|
confidence_level?: string | undefined;
|
|
1369
1222
|
}>;
|
|
1223
|
+
export declare const zodScenarioSchema: z.ZodObject<{
|
|
1224
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
1225
|
+
title: z.ZodString;
|
|
1226
|
+
scenario: z.ZodString;
|
|
1227
|
+
geos: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1228
|
+
time_range: z.ZodUnion<[z.ZodObject<{
|
|
1229
|
+
type: z.ZodLiteral<"relative">;
|
|
1230
|
+
time: z.ZodEnum<["last_30_minutes", "last_1_hour", "last_2_hours", "last_6_hours", "last_12_hours", "last_24_hours", "last_48_hours", "last_72_hours", "last_week"]>;
|
|
1231
|
+
}, "strip", z.ZodTypeAny, {
|
|
1232
|
+
type: "relative";
|
|
1233
|
+
time: "last_30_minutes" | "last_1_hour" | "last_2_hours" | "last_6_hours" | "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
1234
|
+
}, {
|
|
1235
|
+
type: "relative";
|
|
1236
|
+
time: "last_30_minutes" | "last_1_hour" | "last_2_hours" | "last_6_hours" | "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
1237
|
+
}>, z.ZodObject<{
|
|
1238
|
+
type: z.ZodLiteral<"absolute">;
|
|
1239
|
+
start: z.ZodNumber;
|
|
1240
|
+
end: z.ZodNumber;
|
|
1241
|
+
}, "strip", z.ZodTypeAny, {
|
|
1242
|
+
type: "absolute";
|
|
1243
|
+
start: number;
|
|
1244
|
+
end: number;
|
|
1245
|
+
}, {
|
|
1246
|
+
type: "absolute";
|
|
1247
|
+
start: number;
|
|
1248
|
+
end: number;
|
|
1249
|
+
}>]>;
|
|
1250
|
+
user_id: z.ZodString;
|
|
1251
|
+
additional_instructions: z.ZodOptional<z.ZodString>;
|
|
1252
|
+
status: z.ZodDefault<z.ZodEnum<["active", "inactive"]>>;
|
|
1253
|
+
score_type: z.ZodEnum<["ten_score", "hundred_score", "percentage_score", "four_point_scale"]>;
|
|
1254
|
+
schedule: z.ZodOptional<z.ZodString>;
|
|
1255
|
+
schedule_text: z.ZodOptional<z.ZodString>;
|
|
1256
|
+
created_at: z.ZodOptional<z.ZodNumber>;
|
|
1257
|
+
updated_at: z.ZodOptional<z.ZodNumber>;
|
|
1258
|
+
active_until: z.ZodOptional<z.ZodNumber>;
|
|
1259
|
+
time_zone: z.ZodOptional<z.ZodString>;
|
|
1260
|
+
alert: z.ZodOptional<z.ZodObject<{
|
|
1261
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1262
|
+
threshold: z.ZodOptional<z.ZodNumber>;
|
|
1263
|
+
is_on: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1264
|
+
is_triggered: z.ZodOptional<z.ZodBoolean>;
|
|
1265
|
+
triggered_at: z.ZodOptional<z.ZodNumber>;
|
|
1266
|
+
is_sent: z.ZodOptional<z.ZodBoolean>;
|
|
1267
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1268
|
+
by_email: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1269
|
+
by_whatsapp: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1270
|
+
emails: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1271
|
+
phone_numbers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1272
|
+
}, "strip", z.ZodTypeAny, {
|
|
1273
|
+
is_on: boolean;
|
|
1274
|
+
by_email: boolean;
|
|
1275
|
+
by_whatsapp: boolean;
|
|
1276
|
+
message?: string | undefined;
|
|
1277
|
+
title?: string | undefined;
|
|
1278
|
+
emails?: string[] | undefined;
|
|
1279
|
+
threshold?: number | undefined;
|
|
1280
|
+
is_triggered?: boolean | undefined;
|
|
1281
|
+
triggered_at?: number | undefined;
|
|
1282
|
+
is_sent?: boolean | undefined;
|
|
1283
|
+
phone_numbers?: string[] | undefined;
|
|
1284
|
+
}, {
|
|
1285
|
+
message?: string | undefined;
|
|
1286
|
+
title?: string | undefined;
|
|
1287
|
+
emails?: string[] | undefined;
|
|
1288
|
+
threshold?: number | undefined;
|
|
1289
|
+
is_on?: boolean | undefined;
|
|
1290
|
+
is_triggered?: boolean | undefined;
|
|
1291
|
+
triggered_at?: number | undefined;
|
|
1292
|
+
is_sent?: boolean | undefined;
|
|
1293
|
+
by_email?: boolean | undefined;
|
|
1294
|
+
by_whatsapp?: boolean | undefined;
|
|
1295
|
+
phone_numbers?: string[] | undefined;
|
|
1296
|
+
}>>;
|
|
1297
|
+
scores: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1298
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
1299
|
+
scenario_id: z.ZodString;
|
|
1300
|
+
user_id: z.ZodString;
|
|
1301
|
+
score: z.ZodNumber;
|
|
1302
|
+
score_type: z.ZodEnum<["ten_score", "hundred_score", "percentage_score", "four_point_scale"]>;
|
|
1303
|
+
text: z.ZodString;
|
|
1304
|
+
heatmap: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1305
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
1306
|
+
user_id: z.ZodString;
|
|
1307
|
+
job_id: z.ZodOptional<z.ZodString>;
|
|
1308
|
+
conversation_id: z.ZodOptional<z.ZodString>;
|
|
1309
|
+
message_id: z.ZodOptional<z.ZodString>;
|
|
1310
|
+
timestamp: z.ZodNumber;
|
|
1311
|
+
location: z.ZodObject<{
|
|
1312
|
+
name: z.ZodString;
|
|
1313
|
+
type: z.ZodString;
|
|
1314
|
+
country: z.ZodString;
|
|
1315
|
+
lat: z.ZodNumber;
|
|
1316
|
+
lng: z.ZodNumber;
|
|
1317
|
+
}, "strip", z.ZodTypeAny, {
|
|
1318
|
+
type: string;
|
|
1319
|
+
name: string;
|
|
1320
|
+
country: string;
|
|
1321
|
+
lat: number;
|
|
1322
|
+
lng: number;
|
|
1323
|
+
}, {
|
|
1324
|
+
type: string;
|
|
1325
|
+
name: string;
|
|
1326
|
+
country: string;
|
|
1327
|
+
lat: number;
|
|
1328
|
+
lng: number;
|
|
1329
|
+
}>;
|
|
1330
|
+
category: z.ZodOptional<z.ZodString>;
|
|
1331
|
+
subcategory: z.ZodOptional<z.ZodString>;
|
|
1332
|
+
intensity: z.ZodOptional<z.ZodNumber>;
|
|
1333
|
+
escalation_risk: z.ZodOptional<z.ZodNumber>;
|
|
1334
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
1335
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
1336
|
+
entities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1337
|
+
sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1338
|
+
name: z.ZodString;
|
|
1339
|
+
url: z.ZodString;
|
|
1340
|
+
}, "strip", z.ZodTypeAny, {
|
|
1341
|
+
name: string;
|
|
1342
|
+
url: string;
|
|
1343
|
+
}, {
|
|
1344
|
+
name: string;
|
|
1345
|
+
url: string;
|
|
1346
|
+
}>, "many">>;
|
|
1347
|
+
created_at: z.ZodOptional<z.ZodNumber>;
|
|
1348
|
+
updated_at: z.ZodOptional<z.ZodNumber>;
|
|
1349
|
+
}, "strip", z.ZodTypeAny, {
|
|
1350
|
+
user_id: string;
|
|
1351
|
+
timestamp: number;
|
|
1352
|
+
location: {
|
|
1353
|
+
type: string;
|
|
1354
|
+
name: string;
|
|
1355
|
+
country: string;
|
|
1356
|
+
lat: number;
|
|
1357
|
+
lng: number;
|
|
1358
|
+
};
|
|
1359
|
+
_id?: string | undefined;
|
|
1360
|
+
sources?: {
|
|
1361
|
+
name: string;
|
|
1362
|
+
url: string;
|
|
1363
|
+
}[] | undefined;
|
|
1364
|
+
conversation_id?: string | undefined;
|
|
1365
|
+
job_id?: string | undefined;
|
|
1366
|
+
created_at?: number | undefined;
|
|
1367
|
+
updated_at?: number | undefined;
|
|
1368
|
+
message_id?: string | undefined;
|
|
1369
|
+
category?: string | undefined;
|
|
1370
|
+
subcategory?: string | undefined;
|
|
1371
|
+
intensity?: number | undefined;
|
|
1372
|
+
escalation_risk?: number | undefined;
|
|
1373
|
+
confidence?: number | undefined;
|
|
1374
|
+
summary?: string | undefined;
|
|
1375
|
+
entities?: string[] | undefined;
|
|
1376
|
+
}, {
|
|
1377
|
+
user_id: string;
|
|
1378
|
+
timestamp: number;
|
|
1379
|
+
location: {
|
|
1380
|
+
type: string;
|
|
1381
|
+
name: string;
|
|
1382
|
+
country: string;
|
|
1383
|
+
lat: number;
|
|
1384
|
+
lng: number;
|
|
1385
|
+
};
|
|
1386
|
+
_id?: string | undefined;
|
|
1387
|
+
sources?: {
|
|
1388
|
+
name: string;
|
|
1389
|
+
url: string;
|
|
1390
|
+
}[] | undefined;
|
|
1391
|
+
conversation_id?: string | undefined;
|
|
1392
|
+
job_id?: string | undefined;
|
|
1393
|
+
created_at?: number | undefined;
|
|
1394
|
+
updated_at?: number | undefined;
|
|
1395
|
+
message_id?: string | undefined;
|
|
1396
|
+
category?: string | undefined;
|
|
1397
|
+
subcategory?: string | undefined;
|
|
1398
|
+
intensity?: number | undefined;
|
|
1399
|
+
escalation_risk?: number | undefined;
|
|
1400
|
+
confidence?: number | undefined;
|
|
1401
|
+
summary?: string | undefined;
|
|
1402
|
+
entities?: string[] | undefined;
|
|
1403
|
+
}>, "many">>;
|
|
1404
|
+
created_at: z.ZodOptional<z.ZodNumber>;
|
|
1405
|
+
updated_at: z.ZodOptional<z.ZodNumber>;
|
|
1406
|
+
alert: z.ZodOptional<z.ZodObject<{
|
|
1407
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1408
|
+
threshold: z.ZodOptional<z.ZodNumber>;
|
|
1409
|
+
is_on: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1410
|
+
is_triggered: z.ZodOptional<z.ZodBoolean>;
|
|
1411
|
+
triggered_at: z.ZodOptional<z.ZodNumber>;
|
|
1412
|
+
is_sent: z.ZodOptional<z.ZodBoolean>;
|
|
1413
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1414
|
+
by_email: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1415
|
+
by_whatsapp: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1416
|
+
emails: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1417
|
+
phone_numbers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1418
|
+
}, "strip", z.ZodTypeAny, {
|
|
1419
|
+
is_on: boolean;
|
|
1420
|
+
by_email: boolean;
|
|
1421
|
+
by_whatsapp: boolean;
|
|
1422
|
+
message?: string | undefined;
|
|
1423
|
+
title?: string | undefined;
|
|
1424
|
+
emails?: string[] | undefined;
|
|
1425
|
+
threshold?: number | undefined;
|
|
1426
|
+
is_triggered?: boolean | undefined;
|
|
1427
|
+
triggered_at?: number | undefined;
|
|
1428
|
+
is_sent?: boolean | undefined;
|
|
1429
|
+
phone_numbers?: string[] | undefined;
|
|
1430
|
+
}, {
|
|
1431
|
+
message?: string | undefined;
|
|
1432
|
+
title?: string | undefined;
|
|
1433
|
+
emails?: string[] | undefined;
|
|
1434
|
+
threshold?: number | undefined;
|
|
1435
|
+
is_on?: boolean | undefined;
|
|
1436
|
+
is_triggered?: boolean | undefined;
|
|
1437
|
+
triggered_at?: number | undefined;
|
|
1438
|
+
is_sent?: boolean | undefined;
|
|
1439
|
+
by_email?: boolean | undefined;
|
|
1440
|
+
by_whatsapp?: boolean | undefined;
|
|
1441
|
+
phone_numbers?: string[] | undefined;
|
|
1442
|
+
}>>;
|
|
1443
|
+
key_evidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1444
|
+
evidence: z.ZodString;
|
|
1445
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1446
|
+
source_name: z.ZodOptional<z.ZodString>;
|
|
1447
|
+
}, "strip", z.ZodTypeAny, {
|
|
1448
|
+
evidence: string;
|
|
1449
|
+
url?: string | undefined;
|
|
1450
|
+
source_name?: string | undefined;
|
|
1451
|
+
}, {
|
|
1452
|
+
evidence: string;
|
|
1453
|
+
url?: string | undefined;
|
|
1454
|
+
source_name?: string | undefined;
|
|
1455
|
+
}>, "many">>;
|
|
1456
|
+
confidence_level: z.ZodOptional<z.ZodString>;
|
|
1457
|
+
}, "strip", z.ZodTypeAny, {
|
|
1458
|
+
text: string;
|
|
1459
|
+
user_id: string;
|
|
1460
|
+
scenario_id: string;
|
|
1461
|
+
score: number;
|
|
1462
|
+
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
1463
|
+
heatmap?: {
|
|
1464
|
+
user_id: string;
|
|
1465
|
+
timestamp: number;
|
|
1466
|
+
location: {
|
|
1467
|
+
type: string;
|
|
1468
|
+
name: string;
|
|
1469
|
+
country: string;
|
|
1470
|
+
lat: number;
|
|
1471
|
+
lng: number;
|
|
1472
|
+
};
|
|
1473
|
+
_id?: string | undefined;
|
|
1474
|
+
sources?: {
|
|
1475
|
+
name: string;
|
|
1476
|
+
url: string;
|
|
1477
|
+
}[] | undefined;
|
|
1478
|
+
conversation_id?: string | undefined;
|
|
1479
|
+
job_id?: string | undefined;
|
|
1480
|
+
created_at?: number | undefined;
|
|
1481
|
+
updated_at?: number | undefined;
|
|
1482
|
+
message_id?: string | undefined;
|
|
1483
|
+
category?: string | undefined;
|
|
1484
|
+
subcategory?: string | undefined;
|
|
1485
|
+
intensity?: number | undefined;
|
|
1486
|
+
escalation_risk?: number | undefined;
|
|
1487
|
+
confidence?: number | undefined;
|
|
1488
|
+
summary?: string | undefined;
|
|
1489
|
+
entities?: string[] | undefined;
|
|
1490
|
+
}[] | undefined;
|
|
1491
|
+
_id?: string | undefined;
|
|
1492
|
+
created_at?: number | undefined;
|
|
1493
|
+
updated_at?: number | undefined;
|
|
1494
|
+
alert?: {
|
|
1495
|
+
is_on: boolean;
|
|
1496
|
+
by_email: boolean;
|
|
1497
|
+
by_whatsapp: boolean;
|
|
1498
|
+
message?: string | undefined;
|
|
1499
|
+
title?: string | undefined;
|
|
1500
|
+
emails?: string[] | undefined;
|
|
1501
|
+
threshold?: number | undefined;
|
|
1502
|
+
is_triggered?: boolean | undefined;
|
|
1503
|
+
triggered_at?: number | undefined;
|
|
1504
|
+
is_sent?: boolean | undefined;
|
|
1505
|
+
phone_numbers?: string[] | undefined;
|
|
1506
|
+
} | undefined;
|
|
1507
|
+
key_evidence?: {
|
|
1508
|
+
evidence: string;
|
|
1509
|
+
url?: string | undefined;
|
|
1510
|
+
source_name?: string | undefined;
|
|
1511
|
+
}[] | undefined;
|
|
1512
|
+
confidence_level?: string | undefined;
|
|
1513
|
+
}, {
|
|
1514
|
+
text: string;
|
|
1515
|
+
user_id: string;
|
|
1516
|
+
scenario_id: string;
|
|
1517
|
+
score: number;
|
|
1518
|
+
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
1519
|
+
heatmap?: {
|
|
1520
|
+
user_id: string;
|
|
1521
|
+
timestamp: number;
|
|
1522
|
+
location: {
|
|
1523
|
+
type: string;
|
|
1524
|
+
name: string;
|
|
1525
|
+
country: string;
|
|
1526
|
+
lat: number;
|
|
1527
|
+
lng: number;
|
|
1528
|
+
};
|
|
1529
|
+
_id?: string | undefined;
|
|
1530
|
+
sources?: {
|
|
1531
|
+
name: string;
|
|
1532
|
+
url: string;
|
|
1533
|
+
}[] | undefined;
|
|
1534
|
+
conversation_id?: string | undefined;
|
|
1535
|
+
job_id?: string | undefined;
|
|
1536
|
+
created_at?: number | undefined;
|
|
1537
|
+
updated_at?: number | undefined;
|
|
1538
|
+
message_id?: string | undefined;
|
|
1539
|
+
category?: string | undefined;
|
|
1540
|
+
subcategory?: string | undefined;
|
|
1541
|
+
intensity?: number | undefined;
|
|
1542
|
+
escalation_risk?: number | undefined;
|
|
1543
|
+
confidence?: number | undefined;
|
|
1544
|
+
summary?: string | undefined;
|
|
1545
|
+
entities?: string[] | undefined;
|
|
1546
|
+
}[] | undefined;
|
|
1547
|
+
_id?: string | undefined;
|
|
1548
|
+
created_at?: number | undefined;
|
|
1549
|
+
updated_at?: number | undefined;
|
|
1550
|
+
alert?: {
|
|
1551
|
+
message?: string | undefined;
|
|
1552
|
+
title?: string | undefined;
|
|
1553
|
+
emails?: string[] | undefined;
|
|
1554
|
+
threshold?: number | undefined;
|
|
1555
|
+
is_on?: boolean | undefined;
|
|
1556
|
+
is_triggered?: boolean | undefined;
|
|
1557
|
+
triggered_at?: number | undefined;
|
|
1558
|
+
is_sent?: boolean | undefined;
|
|
1559
|
+
by_email?: boolean | undefined;
|
|
1560
|
+
by_whatsapp?: boolean | undefined;
|
|
1561
|
+
phone_numbers?: string[] | undefined;
|
|
1562
|
+
} | undefined;
|
|
1563
|
+
key_evidence?: {
|
|
1564
|
+
evidence: string;
|
|
1565
|
+
url?: string | undefined;
|
|
1566
|
+
source_name?: string | undefined;
|
|
1567
|
+
}[] | undefined;
|
|
1568
|
+
confidence_level?: string | undefined;
|
|
1569
|
+
}>, "many">>;
|
|
1570
|
+
}, "strip", z.ZodTypeAny, {
|
|
1571
|
+
status: "active" | "inactive";
|
|
1572
|
+
title: string;
|
|
1573
|
+
time_range: {
|
|
1574
|
+
type: "relative";
|
|
1575
|
+
time: "last_30_minutes" | "last_1_hour" | "last_2_hours" | "last_6_hours" | "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
1576
|
+
} | {
|
|
1577
|
+
type: "absolute";
|
|
1578
|
+
start: number;
|
|
1579
|
+
end: number;
|
|
1580
|
+
};
|
|
1581
|
+
user_id: string;
|
|
1582
|
+
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
1583
|
+
scenario: string;
|
|
1584
|
+
_id?: string | undefined;
|
|
1585
|
+
geos?: string[] | undefined;
|
|
1586
|
+
created_at?: number | undefined;
|
|
1587
|
+
updated_at?: number | undefined;
|
|
1588
|
+
schedule?: string | undefined;
|
|
1589
|
+
schedule_text?: string | undefined;
|
|
1590
|
+
active_until?: number | undefined;
|
|
1591
|
+
time_zone?: string | undefined;
|
|
1592
|
+
additional_instructions?: string | undefined;
|
|
1593
|
+
alert?: {
|
|
1594
|
+
is_on: boolean;
|
|
1595
|
+
by_email: boolean;
|
|
1596
|
+
by_whatsapp: boolean;
|
|
1597
|
+
message?: string | undefined;
|
|
1598
|
+
title?: string | undefined;
|
|
1599
|
+
emails?: string[] | undefined;
|
|
1600
|
+
threshold?: number | undefined;
|
|
1601
|
+
is_triggered?: boolean | undefined;
|
|
1602
|
+
triggered_at?: number | undefined;
|
|
1603
|
+
is_sent?: boolean | undefined;
|
|
1604
|
+
phone_numbers?: string[] | undefined;
|
|
1605
|
+
} | undefined;
|
|
1606
|
+
scores?: {
|
|
1607
|
+
text: string;
|
|
1608
|
+
user_id: string;
|
|
1609
|
+
scenario_id: string;
|
|
1610
|
+
score: number;
|
|
1611
|
+
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
1612
|
+
heatmap?: {
|
|
1613
|
+
user_id: string;
|
|
1614
|
+
timestamp: number;
|
|
1615
|
+
location: {
|
|
1616
|
+
type: string;
|
|
1617
|
+
name: string;
|
|
1618
|
+
country: string;
|
|
1619
|
+
lat: number;
|
|
1620
|
+
lng: number;
|
|
1621
|
+
};
|
|
1622
|
+
_id?: string | undefined;
|
|
1623
|
+
sources?: {
|
|
1624
|
+
name: string;
|
|
1625
|
+
url: string;
|
|
1626
|
+
}[] | undefined;
|
|
1627
|
+
conversation_id?: string | undefined;
|
|
1628
|
+
job_id?: string | undefined;
|
|
1629
|
+
created_at?: number | undefined;
|
|
1630
|
+
updated_at?: number | undefined;
|
|
1631
|
+
message_id?: string | undefined;
|
|
1632
|
+
category?: string | undefined;
|
|
1633
|
+
subcategory?: string | undefined;
|
|
1634
|
+
intensity?: number | undefined;
|
|
1635
|
+
escalation_risk?: number | undefined;
|
|
1636
|
+
confidence?: number | undefined;
|
|
1637
|
+
summary?: string | undefined;
|
|
1638
|
+
entities?: string[] | undefined;
|
|
1639
|
+
}[] | undefined;
|
|
1640
|
+
_id?: string | undefined;
|
|
1641
|
+
created_at?: number | undefined;
|
|
1642
|
+
updated_at?: number | undefined;
|
|
1643
|
+
alert?: {
|
|
1644
|
+
is_on: boolean;
|
|
1645
|
+
by_email: boolean;
|
|
1646
|
+
by_whatsapp: boolean;
|
|
1647
|
+
message?: string | undefined;
|
|
1648
|
+
title?: string | undefined;
|
|
1649
|
+
emails?: string[] | undefined;
|
|
1650
|
+
threshold?: number | undefined;
|
|
1651
|
+
is_triggered?: boolean | undefined;
|
|
1652
|
+
triggered_at?: number | undefined;
|
|
1653
|
+
is_sent?: boolean | undefined;
|
|
1654
|
+
phone_numbers?: string[] | undefined;
|
|
1655
|
+
} | undefined;
|
|
1656
|
+
key_evidence?: {
|
|
1657
|
+
evidence: string;
|
|
1658
|
+
url?: string | undefined;
|
|
1659
|
+
source_name?: string | undefined;
|
|
1660
|
+
}[] | undefined;
|
|
1661
|
+
confidence_level?: string | undefined;
|
|
1662
|
+
}[] | undefined;
|
|
1663
|
+
}, {
|
|
1664
|
+
title: string;
|
|
1665
|
+
time_range: {
|
|
1666
|
+
type: "relative";
|
|
1667
|
+
time: "last_30_minutes" | "last_1_hour" | "last_2_hours" | "last_6_hours" | "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
1668
|
+
} | {
|
|
1669
|
+
type: "absolute";
|
|
1670
|
+
start: number;
|
|
1671
|
+
end: number;
|
|
1672
|
+
};
|
|
1673
|
+
user_id: string;
|
|
1674
|
+
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
1675
|
+
scenario: string;
|
|
1676
|
+
status?: "active" | "inactive" | undefined;
|
|
1677
|
+
_id?: string | undefined;
|
|
1678
|
+
geos?: string[] | undefined;
|
|
1679
|
+
created_at?: number | undefined;
|
|
1680
|
+
updated_at?: number | undefined;
|
|
1681
|
+
schedule?: string | undefined;
|
|
1682
|
+
schedule_text?: string | undefined;
|
|
1683
|
+
active_until?: number | undefined;
|
|
1684
|
+
time_zone?: string | undefined;
|
|
1685
|
+
additional_instructions?: string | undefined;
|
|
1686
|
+
alert?: {
|
|
1687
|
+
message?: string | undefined;
|
|
1688
|
+
title?: string | undefined;
|
|
1689
|
+
emails?: string[] | undefined;
|
|
1690
|
+
threshold?: number | undefined;
|
|
1691
|
+
is_on?: boolean | undefined;
|
|
1692
|
+
is_triggered?: boolean | undefined;
|
|
1693
|
+
triggered_at?: number | undefined;
|
|
1694
|
+
is_sent?: boolean | undefined;
|
|
1695
|
+
by_email?: boolean | undefined;
|
|
1696
|
+
by_whatsapp?: boolean | undefined;
|
|
1697
|
+
phone_numbers?: string[] | undefined;
|
|
1698
|
+
} | undefined;
|
|
1699
|
+
scores?: {
|
|
1700
|
+
text: string;
|
|
1701
|
+
user_id: string;
|
|
1702
|
+
scenario_id: string;
|
|
1703
|
+
score: number;
|
|
1704
|
+
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
1705
|
+
heatmap?: {
|
|
1706
|
+
user_id: string;
|
|
1707
|
+
timestamp: number;
|
|
1708
|
+
location: {
|
|
1709
|
+
type: string;
|
|
1710
|
+
name: string;
|
|
1711
|
+
country: string;
|
|
1712
|
+
lat: number;
|
|
1713
|
+
lng: number;
|
|
1714
|
+
};
|
|
1715
|
+
_id?: string | undefined;
|
|
1716
|
+
sources?: {
|
|
1717
|
+
name: string;
|
|
1718
|
+
url: string;
|
|
1719
|
+
}[] | undefined;
|
|
1720
|
+
conversation_id?: string | undefined;
|
|
1721
|
+
job_id?: string | undefined;
|
|
1722
|
+
created_at?: number | undefined;
|
|
1723
|
+
updated_at?: number | undefined;
|
|
1724
|
+
message_id?: string | undefined;
|
|
1725
|
+
category?: string | undefined;
|
|
1726
|
+
subcategory?: string | undefined;
|
|
1727
|
+
intensity?: number | undefined;
|
|
1728
|
+
escalation_risk?: number | undefined;
|
|
1729
|
+
confidence?: number | undefined;
|
|
1730
|
+
summary?: string | undefined;
|
|
1731
|
+
entities?: string[] | undefined;
|
|
1732
|
+
}[] | undefined;
|
|
1733
|
+
_id?: string | undefined;
|
|
1734
|
+
created_at?: number | undefined;
|
|
1735
|
+
updated_at?: number | undefined;
|
|
1736
|
+
alert?: {
|
|
1737
|
+
message?: string | undefined;
|
|
1738
|
+
title?: string | undefined;
|
|
1739
|
+
emails?: string[] | undefined;
|
|
1740
|
+
threshold?: number | undefined;
|
|
1741
|
+
is_on?: boolean | undefined;
|
|
1742
|
+
is_triggered?: boolean | undefined;
|
|
1743
|
+
triggered_at?: number | undefined;
|
|
1744
|
+
is_sent?: boolean | undefined;
|
|
1745
|
+
by_email?: boolean | undefined;
|
|
1746
|
+
by_whatsapp?: boolean | undefined;
|
|
1747
|
+
phone_numbers?: string[] | undefined;
|
|
1748
|
+
} | undefined;
|
|
1749
|
+
key_evidence?: {
|
|
1750
|
+
evidence: string;
|
|
1751
|
+
url?: string | undefined;
|
|
1752
|
+
source_name?: string | undefined;
|
|
1753
|
+
}[] | undefined;
|
|
1754
|
+
confidence_level?: string | undefined;
|
|
1755
|
+
}[] | undefined;
|
|
1756
|
+
}>;
|
|
1370
1757
|
/**
|
|
1371
1758
|
* 'approved' - active and approved sources,
|
|
1372
1759
|
* 'back_to_business' - sources that were paused and now resumed,
|
package/dist/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.zodScenarioSchema = exports.zodScenarioScoreSchema = exports.zodAlertSchema = exports.scenarioScoreTypeList = exports.zodNotificationSchema = exports.notificationPriorityList = exports.zodReportSchema = exports.reportProcessStatusList = exports.zodApiKeySchema = exports.zodCronScheduleResponseSchema = exports.zodMessageSchema = exports.zodHeatmapSchema = exports.zodJobSchema = exports.zodConversationSchema = exports.zodUserSettingsSchema = exports.zodInstructionsSchema = exports.zodQuerySchema = exports.zodAbsoluteTimeRangeSchema = exports.zodRelativeTimeRangeSchema = exports.requestedContentList = exports.relativeTimeRangeList = exports.jobRunStatusList = exports.generalStatusList = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.generalStatusList = ['active', 'inactive'];
|
|
6
6
|
exports.jobRunStatusList = ['done', 'failed', 'in_progress'];
|
|
@@ -230,24 +230,6 @@ exports.zodAlertSchema = zod_1.z.object({
|
|
|
230
230
|
emails: zod_1.z.array(zod_1.z.string().email()).optional(),
|
|
231
231
|
phone_numbers: zod_1.z.array(zod_1.z.string()).optional(), // array of phone numbers to send WhatsApp alerts to when the scenario score exceeds the alert_threshold
|
|
232
232
|
});
|
|
233
|
-
exports.zodScenarioSchema = zod_1.z.object({
|
|
234
|
-
_id: zod_1.z.string().optional(),
|
|
235
|
-
title: zod_1.z.string().nonempty('Scenario title must be provided'),
|
|
236
|
-
scenario: zod_1.z.string().nonempty('Scenario must be provided'),
|
|
237
|
-
geos: zod_1.z.array(zod_1.z.string()).optional(),
|
|
238
|
-
time_range: exports.zodRelativeTimeRangeSchema.or(exports.zodAbsoluteTimeRangeSchema),
|
|
239
|
-
user_id: zod_1.z.string().nonempty('User ID must be provided'),
|
|
240
|
-
additional_instructions: zod_1.z.string().optional(),
|
|
241
|
-
status: zod_1.z.enum(exports.generalStatusList).default('active'),
|
|
242
|
-
score_type: zod_1.z.enum(exports.scenarioScoreTypeList),
|
|
243
|
-
schedule: zod_1.z.string().optional(),
|
|
244
|
-
schedule_text: zod_1.z.string().optional(),
|
|
245
|
-
created_at: zod_1.z.number().optional(),
|
|
246
|
-
updated_at: zod_1.z.number().optional(),
|
|
247
|
-
active_until: zod_1.z.number().optional(),
|
|
248
|
-
time_zone: zod_1.z.string().optional(),
|
|
249
|
-
alert: exports.zodAlertSchema.optional(), // optional alert configuration for the scenario
|
|
250
|
-
});
|
|
251
233
|
exports.zodScenarioScoreSchema = zod_1.z.object({
|
|
252
234
|
_id: zod_1.z.string().optional(),
|
|
253
235
|
scenario_id: zod_1.z.string().nonempty('Scenario ID must be provided'),
|
|
@@ -268,3 +250,22 @@ exports.zodScenarioScoreSchema = zod_1.z.object({
|
|
|
268
250
|
.optional(),
|
|
269
251
|
confidence_level: zod_1.z.string().optional(), // optional confidence level for the score (e.g., "high", "medium", "low")
|
|
270
252
|
});
|
|
253
|
+
exports.zodScenarioSchema = zod_1.z.object({
|
|
254
|
+
_id: zod_1.z.string().optional(),
|
|
255
|
+
title: zod_1.z.string().nonempty('Scenario title must be provided'),
|
|
256
|
+
scenario: zod_1.z.string().nonempty('Scenario must be provided'),
|
|
257
|
+
geos: zod_1.z.array(zod_1.z.string()).optional(),
|
|
258
|
+
time_range: exports.zodRelativeTimeRangeSchema.or(exports.zodAbsoluteTimeRangeSchema),
|
|
259
|
+
user_id: zod_1.z.string().nonempty('User ID must be provided'),
|
|
260
|
+
additional_instructions: zod_1.z.string().optional(),
|
|
261
|
+
status: zod_1.z.enum(exports.generalStatusList).default('active'),
|
|
262
|
+
score_type: zod_1.z.enum(exports.scenarioScoreTypeList),
|
|
263
|
+
schedule: zod_1.z.string().optional(),
|
|
264
|
+
schedule_text: zod_1.z.string().optional(),
|
|
265
|
+
created_at: zod_1.z.number().optional(),
|
|
266
|
+
updated_at: zod_1.z.number().optional(),
|
|
267
|
+
active_until: zod_1.z.number().optional(),
|
|
268
|
+
time_zone: zod_1.z.string().optional(),
|
|
269
|
+
alert: exports.zodAlertSchema.optional(),
|
|
270
|
+
scores: zod_1.z.array(exports.zodScenarioScoreSchema).optional(), // array of scenario scores associated with the scenario
|
|
271
|
+
});
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -276,25 +276,6 @@ export const zodAlertSchema = z.object({
|
|
|
276
276
|
phone_numbers: z.array(z.string()).optional(), // array of phone numbers to send WhatsApp alerts to when the scenario score exceeds the alert_threshold
|
|
277
277
|
});
|
|
278
278
|
|
|
279
|
-
export const zodScenarioSchema = z.object({
|
|
280
|
-
_id: z.string().optional(),
|
|
281
|
-
title: z.string().nonempty('Scenario title must be provided'), // title of the scenario
|
|
282
|
-
scenario: z.string().nonempty('Scenario must be provided'), // the actual scenario
|
|
283
|
-
geos: z.array(z.string()).optional(), // array of geo strings
|
|
284
|
-
time_range: zodRelativeTimeRangeSchema.or(zodAbsoluteTimeRangeSchema), // optional time range for the query
|
|
285
|
-
user_id: z.string().nonempty('User ID must be provided'), // user identifier
|
|
286
|
-
additional_instructions: z.string().optional(), // optional additional instructions for the scenario
|
|
287
|
-
status: z.enum(generalStatusList).default('active'), // status of the scenario
|
|
288
|
-
score_type: z.enum(scenarioScoreTypeList), // type of the scenario
|
|
289
|
-
schedule: z.string().optional(), // cron schedule for the scenario
|
|
290
|
-
schedule_text: z.string().optional(), // cron schedule in free-text format
|
|
291
|
-
created_at: z.number().optional(), // creation date
|
|
292
|
-
updated_at: z.number().optional(), // last update date
|
|
293
|
-
active_until: z.number().optional(), // optional date until which the scenario is active
|
|
294
|
-
time_zone: z.string().optional(), // optional timezone for the scenario
|
|
295
|
-
alert: zodAlertSchema.optional(), // optional alert configuration for the scenario
|
|
296
|
-
});
|
|
297
|
-
|
|
298
279
|
export const zodScenarioScoreSchema = z.object({
|
|
299
280
|
_id: z.string().optional(),
|
|
300
281
|
scenario_id: z.string().nonempty('Scenario ID must be provided'), // scenario identifier
|
|
@@ -318,6 +299,26 @@ export const zodScenarioScoreSchema = z.object({
|
|
|
318
299
|
confidence_level: z.string().optional(), // optional confidence level for the score (e.g., "high", "medium", "low")
|
|
319
300
|
});
|
|
320
301
|
|
|
302
|
+
export const zodScenarioSchema = z.object({
|
|
303
|
+
_id: z.string().optional(),
|
|
304
|
+
title: z.string().nonempty('Scenario title must be provided'), // title of the scenario
|
|
305
|
+
scenario: z.string().nonempty('Scenario must be provided'), // the actual scenario
|
|
306
|
+
geos: z.array(z.string()).optional(), // array of geo strings
|
|
307
|
+
time_range: zodRelativeTimeRangeSchema.or(zodAbsoluteTimeRangeSchema), // optional time range for the query
|
|
308
|
+
user_id: z.string().nonempty('User ID must be provided'), // user identifier
|
|
309
|
+
additional_instructions: z.string().optional(), // optional additional instructions for the scenario
|
|
310
|
+
status: z.enum(generalStatusList).default('active'), // status of the scenario
|
|
311
|
+
score_type: z.enum(scenarioScoreTypeList), // type of the scenario
|
|
312
|
+
schedule: z.string().optional(), // cron schedule for the scenario
|
|
313
|
+
schedule_text: z.string().optional(), // cron schedule in free-text format
|
|
314
|
+
created_at: z.number().optional(), // creation date
|
|
315
|
+
updated_at: z.number().optional(), // last update date
|
|
316
|
+
active_until: z.number().optional(), // optional date until which the scenario is active
|
|
317
|
+
time_zone: z.string().optional(), // optional timezone for the scenario
|
|
318
|
+
alert: zodAlertSchema.optional(), // optional alert configuration for the scenario
|
|
319
|
+
scores: z.array(zodScenarioScoreSchema).optional(), // array of scenario scores associated with the scenario
|
|
320
|
+
});
|
|
321
|
+
|
|
321
322
|
/**
|
|
322
323
|
* 'approved' - active and approved sources,
|
|
323
324
|
* 'back_to_business' - sources that were paused and now resumed,
|