asfur 1.0.95 → 1.0.96
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 +245 -66
- package/dist/index.js +65 -4
- package/dist/types.d.ts +211 -178
- package/dist/types.js +57 -61
- package/index.ts +72 -3
- package/package.json +1 -1
- package/types.ts +61 -65
package/dist/index.d.ts
CHANGED
|
@@ -38,19 +38,19 @@ export declare const MongoInstructionsSchema: Schema<any, import("mongoose").Mod
|
|
|
38
38
|
virtuals: true;
|
|
39
39
|
};
|
|
40
40
|
}, {
|
|
41
|
+
user_id: string;
|
|
41
42
|
created_at: number;
|
|
42
43
|
updated_at: number;
|
|
43
|
-
user_id: string;
|
|
44
44
|
prompt?: string | null | undefined;
|
|
45
45
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
46
|
+
user_id: string;
|
|
46
47
|
created_at: number;
|
|
47
48
|
updated_at: number;
|
|
48
|
-
user_id: string;
|
|
49
49
|
prompt?: string | null | undefined;
|
|
50
50
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
51
|
+
user_id: string;
|
|
51
52
|
created_at: number;
|
|
52
53
|
updated_at: number;
|
|
53
|
-
user_id: string;
|
|
54
54
|
prompt?: string | null | undefined;
|
|
55
55
|
}> & {
|
|
56
56
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -66,34 +66,34 @@ export declare const MongoQuerySchema: Schema<any, import("mongoose").Model<any,
|
|
|
66
66
|
virtuals: true;
|
|
67
67
|
};
|
|
68
68
|
}, {
|
|
69
|
-
timestamp: number;
|
|
70
|
-
geos: string[];
|
|
71
|
-
user_id: string;
|
|
72
69
|
sources: string[];
|
|
70
|
+
geos: string[];
|
|
73
71
|
geos_ids: string[];
|
|
74
72
|
time_range: any;
|
|
73
|
+
user_id: string;
|
|
74
|
+
timestamp: number;
|
|
75
75
|
title?: string | null | undefined;
|
|
76
76
|
query?: string | null | undefined;
|
|
77
77
|
user_instructions?: string | null | undefined;
|
|
78
78
|
user_time_zone?: string | null | undefined;
|
|
79
79
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
80
|
-
timestamp: number;
|
|
81
|
-
geos: string[];
|
|
82
|
-
user_id: string;
|
|
83
80
|
sources: string[];
|
|
81
|
+
geos: string[];
|
|
84
82
|
geos_ids: string[];
|
|
85
83
|
time_range: any;
|
|
84
|
+
user_id: string;
|
|
85
|
+
timestamp: number;
|
|
86
86
|
title?: string | null | undefined;
|
|
87
87
|
query?: string | null | undefined;
|
|
88
88
|
user_instructions?: string | null | undefined;
|
|
89
89
|
user_time_zone?: string | null | undefined;
|
|
90
90
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
91
|
-
timestamp: number;
|
|
92
|
-
geos: string[];
|
|
93
|
-
user_id: string;
|
|
94
91
|
sources: string[];
|
|
92
|
+
geos: string[];
|
|
95
93
|
geos_ids: string[];
|
|
96
94
|
time_range: any;
|
|
95
|
+
user_id: string;
|
|
96
|
+
timestamp: number;
|
|
97
97
|
title?: string | null | undefined;
|
|
98
98
|
query?: string | null | undefined;
|
|
99
99
|
user_instructions?: string | null | undefined;
|
|
@@ -112,12 +112,12 @@ export declare const MongoUserSettingsSchema: Schema<any, import("mongoose").Mod
|
|
|
112
112
|
virtuals: true;
|
|
113
113
|
};
|
|
114
114
|
}, {
|
|
115
|
-
status: "
|
|
115
|
+
status: "active" | "inactive";
|
|
116
|
+
sources: string[];
|
|
116
117
|
geos: string[];
|
|
118
|
+
user_id: string;
|
|
117
119
|
created_at: NativeDate;
|
|
118
120
|
updated_at: NativeDate;
|
|
119
|
-
user_id: string;
|
|
120
|
-
sources: string[];
|
|
121
121
|
has_jobs_access: boolean;
|
|
122
122
|
active_jobs_limit: number;
|
|
123
123
|
time_range?: any;
|
|
@@ -127,12 +127,12 @@ export declare const MongoUserSettingsSchema: Schema<any, import("mongoose").Mod
|
|
|
127
127
|
email?: string | null | undefined;
|
|
128
128
|
name?: string | null | undefined;
|
|
129
129
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
130
|
-
status: "
|
|
130
|
+
status: "active" | "inactive";
|
|
131
|
+
sources: string[];
|
|
131
132
|
geos: string[];
|
|
133
|
+
user_id: string;
|
|
132
134
|
created_at: NativeDate;
|
|
133
135
|
updated_at: NativeDate;
|
|
134
|
-
user_id: string;
|
|
135
|
-
sources: string[];
|
|
136
136
|
has_jobs_access: boolean;
|
|
137
137
|
active_jobs_limit: number;
|
|
138
138
|
time_range?: any;
|
|
@@ -142,12 +142,12 @@ export declare const MongoUserSettingsSchema: Schema<any, import("mongoose").Mod
|
|
|
142
142
|
email?: string | null | undefined;
|
|
143
143
|
name?: string | null | undefined;
|
|
144
144
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
145
|
-
status: "
|
|
145
|
+
status: "active" | "inactive";
|
|
146
|
+
sources: string[];
|
|
146
147
|
geos: string[];
|
|
148
|
+
user_id: string;
|
|
147
149
|
created_at: NativeDate;
|
|
148
150
|
updated_at: NativeDate;
|
|
149
|
-
user_id: string;
|
|
150
|
-
sources: string[];
|
|
151
151
|
has_jobs_access: boolean;
|
|
152
152
|
active_jobs_limit: number;
|
|
153
153
|
time_range?: any;
|
|
@@ -170,26 +170,26 @@ export declare const MongoConversationSchema: Schema<any, import("mongoose").Mod
|
|
|
170
170
|
virtuals: true;
|
|
171
171
|
};
|
|
172
172
|
}, {
|
|
173
|
-
status: "
|
|
173
|
+
status: "active" | "inactive";
|
|
174
|
+
user_id: string;
|
|
174
175
|
created_at: NativeDate;
|
|
175
176
|
updated_at: NativeDate;
|
|
176
|
-
user_id: string;
|
|
177
177
|
is_job: boolean;
|
|
178
178
|
title?: string | null | undefined;
|
|
179
179
|
thread_id?: string | null | undefined;
|
|
180
180
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
181
|
-
status: "
|
|
181
|
+
status: "active" | "inactive";
|
|
182
|
+
user_id: string;
|
|
182
183
|
created_at: NativeDate;
|
|
183
184
|
updated_at: NativeDate;
|
|
184
|
-
user_id: string;
|
|
185
185
|
is_job: boolean;
|
|
186
186
|
title?: string | null | undefined;
|
|
187
187
|
thread_id?: string | null | undefined;
|
|
188
188
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
189
|
-
status: "
|
|
189
|
+
status: "active" | "inactive";
|
|
190
|
+
user_id: string;
|
|
190
191
|
created_at: NativeDate;
|
|
191
192
|
updated_at: NativeDate;
|
|
192
|
-
user_id: string;
|
|
193
193
|
is_job: boolean;
|
|
194
194
|
title?: string | null | undefined;
|
|
195
195
|
thread_id?: string | null | undefined;
|
|
@@ -207,12 +207,22 @@ export declare const MongoJobSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
207
207
|
virtuals: true;
|
|
208
208
|
};
|
|
209
209
|
}, {
|
|
210
|
-
status: "
|
|
210
|
+
status: "active" | "inactive";
|
|
211
|
+
query: any;
|
|
212
|
+
user_id: string;
|
|
211
213
|
created_at: number;
|
|
212
214
|
updated_at: number;
|
|
213
|
-
user_id: string;
|
|
214
|
-
query: any;
|
|
215
215
|
job_name: string;
|
|
216
|
+
addons: import("mongoose").Types.DocumentArray<{
|
|
217
|
+
name?: string | null | undefined;
|
|
218
|
+
config?: any;
|
|
219
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
220
|
+
name?: string | null | undefined;
|
|
221
|
+
config?: any;
|
|
222
|
+
}> & {
|
|
223
|
+
name?: string | null | undefined;
|
|
224
|
+
config?: any;
|
|
225
|
+
}>;
|
|
216
226
|
thread_id?: string | null | undefined;
|
|
217
227
|
job_description?: string | null | undefined;
|
|
218
228
|
schedule?: string | null | undefined;
|
|
@@ -221,12 +231,22 @@ export declare const MongoJobSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
221
231
|
conversation_id?: string | null | undefined;
|
|
222
232
|
time_zone?: string | null | undefined;
|
|
223
233
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
224
|
-
status: "
|
|
234
|
+
status: "active" | "inactive";
|
|
235
|
+
query: any;
|
|
236
|
+
user_id: string;
|
|
225
237
|
created_at: number;
|
|
226
238
|
updated_at: number;
|
|
227
|
-
user_id: string;
|
|
228
|
-
query: any;
|
|
229
239
|
job_name: string;
|
|
240
|
+
addons: import("mongoose").Types.DocumentArray<{
|
|
241
|
+
name?: string | null | undefined;
|
|
242
|
+
config?: any;
|
|
243
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
244
|
+
name?: string | null | undefined;
|
|
245
|
+
config?: any;
|
|
246
|
+
}> & {
|
|
247
|
+
name?: string | null | undefined;
|
|
248
|
+
config?: any;
|
|
249
|
+
}>;
|
|
230
250
|
thread_id?: string | null | undefined;
|
|
231
251
|
job_description?: string | null | undefined;
|
|
232
252
|
schedule?: string | null | undefined;
|
|
@@ -235,12 +255,22 @@ export declare const MongoJobSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
235
255
|
conversation_id?: string | null | undefined;
|
|
236
256
|
time_zone?: string | null | undefined;
|
|
237
257
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
238
|
-
status: "
|
|
258
|
+
status: "active" | "inactive";
|
|
259
|
+
query: any;
|
|
260
|
+
user_id: string;
|
|
239
261
|
created_at: number;
|
|
240
262
|
updated_at: number;
|
|
241
|
-
user_id: string;
|
|
242
|
-
query: any;
|
|
243
263
|
job_name: string;
|
|
264
|
+
addons: import("mongoose").Types.DocumentArray<{
|
|
265
|
+
name?: string | null | undefined;
|
|
266
|
+
config?: any;
|
|
267
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
268
|
+
name?: string | null | undefined;
|
|
269
|
+
config?: any;
|
|
270
|
+
}> & {
|
|
271
|
+
name?: string | null | undefined;
|
|
272
|
+
config?: any;
|
|
273
|
+
}>;
|
|
244
274
|
thread_id?: string | null | undefined;
|
|
245
275
|
job_description?: string | null | undefined;
|
|
246
276
|
schedule?: string | null | undefined;
|
|
@@ -262,23 +292,29 @@ export declare const MongoApiKeySchema: Schema<any, import("mongoose").Model<any
|
|
|
262
292
|
virtuals: true;
|
|
263
293
|
};
|
|
264
294
|
}, {
|
|
265
|
-
status: "
|
|
295
|
+
status: "active" | "inactive";
|
|
296
|
+
user_id: string;
|
|
266
297
|
created_at: number;
|
|
267
298
|
updated_at: number;
|
|
268
|
-
|
|
269
|
-
|
|
299
|
+
api_key?: string | null | undefined;
|
|
300
|
+
j_key?: string | null | undefined;
|
|
301
|
+
q_key?: string | null | undefined;
|
|
270
302
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
271
|
-
status: "
|
|
303
|
+
status: "active" | "inactive";
|
|
304
|
+
user_id: string;
|
|
272
305
|
created_at: number;
|
|
273
306
|
updated_at: number;
|
|
274
|
-
|
|
275
|
-
|
|
307
|
+
api_key?: string | null | undefined;
|
|
308
|
+
j_key?: string | null | undefined;
|
|
309
|
+
q_key?: string | null | undefined;
|
|
276
310
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
277
|
-
status: "
|
|
311
|
+
status: "active" | "inactive";
|
|
312
|
+
user_id: string;
|
|
278
313
|
created_at: number;
|
|
279
314
|
updated_at: number;
|
|
280
|
-
|
|
281
|
-
|
|
315
|
+
api_key?: string | null | undefined;
|
|
316
|
+
j_key?: string | null | undefined;
|
|
317
|
+
q_key?: string | null | undefined;
|
|
282
318
|
}> & {
|
|
283
319
|
_id: import("mongoose").Types.ObjectId;
|
|
284
320
|
} & {
|
|
@@ -293,10 +329,10 @@ export declare const MongoReportSchema: Schema<any, import("mongoose").Model<any
|
|
|
293
329
|
virtuals: true;
|
|
294
330
|
};
|
|
295
331
|
}, {
|
|
332
|
+
user_id: string;
|
|
296
333
|
created_at: number;
|
|
297
334
|
updated_at: number;
|
|
298
|
-
|
|
299
|
-
process_status: "pending" | "in_progress" | "completed" | "failed";
|
|
335
|
+
process_status: "failed" | "in_progress" | "pending" | "completed";
|
|
300
336
|
type?: string | null | undefined;
|
|
301
337
|
title?: string | null | undefined;
|
|
302
338
|
thread_id?: string | null | undefined;
|
|
@@ -304,10 +340,10 @@ export declare const MongoReportSchema: Schema<any, import("mongoose").Model<any
|
|
|
304
340
|
additional_instructions?: string | null | undefined;
|
|
305
341
|
report_html?: string | null | undefined;
|
|
306
342
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
343
|
+
user_id: string;
|
|
307
344
|
created_at: number;
|
|
308
345
|
updated_at: number;
|
|
309
|
-
|
|
310
|
-
process_status: "pending" | "in_progress" | "completed" | "failed";
|
|
346
|
+
process_status: "failed" | "in_progress" | "pending" | "completed";
|
|
311
347
|
type?: string | null | undefined;
|
|
312
348
|
title?: string | null | undefined;
|
|
313
349
|
thread_id?: string | null | undefined;
|
|
@@ -315,10 +351,10 @@ export declare const MongoReportSchema: Schema<any, import("mongoose").Model<any
|
|
|
315
351
|
additional_instructions?: string | null | undefined;
|
|
316
352
|
report_html?: string | null | undefined;
|
|
317
353
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
354
|
+
user_id: string;
|
|
318
355
|
created_at: number;
|
|
319
356
|
updated_at: number;
|
|
320
|
-
|
|
321
|
-
process_status: "pending" | "in_progress" | "completed" | "failed";
|
|
357
|
+
process_status: "failed" | "in_progress" | "pending" | "completed";
|
|
322
358
|
type?: string | null | undefined;
|
|
323
359
|
title?: string | null | undefined;
|
|
324
360
|
thread_id?: string | null | undefined;
|
|
@@ -340,25 +376,25 @@ export declare const MongoNotificationSchema: Schema<any, import("mongoose").Mod
|
|
|
340
376
|
};
|
|
341
377
|
}, {
|
|
342
378
|
message: string;
|
|
379
|
+
user_id: string;
|
|
343
380
|
created_at: number;
|
|
344
381
|
updated_at: number;
|
|
345
|
-
user_id: string;
|
|
346
382
|
is_read: boolean;
|
|
347
383
|
priority: "low" | "medium" | "high" | "critical";
|
|
348
384
|
redirect_url?: string | null | undefined;
|
|
349
385
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
350
386
|
message: string;
|
|
387
|
+
user_id: string;
|
|
351
388
|
created_at: number;
|
|
352
389
|
updated_at: number;
|
|
353
|
-
user_id: string;
|
|
354
390
|
is_read: boolean;
|
|
355
391
|
priority: "low" | "medium" | "high" | "critical";
|
|
356
392
|
redirect_url?: string | null | undefined;
|
|
357
393
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
358
394
|
message: string;
|
|
395
|
+
user_id: string;
|
|
359
396
|
created_at: number;
|
|
360
397
|
updated_at: number;
|
|
361
|
-
user_id: string;
|
|
362
398
|
is_read: boolean;
|
|
363
399
|
priority: "low" | "medium" | "high" | "critical";
|
|
364
400
|
redirect_url?: string | null | undefined;
|
|
@@ -376,12 +412,12 @@ export declare const MongoScenarioSchema: Schema<any, import("mongoose").Model<a
|
|
|
376
412
|
virtuals: true;
|
|
377
413
|
};
|
|
378
414
|
}, {
|
|
379
|
-
status: "
|
|
415
|
+
status: "active" | "inactive";
|
|
380
416
|
title: string;
|
|
417
|
+
query: any;
|
|
418
|
+
user_id: string;
|
|
381
419
|
created_at: number;
|
|
382
420
|
updated_at: number;
|
|
383
|
-
user_id: string;
|
|
384
|
-
query: any;
|
|
385
421
|
scenario: string;
|
|
386
422
|
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
387
423
|
schedule?: string | null | undefined;
|
|
@@ -389,12 +425,12 @@ export declare const MongoScenarioSchema: Schema<any, import("mongoose").Model<a
|
|
|
389
425
|
conversation_id?: string | null | undefined;
|
|
390
426
|
additional_instructions?: string | null | undefined;
|
|
391
427
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
392
|
-
status: "
|
|
428
|
+
status: "active" | "inactive";
|
|
393
429
|
title: string;
|
|
430
|
+
query: any;
|
|
431
|
+
user_id: string;
|
|
394
432
|
created_at: number;
|
|
395
433
|
updated_at: number;
|
|
396
|
-
user_id: string;
|
|
397
|
-
query: any;
|
|
398
434
|
scenario: string;
|
|
399
435
|
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
400
436
|
schedule?: string | null | undefined;
|
|
@@ -402,12 +438,12 @@ export declare const MongoScenarioSchema: Schema<any, import("mongoose").Model<a
|
|
|
402
438
|
conversation_id?: string | null | undefined;
|
|
403
439
|
additional_instructions?: string | null | undefined;
|
|
404
440
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
405
|
-
status: "
|
|
441
|
+
status: "active" | "inactive";
|
|
406
442
|
title: string;
|
|
443
|
+
query: any;
|
|
444
|
+
user_id: string;
|
|
407
445
|
created_at: number;
|
|
408
446
|
updated_at: number;
|
|
409
|
-
user_id: string;
|
|
410
|
-
query: any;
|
|
411
447
|
scenario: string;
|
|
412
448
|
score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
|
|
413
449
|
schedule?: string | null | undefined;
|
|
@@ -428,23 +464,23 @@ export declare const MongoScenarioScoreSchema: Schema<any, import("mongoose").Mo
|
|
|
428
464
|
virtuals: true;
|
|
429
465
|
};
|
|
430
466
|
}, {
|
|
467
|
+
user_id: string;
|
|
431
468
|
created_at: number;
|
|
432
469
|
updated_at: number;
|
|
433
|
-
user_id: string;
|
|
434
470
|
scenario_id: string;
|
|
435
471
|
score: number;
|
|
436
472
|
data?: string | null | undefined;
|
|
437
473
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
474
|
+
user_id: string;
|
|
438
475
|
created_at: number;
|
|
439
476
|
updated_at: number;
|
|
440
|
-
user_id: string;
|
|
441
477
|
scenario_id: string;
|
|
442
478
|
score: number;
|
|
443
479
|
data?: string | null | undefined;
|
|
444
480
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
481
|
+
user_id: string;
|
|
445
482
|
created_at: number;
|
|
446
483
|
updated_at: number;
|
|
447
|
-
user_id: string;
|
|
448
484
|
scenario_id: string;
|
|
449
485
|
score: number;
|
|
450
486
|
data?: string | null | undefined;
|
|
@@ -453,3 +489,146 @@ export declare const MongoScenarioScoreSchema: Schema<any, import("mongoose").Mo
|
|
|
453
489
|
} & {
|
|
454
490
|
__v: number;
|
|
455
491
|
}>;
|
|
492
|
+
export declare const MongoHeatmapSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
493
|
+
versionKey: false;
|
|
494
|
+
toJSON: {
|
|
495
|
+
virtuals: true;
|
|
496
|
+
};
|
|
497
|
+
toObject: {
|
|
498
|
+
virtuals: true;
|
|
499
|
+
};
|
|
500
|
+
}, {
|
|
501
|
+
sources: import("mongoose").Types.DocumentArray<{
|
|
502
|
+
name?: string | null | undefined;
|
|
503
|
+
url?: string | null | undefined;
|
|
504
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
505
|
+
name?: string | null | undefined;
|
|
506
|
+
url?: string | null | undefined;
|
|
507
|
+
}> & {
|
|
508
|
+
name?: string | null | undefined;
|
|
509
|
+
url?: string | null | undefined;
|
|
510
|
+
}>;
|
|
511
|
+
user_id: string;
|
|
512
|
+
timestamp: number;
|
|
513
|
+
entities: string[];
|
|
514
|
+
job_id?: string | null | undefined;
|
|
515
|
+
run_id?: string | null | undefined;
|
|
516
|
+
query_id?: string | null | undefined;
|
|
517
|
+
location?: {
|
|
518
|
+
type: string;
|
|
519
|
+
name: string;
|
|
520
|
+
country: string;
|
|
521
|
+
lat: number;
|
|
522
|
+
lng: number;
|
|
523
|
+
} | null | undefined;
|
|
524
|
+
category?: string | null | undefined;
|
|
525
|
+
subcategory?: string | null | undefined;
|
|
526
|
+
intensity?: number | null | undefined;
|
|
527
|
+
escalation_risk?: number | null | undefined;
|
|
528
|
+
confidence?: number | null | undefined;
|
|
529
|
+
summary?: string | null | undefined;
|
|
530
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
531
|
+
sources: import("mongoose").Types.DocumentArray<{
|
|
532
|
+
name?: string | null | undefined;
|
|
533
|
+
url?: string | null | undefined;
|
|
534
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
535
|
+
name?: string | null | undefined;
|
|
536
|
+
url?: string | null | undefined;
|
|
537
|
+
}> & {
|
|
538
|
+
name?: string | null | undefined;
|
|
539
|
+
url?: string | null | undefined;
|
|
540
|
+
}>;
|
|
541
|
+
user_id: string;
|
|
542
|
+
timestamp: number;
|
|
543
|
+
entities: string[];
|
|
544
|
+
job_id?: string | null | undefined;
|
|
545
|
+
run_id?: string | null | undefined;
|
|
546
|
+
query_id?: string | null | undefined;
|
|
547
|
+
location?: {
|
|
548
|
+
type: string;
|
|
549
|
+
name: string;
|
|
550
|
+
country: string;
|
|
551
|
+
lat: number;
|
|
552
|
+
lng: number;
|
|
553
|
+
} | null | undefined;
|
|
554
|
+
category?: string | null | undefined;
|
|
555
|
+
subcategory?: string | null | undefined;
|
|
556
|
+
intensity?: number | null | undefined;
|
|
557
|
+
escalation_risk?: number | null | undefined;
|
|
558
|
+
confidence?: number | null | undefined;
|
|
559
|
+
summary?: string | null | undefined;
|
|
560
|
+
}>, {}> & import("mongoose").FlatRecord<{
|
|
561
|
+
sources: import("mongoose").Types.DocumentArray<{
|
|
562
|
+
name?: string | null | undefined;
|
|
563
|
+
url?: string | null | undefined;
|
|
564
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
565
|
+
name?: string | null | undefined;
|
|
566
|
+
url?: string | null | undefined;
|
|
567
|
+
}> & {
|
|
568
|
+
name?: string | null | undefined;
|
|
569
|
+
url?: string | null | undefined;
|
|
570
|
+
}>;
|
|
571
|
+
user_id: string;
|
|
572
|
+
timestamp: number;
|
|
573
|
+
entities: string[];
|
|
574
|
+
job_id?: string | null | undefined;
|
|
575
|
+
run_id?: string | null | undefined;
|
|
576
|
+
query_id?: string | null | undefined;
|
|
577
|
+
location?: {
|
|
578
|
+
type: string;
|
|
579
|
+
name: string;
|
|
580
|
+
country: string;
|
|
581
|
+
lat: number;
|
|
582
|
+
lng: number;
|
|
583
|
+
} | null | undefined;
|
|
584
|
+
category?: string | null | undefined;
|
|
585
|
+
subcategory?: string | null | undefined;
|
|
586
|
+
intensity?: number | null | undefined;
|
|
587
|
+
escalation_risk?: number | null | undefined;
|
|
588
|
+
confidence?: number | null | undefined;
|
|
589
|
+
summary?: string | null | undefined;
|
|
590
|
+
}> & {
|
|
591
|
+
_id: import("mongoose").Types.ObjectId;
|
|
592
|
+
} & {
|
|
593
|
+
__v: number;
|
|
594
|
+
}>;
|
|
595
|
+
export declare const MongoJobRunSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
596
|
+
versionKey: false;
|
|
597
|
+
toJSON: {
|
|
598
|
+
virtuals: true;
|
|
599
|
+
};
|
|
600
|
+
toObject: {
|
|
601
|
+
virtuals: true;
|
|
602
|
+
};
|
|
603
|
+
}, {
|
|
604
|
+
status: "done" | "failed" | "in_progress";
|
|
605
|
+
user_id: string;
|
|
606
|
+
created_at: number;
|
|
607
|
+
updated_at: number;
|
|
608
|
+
job_id: string;
|
|
609
|
+
result?: string | null | undefined;
|
|
610
|
+
error?: string | null | undefined;
|
|
611
|
+
metadata?: any;
|
|
612
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
613
|
+
status: "done" | "failed" | "in_progress";
|
|
614
|
+
user_id: string;
|
|
615
|
+
created_at: number;
|
|
616
|
+
updated_at: number;
|
|
617
|
+
job_id: string;
|
|
618
|
+
result?: string | null | undefined;
|
|
619
|
+
error?: string | null | undefined;
|
|
620
|
+
metadata?: any;
|
|
621
|
+
}>, {}> & import("mongoose").FlatRecord<{
|
|
622
|
+
status: "done" | "failed" | "in_progress";
|
|
623
|
+
user_id: string;
|
|
624
|
+
created_at: number;
|
|
625
|
+
updated_at: number;
|
|
626
|
+
job_id: string;
|
|
627
|
+
result?: string | null | undefined;
|
|
628
|
+
error?: string | null | undefined;
|
|
629
|
+
metadata?: any;
|
|
630
|
+
}> & {
|
|
631
|
+
_id: import("mongoose").Types.ObjectId;
|
|
632
|
+
} & {
|
|
633
|
+
__v: number;
|
|
634
|
+
}>;
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.MongoScenarioScoreSchema = exports.MongoScenarioSchema = exports.MongoNotificationSchema = exports.MongoReportSchema = exports.MongoApiKeySchema = exports.MongoJobSchema = exports.MongoConversationSchema = exports.MongoUserSettingsSchema = exports.MongoQuerySchema = exports.MongoInstructionsSchema = void 0;
|
|
17
|
+
exports.MongoJobRunSchema = exports.MongoHeatmapSchema = exports.MongoScenarioScoreSchema = exports.MongoScenarioSchema = exports.MongoNotificationSchema = exports.MongoReportSchema = exports.MongoApiKeySchema = exports.MongoJobSchema = exports.MongoConversationSchema = exports.MongoUserSettingsSchema = exports.MongoQuerySchema = exports.MongoInstructionsSchema = void 0;
|
|
18
18
|
// Export types for consumers
|
|
19
19
|
__exportStar(require("./types"), exports);
|
|
20
20
|
const mongoose_1 = require("mongoose");
|
|
@@ -108,7 +108,13 @@ exports.MongoJobSchema = new mongoose_1.Schema({
|
|
|
108
108
|
query: { type: mongoose_1.Schema.Types.Mixed, required: true },
|
|
109
109
|
conversation_id: { type: String },
|
|
110
110
|
thread_id: { type: String },
|
|
111
|
-
time_zone: { type: String },
|
|
111
|
+
time_zone: { type: String },
|
|
112
|
+
addons: [
|
|
113
|
+
{
|
|
114
|
+
name: { type: String },
|
|
115
|
+
config: { type: mongoose_1.Schema.Types.Mixed }, // configuration for the addon
|
|
116
|
+
},
|
|
117
|
+
],
|
|
112
118
|
}, {
|
|
113
119
|
versionKey: false,
|
|
114
120
|
toJSON: { virtuals: true },
|
|
@@ -116,7 +122,9 @@ exports.MongoJobSchema = new mongoose_1.Schema({
|
|
|
116
122
|
});
|
|
117
123
|
exports.MongoApiKeySchema = new mongoose_1.Schema({
|
|
118
124
|
user_id: { type: String, required: true },
|
|
119
|
-
api_key: { type: String
|
|
125
|
+
api_key: { type: String },
|
|
126
|
+
j_key: { type: String },
|
|
127
|
+
q_key: { type: String },
|
|
120
128
|
created_at: { type: Number, default: Date.now },
|
|
121
129
|
updated_at: { type: Number, default: Date.now },
|
|
122
130
|
status: {
|
|
@@ -172,7 +180,11 @@ exports.MongoScenarioSchema = new mongoose_1.Schema({
|
|
|
172
180
|
enum: types_1.generalStatusList,
|
|
173
181
|
default: 'active',
|
|
174
182
|
},
|
|
175
|
-
score_type: {
|
|
183
|
+
score_type: {
|
|
184
|
+
type: String,
|
|
185
|
+
enum: types_1.scenarioScoreTypeList,
|
|
186
|
+
default: 'ten_score',
|
|
187
|
+
},
|
|
176
188
|
schedule: { type: String },
|
|
177
189
|
schedule_text: { type: String },
|
|
178
190
|
query: { type: mongoose_1.Schema.Types.Mixed, required: true },
|
|
@@ -196,3 +208,52 @@ exports.MongoScenarioScoreSchema = new mongoose_1.Schema({
|
|
|
196
208
|
toJSON: { virtuals: true },
|
|
197
209
|
toObject: { virtuals: true },
|
|
198
210
|
});
|
|
211
|
+
exports.MongoHeatmapSchema = new mongoose_1.Schema({
|
|
212
|
+
user_id: { type: String, required: true },
|
|
213
|
+
timestamp: { type: Number, required: true },
|
|
214
|
+
location: {
|
|
215
|
+
name: { type: String, required: true },
|
|
216
|
+
type: { type: String, required: true },
|
|
217
|
+
country: { type: String, required: true },
|
|
218
|
+
lat: { type: Number, required: true },
|
|
219
|
+
lng: { type: Number, required: true }, // longitude
|
|
220
|
+
},
|
|
221
|
+
category: { type: String },
|
|
222
|
+
subcategory: { type: String },
|
|
223
|
+
intensity: { type: Number },
|
|
224
|
+
escalation_risk: { type: Number },
|
|
225
|
+
confidence: { type: Number },
|
|
226
|
+
summary: { type: String },
|
|
227
|
+
entities: { type: [String] },
|
|
228
|
+
sources: [
|
|
229
|
+
{
|
|
230
|
+
name: { type: String },
|
|
231
|
+
url: { type: String }, // e.g., "https://t.me/royanews1/116098"
|
|
232
|
+
},
|
|
233
|
+
],
|
|
234
|
+
job_id: { type: String },
|
|
235
|
+
run_id: { type: String },
|
|
236
|
+
query_id: { type: String }, // optional query ID associated with the heatmap
|
|
237
|
+
}, {
|
|
238
|
+
versionKey: false,
|
|
239
|
+
toJSON: { virtuals: true },
|
|
240
|
+
toObject: { virtuals: true },
|
|
241
|
+
});
|
|
242
|
+
exports.MongoJobRunSchema = new mongoose_1.Schema({
|
|
243
|
+
job_id: { type: String, required: true },
|
|
244
|
+
user_id: { type: String, required: true },
|
|
245
|
+
status: {
|
|
246
|
+
type: String,
|
|
247
|
+
enum: types_1.jobRunStatusList,
|
|
248
|
+
default: 'done',
|
|
249
|
+
},
|
|
250
|
+
created_at: { type: Number, default: Date.now },
|
|
251
|
+
updated_at: { type: Number, default: Date.now },
|
|
252
|
+
result: { type: String },
|
|
253
|
+
error: { type: String },
|
|
254
|
+
metadata: { type: mongoose_1.Schema.Types.Mixed }, // flexible metadata for the job run
|
|
255
|
+
}, {
|
|
256
|
+
versionKey: false,
|
|
257
|
+
toJSON: { virtuals: true },
|
|
258
|
+
toObject: { virtuals: true },
|
|
259
|
+
});
|