asfur 1.0.110 → 1.0.112
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 +3 -3
- package/dist/index.js +1 -1
- package/dist/types.d.ts +36 -3
- package/dist/types.js +8 -1
- package/index.ts +1 -1
- package/package.json +1 -1
- package/types.ts +10 -1
package/dist/index.d.ts
CHANGED
|
@@ -489,7 +489,7 @@ export declare const MongoScenarioScoreSchema: Schema<any, import("mongoose").Mo
|
|
|
489
489
|
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
490
490
|
scenario_id: string;
|
|
491
491
|
score: number;
|
|
492
|
-
key_evidence:
|
|
492
|
+
key_evidence: any[];
|
|
493
493
|
text?: string | null | undefined;
|
|
494
494
|
alert?: any;
|
|
495
495
|
confidence_level?: string | null | undefined;
|
|
@@ -501,7 +501,7 @@ export declare const MongoScenarioScoreSchema: Schema<any, import("mongoose").Mo
|
|
|
501
501
|
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
502
502
|
scenario_id: string;
|
|
503
503
|
score: number;
|
|
504
|
-
key_evidence:
|
|
504
|
+
key_evidence: any[];
|
|
505
505
|
text?: string | null | undefined;
|
|
506
506
|
alert?: any;
|
|
507
507
|
confidence_level?: string | null | undefined;
|
|
@@ -513,7 +513,7 @@ export declare const MongoScenarioScoreSchema: Schema<any, import("mongoose").Mo
|
|
|
513
513
|
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
514
514
|
scenario_id: string;
|
|
515
515
|
score: number;
|
|
516
|
-
key_evidence:
|
|
516
|
+
key_evidence: any[];
|
|
517
517
|
text?: string | null | undefined;
|
|
518
518
|
alert?: any;
|
|
519
519
|
confidence_level?: string | null | undefined;
|
package/dist/index.js
CHANGED
|
@@ -216,7 +216,7 @@ exports.MongoScenarioScoreSchema = new mongoose_1.Schema({
|
|
|
216
216
|
alert: { type: mongoose_1.Schema.Types.Mixed },
|
|
217
217
|
created_at: { type: Number, default: Date.now },
|
|
218
218
|
updated_at: { type: Number, default: Date.now },
|
|
219
|
-
key_evidence: { type: [
|
|
219
|
+
key_evidence: { type: [mongoose_1.Schema.Types.Mixed] },
|
|
220
220
|
confidence_level: { type: String }, // optional confidence level for the score (e.g., "high", "medium", "low")
|
|
221
221
|
}, {
|
|
222
222
|
versionKey: false,
|
package/dist/types.d.ts
CHANGED
|
@@ -913,6 +913,7 @@ export declare const scenarioScoreTypeList: readonly ["ten_score", "hundred_scor
|
|
|
913
913
|
export declare const zodAlertSchema: z.ZodObject<{
|
|
914
914
|
title: z.ZodOptional<z.ZodString>;
|
|
915
915
|
threshold: z.ZodOptional<z.ZodNumber>;
|
|
916
|
+
is_on: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
916
917
|
is_triggered: z.ZodOptional<z.ZodBoolean>;
|
|
917
918
|
triggered_at: z.ZodOptional<z.ZodNumber>;
|
|
918
919
|
is_sent: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -922,6 +923,7 @@ export declare const zodAlertSchema: z.ZodObject<{
|
|
|
922
923
|
emails: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
923
924
|
phone_numbers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
924
925
|
}, "strip", z.ZodTypeAny, {
|
|
926
|
+
is_on: boolean;
|
|
925
927
|
by_email: boolean;
|
|
926
928
|
by_whatsapp: boolean;
|
|
927
929
|
message?: string | undefined;
|
|
@@ -937,6 +939,7 @@ export declare const zodAlertSchema: z.ZodObject<{
|
|
|
937
939
|
title?: string | undefined;
|
|
938
940
|
emails?: string[] | undefined;
|
|
939
941
|
threshold?: number | undefined;
|
|
942
|
+
is_on?: boolean | undefined;
|
|
940
943
|
is_triggered?: boolean | undefined;
|
|
941
944
|
triggered_at?: number | undefined;
|
|
942
945
|
is_sent?: boolean | undefined;
|
|
@@ -984,6 +987,7 @@ export declare const zodScenarioSchema: z.ZodObject<{
|
|
|
984
987
|
alert: z.ZodOptional<z.ZodObject<{
|
|
985
988
|
title: z.ZodOptional<z.ZodString>;
|
|
986
989
|
threshold: z.ZodOptional<z.ZodNumber>;
|
|
990
|
+
is_on: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
987
991
|
is_triggered: z.ZodOptional<z.ZodBoolean>;
|
|
988
992
|
triggered_at: z.ZodOptional<z.ZodNumber>;
|
|
989
993
|
is_sent: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -993,6 +997,7 @@ export declare const zodScenarioSchema: z.ZodObject<{
|
|
|
993
997
|
emails: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
994
998
|
phone_numbers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
995
999
|
}, "strip", z.ZodTypeAny, {
|
|
1000
|
+
is_on: boolean;
|
|
996
1001
|
by_email: boolean;
|
|
997
1002
|
by_whatsapp: boolean;
|
|
998
1003
|
message?: string | undefined;
|
|
@@ -1008,6 +1013,7 @@ export declare const zodScenarioSchema: z.ZodObject<{
|
|
|
1008
1013
|
title?: string | undefined;
|
|
1009
1014
|
emails?: string[] | undefined;
|
|
1010
1015
|
threshold?: number | undefined;
|
|
1016
|
+
is_on?: boolean | undefined;
|
|
1011
1017
|
is_triggered?: boolean | undefined;
|
|
1012
1018
|
triggered_at?: number | undefined;
|
|
1013
1019
|
is_sent?: boolean | undefined;
|
|
@@ -1039,6 +1045,7 @@ export declare const zodScenarioSchema: z.ZodObject<{
|
|
|
1039
1045
|
time_zone?: string | undefined;
|
|
1040
1046
|
additional_instructions?: string | undefined;
|
|
1041
1047
|
alert?: {
|
|
1048
|
+
is_on: boolean;
|
|
1042
1049
|
by_email: boolean;
|
|
1043
1050
|
by_whatsapp: boolean;
|
|
1044
1051
|
message?: string | undefined;
|
|
@@ -1078,6 +1085,7 @@ export declare const zodScenarioSchema: z.ZodObject<{
|
|
|
1078
1085
|
title?: string | undefined;
|
|
1079
1086
|
emails?: string[] | undefined;
|
|
1080
1087
|
threshold?: number | undefined;
|
|
1088
|
+
is_on?: boolean | undefined;
|
|
1081
1089
|
is_triggered?: boolean | undefined;
|
|
1082
1090
|
triggered_at?: number | undefined;
|
|
1083
1091
|
is_sent?: boolean | undefined;
|
|
@@ -1198,6 +1206,7 @@ export declare const zodScenarioScoreSchema: z.ZodObject<{
|
|
|
1198
1206
|
alert: z.ZodOptional<z.ZodObject<{
|
|
1199
1207
|
title: z.ZodOptional<z.ZodString>;
|
|
1200
1208
|
threshold: z.ZodOptional<z.ZodNumber>;
|
|
1209
|
+
is_on: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1201
1210
|
is_triggered: z.ZodOptional<z.ZodBoolean>;
|
|
1202
1211
|
triggered_at: z.ZodOptional<z.ZodNumber>;
|
|
1203
1212
|
is_sent: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1207,6 +1216,7 @@ export declare const zodScenarioScoreSchema: z.ZodObject<{
|
|
|
1207
1216
|
emails: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1208
1217
|
phone_numbers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1209
1218
|
}, "strip", z.ZodTypeAny, {
|
|
1219
|
+
is_on: boolean;
|
|
1210
1220
|
by_email: boolean;
|
|
1211
1221
|
by_whatsapp: boolean;
|
|
1212
1222
|
message?: string | undefined;
|
|
@@ -1222,6 +1232,7 @@ export declare const zodScenarioScoreSchema: z.ZodObject<{
|
|
|
1222
1232
|
title?: string | undefined;
|
|
1223
1233
|
emails?: string[] | undefined;
|
|
1224
1234
|
threshold?: number | undefined;
|
|
1235
|
+
is_on?: boolean | undefined;
|
|
1225
1236
|
is_triggered?: boolean | undefined;
|
|
1226
1237
|
triggered_at?: number | undefined;
|
|
1227
1238
|
is_sent?: boolean | undefined;
|
|
@@ -1229,7 +1240,19 @@ export declare const zodScenarioScoreSchema: z.ZodObject<{
|
|
|
1229
1240
|
by_whatsapp?: boolean | undefined;
|
|
1230
1241
|
phone_numbers?: string[] | undefined;
|
|
1231
1242
|
}>>;
|
|
1232
|
-
key_evidence: z.ZodOptional<z.ZodArray<z.
|
|
1243
|
+
key_evidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1244
|
+
evidence: z.ZodString;
|
|
1245
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1246
|
+
source_name: z.ZodOptional<z.ZodString>;
|
|
1247
|
+
}, "strip", z.ZodTypeAny, {
|
|
1248
|
+
evidence: string;
|
|
1249
|
+
url?: string | undefined;
|
|
1250
|
+
source_name?: string | undefined;
|
|
1251
|
+
}, {
|
|
1252
|
+
evidence: string;
|
|
1253
|
+
url?: string | undefined;
|
|
1254
|
+
source_name?: string | undefined;
|
|
1255
|
+
}>, "many">>;
|
|
1233
1256
|
confidence_level: z.ZodOptional<z.ZodString>;
|
|
1234
1257
|
}, "strip", z.ZodTypeAny, {
|
|
1235
1258
|
text: string;
|
|
@@ -1269,6 +1292,7 @@ export declare const zodScenarioScoreSchema: z.ZodObject<{
|
|
|
1269
1292
|
created_at?: number | undefined;
|
|
1270
1293
|
updated_at?: number | undefined;
|
|
1271
1294
|
alert?: {
|
|
1295
|
+
is_on: boolean;
|
|
1272
1296
|
by_email: boolean;
|
|
1273
1297
|
by_whatsapp: boolean;
|
|
1274
1298
|
message?: string | undefined;
|
|
@@ -1280,7 +1304,11 @@ export declare const zodScenarioScoreSchema: z.ZodObject<{
|
|
|
1280
1304
|
is_sent?: boolean | undefined;
|
|
1281
1305
|
phone_numbers?: string[] | undefined;
|
|
1282
1306
|
} | undefined;
|
|
1283
|
-
key_evidence?:
|
|
1307
|
+
key_evidence?: {
|
|
1308
|
+
evidence: string;
|
|
1309
|
+
url?: string | undefined;
|
|
1310
|
+
source_name?: string | undefined;
|
|
1311
|
+
}[] | undefined;
|
|
1284
1312
|
confidence_level?: string | undefined;
|
|
1285
1313
|
}, {
|
|
1286
1314
|
text: string;
|
|
@@ -1324,6 +1352,7 @@ export declare const zodScenarioScoreSchema: z.ZodObject<{
|
|
|
1324
1352
|
title?: string | undefined;
|
|
1325
1353
|
emails?: string[] | undefined;
|
|
1326
1354
|
threshold?: number | undefined;
|
|
1355
|
+
is_on?: boolean | undefined;
|
|
1327
1356
|
is_triggered?: boolean | undefined;
|
|
1328
1357
|
triggered_at?: number | undefined;
|
|
1329
1358
|
is_sent?: boolean | undefined;
|
|
@@ -1331,7 +1360,11 @@ export declare const zodScenarioScoreSchema: z.ZodObject<{
|
|
|
1331
1360
|
by_whatsapp?: boolean | undefined;
|
|
1332
1361
|
phone_numbers?: string[] | undefined;
|
|
1333
1362
|
} | undefined;
|
|
1334
|
-
key_evidence?:
|
|
1363
|
+
key_evidence?: {
|
|
1364
|
+
evidence: string;
|
|
1365
|
+
url?: string | undefined;
|
|
1366
|
+
source_name?: string | undefined;
|
|
1367
|
+
}[] | undefined;
|
|
1335
1368
|
confidence_level?: string | undefined;
|
|
1336
1369
|
}>;
|
|
1337
1370
|
/**
|
package/dist/types.js
CHANGED
|
@@ -220,6 +220,7 @@ exports.scenarioScoreTypeList = [
|
|
|
220
220
|
exports.zodAlertSchema = zod_1.z.object({
|
|
221
221
|
title: zod_1.z.string().optional(),
|
|
222
222
|
threshold: zod_1.z.number().optional(),
|
|
223
|
+
is_on: zod_1.z.boolean().optional().default(false),
|
|
223
224
|
is_triggered: zod_1.z.boolean().optional(),
|
|
224
225
|
triggered_at: zod_1.z.number().optional(),
|
|
225
226
|
is_sent: zod_1.z.boolean().optional(),
|
|
@@ -258,6 +259,12 @@ exports.zodScenarioScoreSchema = zod_1.z.object({
|
|
|
258
259
|
created_at: zod_1.z.number().optional(),
|
|
259
260
|
updated_at: zod_1.z.number().optional(),
|
|
260
261
|
alert: exports.zodAlertSchema.optional(),
|
|
261
|
-
key_evidence: zod_1.z
|
|
262
|
+
key_evidence: zod_1.z
|
|
263
|
+
.array(zod_1.z.object({
|
|
264
|
+
evidence: zod_1.z.string(),
|
|
265
|
+
url: zod_1.z.string().url().optional(),
|
|
266
|
+
source_name: zod_1.z.string().optional(), // optional name of the source for the evidence
|
|
267
|
+
}))
|
|
268
|
+
.optional(),
|
|
262
269
|
confidence_level: zod_1.z.string().optional(), // optional confidence level for the score (e.g., "high", "medium", "low")
|
|
263
270
|
});
|
package/index.ts
CHANGED
|
@@ -243,7 +243,7 @@ export const MongoScenarioScoreSchema = new Schema(
|
|
|
243
243
|
alert: { type: Schema.Types.Mixed }, // optional alert configuration for the scenario score
|
|
244
244
|
created_at: { type: Number, default: Date.now }, // creation date
|
|
245
245
|
updated_at: { type: Number, default: Date.now }, // last update date
|
|
246
|
-
key_evidence: { type: [
|
|
246
|
+
key_evidence: { type: [Schema.Types.Mixed] }, // array of key evidence supporting the score
|
|
247
247
|
confidence_level: { type: String }, // optional confidence level for the score (e.g., "high", "medium", "low")
|
|
248
248
|
},
|
|
249
249
|
{
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -265,6 +265,7 @@ export const scenarioScoreTypeList = [
|
|
|
265
265
|
export const zodAlertSchema = z.object({
|
|
266
266
|
title: z.string().optional(), // optional title for the alert when the scenario score exceeds the alert_threshold
|
|
267
267
|
threshold: z.number().optional(), // threshold for the alert
|
|
268
|
+
is_on: z.boolean().optional().default(false), // true if the alert is enabled
|
|
268
269
|
is_triggered: z.boolean().optional(), // true if the alert has been triggered
|
|
269
270
|
triggered_at: z.number().optional(), // date when the alert was triggered
|
|
270
271
|
is_sent: z.boolean().optional(), // true if the alert has been sent to the user
|
|
@@ -305,7 +306,15 @@ export const zodScenarioScoreSchema = z.object({
|
|
|
305
306
|
created_at: z.number().optional(), // creation date
|
|
306
307
|
updated_at: z.number().optional(), // last update date
|
|
307
308
|
alert: zodAlertSchema.optional(), // optional alert configuration for the scenario score
|
|
308
|
-
key_evidence: z
|
|
309
|
+
key_evidence: z
|
|
310
|
+
.array(
|
|
311
|
+
z.object({
|
|
312
|
+
evidence: z.string(), // description of the evidence
|
|
313
|
+
url: z.string().url().optional(), // optional URL for the evidence
|
|
314
|
+
source_name: z.string().optional(), // optional name of the source for the evidence
|
|
315
|
+
}),
|
|
316
|
+
)
|
|
317
|
+
.optional(), // array of key evidence supporting the score
|
|
309
318
|
confidence_level: z.string().optional(), // optional confidence level for the score (e.g., "high", "medium", "low")
|
|
310
319
|
});
|
|
311
320
|
|