asfur 1.0.42 → 1.0.44
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 +35 -21
- package/dist/index.js +3 -1
- package/dist/types.d.ts +27 -21
- package/dist/types.js +9 -8
- package/index.ts +2 -0
- package/package.json +1 -1
- package/types.ts +11 -8
package/dist/index.d.ts
CHANGED
|
@@ -400,7 +400,7 @@ export declare const MongoQuerySchema: Schema<{
|
|
|
400
400
|
sources: string[];
|
|
401
401
|
time_range: {
|
|
402
402
|
type: "relative";
|
|
403
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
403
|
+
time: "last_10_minutes" | "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";
|
|
404
404
|
} | {
|
|
405
405
|
type: "absolute";
|
|
406
406
|
start: number | Date;
|
|
@@ -416,7 +416,7 @@ export declare const MongoQuerySchema: Schema<{
|
|
|
416
416
|
sources: string[];
|
|
417
417
|
time_range: {
|
|
418
418
|
type: "relative";
|
|
419
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
419
|
+
time: "last_10_minutes" | "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";
|
|
420
420
|
} | {
|
|
421
421
|
type: "absolute";
|
|
422
422
|
start: number | Date;
|
|
@@ -432,7 +432,7 @@ export declare const MongoQuerySchema: Schema<{
|
|
|
432
432
|
sources: string[];
|
|
433
433
|
time_range: {
|
|
434
434
|
type: "relative";
|
|
435
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
435
|
+
time: "last_10_minutes" | "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";
|
|
436
436
|
} | {
|
|
437
437
|
type: "absolute";
|
|
438
438
|
start: number | Date;
|
|
@@ -448,7 +448,7 @@ export declare const MongoQuerySchema: Schema<{
|
|
|
448
448
|
sources: string[];
|
|
449
449
|
time_range: {
|
|
450
450
|
type: "relative";
|
|
451
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
451
|
+
time: "last_10_minutes" | "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";
|
|
452
452
|
} | {
|
|
453
453
|
type: "absolute";
|
|
454
454
|
start: number | Date;
|
|
@@ -468,7 +468,7 @@ export declare const MongoQuerySchema: Schema<{
|
|
|
468
468
|
sources: string[];
|
|
469
469
|
time_range: {
|
|
470
470
|
type: "relative";
|
|
471
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
471
|
+
time: "last_10_minutes" | "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";
|
|
472
472
|
} | {
|
|
473
473
|
type: "absolute";
|
|
474
474
|
start: number | Date;
|
|
@@ -484,7 +484,7 @@ export declare const MongoQuerySchema: Schema<{
|
|
|
484
484
|
sources: string[];
|
|
485
485
|
time_range: {
|
|
486
486
|
type: "relative";
|
|
487
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
487
|
+
time: "last_10_minutes" | "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";
|
|
488
488
|
} | {
|
|
489
489
|
type: "absolute";
|
|
490
490
|
start: number | Date;
|
|
@@ -500,7 +500,7 @@ export declare const MongoQuerySchema: Schema<{
|
|
|
500
500
|
sources: string[];
|
|
501
501
|
time_range: {
|
|
502
502
|
type: "relative";
|
|
503
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
503
|
+
time: "last_10_minutes" | "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";
|
|
504
504
|
} | {
|
|
505
505
|
type: "absolute";
|
|
506
506
|
start: number | Date;
|
|
@@ -521,7 +521,7 @@ export declare const MongoUserSettingsSchema: Schema<{
|
|
|
521
521
|
sources: string[];
|
|
522
522
|
time_range: {
|
|
523
523
|
type: "relative";
|
|
524
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
524
|
+
time: "last_10_minutes" | "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";
|
|
525
525
|
} | {
|
|
526
526
|
type: "absolute";
|
|
527
527
|
start: number | Date;
|
|
@@ -535,7 +535,7 @@ export declare const MongoUserSettingsSchema: Schema<{
|
|
|
535
535
|
sources: string[];
|
|
536
536
|
time_range: {
|
|
537
537
|
type: "relative";
|
|
538
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
538
|
+
time: "last_10_minutes" | "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";
|
|
539
539
|
} | {
|
|
540
540
|
type: "absolute";
|
|
541
541
|
start: number | Date;
|
|
@@ -549,7 +549,7 @@ export declare const MongoUserSettingsSchema: Schema<{
|
|
|
549
549
|
sources: string[];
|
|
550
550
|
time_range: {
|
|
551
551
|
type: "relative";
|
|
552
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
552
|
+
time: "last_10_minutes" | "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";
|
|
553
553
|
} | {
|
|
554
554
|
type: "absolute";
|
|
555
555
|
start: number | Date;
|
|
@@ -563,7 +563,7 @@ export declare const MongoUserSettingsSchema: Schema<{
|
|
|
563
563
|
sources: string[];
|
|
564
564
|
time_range: {
|
|
565
565
|
type: "relative";
|
|
566
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
566
|
+
time: "last_10_minutes" | "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";
|
|
567
567
|
} | {
|
|
568
568
|
type: "absolute";
|
|
569
569
|
start: number | Date;
|
|
@@ -581,7 +581,7 @@ export declare const MongoUserSettingsSchema: Schema<{
|
|
|
581
581
|
sources: string[];
|
|
582
582
|
time_range: {
|
|
583
583
|
type: "relative";
|
|
584
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
584
|
+
time: "last_10_minutes" | "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";
|
|
585
585
|
} | {
|
|
586
586
|
type: "absolute";
|
|
587
587
|
start: number | Date;
|
|
@@ -595,7 +595,7 @@ export declare const MongoUserSettingsSchema: Schema<{
|
|
|
595
595
|
sources: string[];
|
|
596
596
|
time_range: {
|
|
597
597
|
type: "relative";
|
|
598
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
598
|
+
time: "last_10_minutes" | "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";
|
|
599
599
|
} | {
|
|
600
600
|
type: "absolute";
|
|
601
601
|
start: number | Date;
|
|
@@ -609,7 +609,7 @@ export declare const MongoUserSettingsSchema: Schema<{
|
|
|
609
609
|
sources: string[];
|
|
610
610
|
time_range: {
|
|
611
611
|
type: "relative";
|
|
612
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
612
|
+
time: "last_10_minutes" | "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";
|
|
613
613
|
} | {
|
|
614
614
|
type: "absolute";
|
|
615
615
|
start: number | Date;
|
|
@@ -703,7 +703,7 @@ export declare const MongoJobSchema: Schema<{
|
|
|
703
703
|
sources: string[];
|
|
704
704
|
time_range: {
|
|
705
705
|
type: "relative";
|
|
706
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
706
|
+
time: "last_10_minutes" | "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";
|
|
707
707
|
} | {
|
|
708
708
|
type: "absolute";
|
|
709
709
|
start: number | Date;
|
|
@@ -719,10 +719,12 @@ export declare const MongoJobSchema: Schema<{
|
|
|
719
719
|
_id?: string | undefined;
|
|
720
720
|
created_at?: number | Date | undefined;
|
|
721
721
|
updated_at?: number | Date | undefined;
|
|
722
|
+
thread_id?: string | undefined;
|
|
722
723
|
job_description?: string | undefined;
|
|
723
724
|
schedule?: string | undefined;
|
|
724
725
|
schedule_text?: string | undefined;
|
|
725
726
|
active_until?: number | Date | undefined;
|
|
727
|
+
conversation_id?: string | undefined;
|
|
726
728
|
}, import("mongoose").Model<{
|
|
727
729
|
status: "inactive" | "active";
|
|
728
730
|
user_id: string;
|
|
@@ -731,7 +733,7 @@ export declare const MongoJobSchema: Schema<{
|
|
|
731
733
|
sources: string[];
|
|
732
734
|
time_range: {
|
|
733
735
|
type: "relative";
|
|
734
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
736
|
+
time: "last_10_minutes" | "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";
|
|
735
737
|
} | {
|
|
736
738
|
type: "absolute";
|
|
737
739
|
start: number | Date;
|
|
@@ -747,10 +749,12 @@ export declare const MongoJobSchema: Schema<{
|
|
|
747
749
|
_id?: string | undefined;
|
|
748
750
|
created_at?: number | Date | undefined;
|
|
749
751
|
updated_at?: number | Date | undefined;
|
|
752
|
+
thread_id?: string | undefined;
|
|
750
753
|
job_description?: string | undefined;
|
|
751
754
|
schedule?: string | undefined;
|
|
752
755
|
schedule_text?: string | undefined;
|
|
753
756
|
active_until?: number | Date | undefined;
|
|
757
|
+
conversation_id?: string | undefined;
|
|
754
758
|
}, any, any, any, import("mongoose").Document<unknown, any, {
|
|
755
759
|
status: "inactive" | "active";
|
|
756
760
|
user_id: string;
|
|
@@ -759,7 +763,7 @@ export declare const MongoJobSchema: Schema<{
|
|
|
759
763
|
sources: string[];
|
|
760
764
|
time_range: {
|
|
761
765
|
type: "relative";
|
|
762
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
766
|
+
time: "last_10_minutes" | "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";
|
|
763
767
|
} | {
|
|
764
768
|
type: "absolute";
|
|
765
769
|
start: number | Date;
|
|
@@ -775,10 +779,12 @@ export declare const MongoJobSchema: Schema<{
|
|
|
775
779
|
_id?: string | undefined;
|
|
776
780
|
created_at?: number | Date | undefined;
|
|
777
781
|
updated_at?: number | Date | undefined;
|
|
782
|
+
thread_id?: string | undefined;
|
|
778
783
|
job_description?: string | undefined;
|
|
779
784
|
schedule?: string | undefined;
|
|
780
785
|
schedule_text?: string | undefined;
|
|
781
786
|
active_until?: number | Date | undefined;
|
|
787
|
+
conversation_id?: string | undefined;
|
|
782
788
|
}, any> & {
|
|
783
789
|
status: "inactive" | "active";
|
|
784
790
|
user_id: string;
|
|
@@ -787,7 +793,7 @@ export declare const MongoJobSchema: Schema<{
|
|
|
787
793
|
sources: string[];
|
|
788
794
|
time_range: {
|
|
789
795
|
type: "relative";
|
|
790
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
796
|
+
time: "last_10_minutes" | "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";
|
|
791
797
|
} | {
|
|
792
798
|
type: "absolute";
|
|
793
799
|
start: number | Date;
|
|
@@ -803,10 +809,12 @@ export declare const MongoJobSchema: Schema<{
|
|
|
803
809
|
_id?: string | undefined;
|
|
804
810
|
created_at?: number | Date | undefined;
|
|
805
811
|
updated_at?: number | Date | undefined;
|
|
812
|
+
thread_id?: string | undefined;
|
|
806
813
|
job_description?: string | undefined;
|
|
807
814
|
schedule?: string | undefined;
|
|
808
815
|
schedule_text?: string | undefined;
|
|
809
816
|
active_until?: number | Date | undefined;
|
|
817
|
+
conversation_id?: string | undefined;
|
|
810
818
|
} & Required<{
|
|
811
819
|
_id: string;
|
|
812
820
|
}> & {
|
|
@@ -819,7 +827,7 @@ export declare const MongoJobSchema: Schema<{
|
|
|
819
827
|
sources: string[];
|
|
820
828
|
time_range: {
|
|
821
829
|
type: "relative";
|
|
822
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
830
|
+
time: "last_10_minutes" | "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";
|
|
823
831
|
} | {
|
|
824
832
|
type: "absolute";
|
|
825
833
|
start: number | Date;
|
|
@@ -835,10 +843,12 @@ export declare const MongoJobSchema: Schema<{
|
|
|
835
843
|
_id?: string | undefined;
|
|
836
844
|
created_at?: number | Date | undefined;
|
|
837
845
|
updated_at?: number | Date | undefined;
|
|
846
|
+
thread_id?: string | undefined;
|
|
838
847
|
job_description?: string | undefined;
|
|
839
848
|
schedule?: string | undefined;
|
|
840
849
|
schedule_text?: string | undefined;
|
|
841
850
|
active_until?: number | Date | undefined;
|
|
851
|
+
conversation_id?: string | undefined;
|
|
842
852
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
843
853
|
status: "inactive" | "active";
|
|
844
854
|
user_id: string;
|
|
@@ -847,7 +857,7 @@ export declare const MongoJobSchema: Schema<{
|
|
|
847
857
|
sources: string[];
|
|
848
858
|
time_range: {
|
|
849
859
|
type: "relative";
|
|
850
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
860
|
+
time: "last_10_minutes" | "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";
|
|
851
861
|
} | {
|
|
852
862
|
type: "absolute";
|
|
853
863
|
start: number | Date;
|
|
@@ -863,10 +873,12 @@ export declare const MongoJobSchema: Schema<{
|
|
|
863
873
|
_id?: string | undefined;
|
|
864
874
|
created_at?: number | Date | undefined;
|
|
865
875
|
updated_at?: number | Date | undefined;
|
|
876
|
+
thread_id?: string | undefined;
|
|
866
877
|
job_description?: string | undefined;
|
|
867
878
|
schedule?: string | undefined;
|
|
868
879
|
schedule_text?: string | undefined;
|
|
869
880
|
active_until?: number | Date | undefined;
|
|
881
|
+
conversation_id?: string | undefined;
|
|
870
882
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
871
883
|
status: "inactive" | "active";
|
|
872
884
|
user_id: string;
|
|
@@ -875,7 +887,7 @@ export declare const MongoJobSchema: Schema<{
|
|
|
875
887
|
sources: string[];
|
|
876
888
|
time_range: {
|
|
877
889
|
type: "relative";
|
|
878
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
890
|
+
time: "last_10_minutes" | "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";
|
|
879
891
|
} | {
|
|
880
892
|
type: "absolute";
|
|
881
893
|
start: number | Date;
|
|
@@ -891,10 +903,12 @@ export declare const MongoJobSchema: Schema<{
|
|
|
891
903
|
_id?: string | undefined;
|
|
892
904
|
created_at?: number | Date | undefined;
|
|
893
905
|
updated_at?: number | Date | undefined;
|
|
906
|
+
thread_id?: string | undefined;
|
|
894
907
|
job_description?: string | undefined;
|
|
895
908
|
schedule?: string | undefined;
|
|
896
909
|
schedule_text?: string | undefined;
|
|
897
910
|
active_until?: number | Date | undefined;
|
|
911
|
+
conversation_id?: string | undefined;
|
|
898
912
|
}> & Required<{
|
|
899
913
|
_id: string;
|
|
900
914
|
}> & {
|
package/dist/index.js
CHANGED
|
@@ -149,7 +149,9 @@ exports.MongoJobSchema = new mongoose_1.Schema({
|
|
|
149
149
|
schedule: { type: String },
|
|
150
150
|
schedule_text: { type: String },
|
|
151
151
|
active_until: { type: Number || undefined },
|
|
152
|
-
query: { type: mongoose_1.Schema.Types.Mixed, required: true },
|
|
152
|
+
query: { type: mongoose_1.Schema.Types.Mixed, required: true },
|
|
153
|
+
conversation_id: { type: String },
|
|
154
|
+
thread_id: { type: String }, // thread ID for the job
|
|
153
155
|
}, {
|
|
154
156
|
versionKey: false,
|
|
155
157
|
toJSON: { virtuals: true },
|
package/dist/types.d.ts
CHANGED
|
@@ -141,16 +141,16 @@ export declare const zodDataSchema: z.ZodObject<{
|
|
|
141
141
|
caption?: string | undefined;
|
|
142
142
|
}[] | undefined;
|
|
143
143
|
}>;
|
|
144
|
-
export declare const relativeTimeRangeList: readonly ["last_12_hours", "last_24_hours", "last_48_hours", "last_72_hours", "last_week"];
|
|
144
|
+
export declare const relativeTimeRangeList: readonly ["last_10_minutes", "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"];
|
|
145
145
|
export declare const zodRelativeTimeRangeSchema: z.ZodObject<{
|
|
146
146
|
type: z.ZodLiteral<"relative">;
|
|
147
|
-
time: z.ZodEnum<["last_12_hours", "last_24_hours", "last_48_hours", "last_72_hours", "last_week"]>;
|
|
147
|
+
time: z.ZodEnum<["last_10_minutes", "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"]>;
|
|
148
148
|
}, "strip", z.ZodTypeAny, {
|
|
149
149
|
type: "relative";
|
|
150
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
150
|
+
time: "last_10_minutes" | "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";
|
|
151
151
|
}, {
|
|
152
152
|
type: "relative";
|
|
153
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
153
|
+
time: "last_10_minutes" | "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";
|
|
154
154
|
}>;
|
|
155
155
|
export declare const zodAbsoluteTimeRangeSchema: z.ZodObject<{
|
|
156
156
|
type: z.ZodLiteral<"absolute">;
|
|
@@ -172,13 +172,13 @@ export declare const zodQuerySchema: z.ZodObject<{
|
|
|
172
172
|
sources: z.ZodArray<z.ZodString, "many">;
|
|
173
173
|
time_range: z.ZodUnion<[z.ZodObject<{
|
|
174
174
|
type: z.ZodLiteral<"relative">;
|
|
175
|
-
time: z.ZodEnum<["last_12_hours", "last_24_hours", "last_48_hours", "last_72_hours", "last_week"]>;
|
|
175
|
+
time: z.ZodEnum<["last_10_minutes", "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"]>;
|
|
176
176
|
}, "strip", z.ZodTypeAny, {
|
|
177
177
|
type: "relative";
|
|
178
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
178
|
+
time: "last_10_minutes" | "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";
|
|
179
179
|
}, {
|
|
180
180
|
type: "relative";
|
|
181
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
181
|
+
time: "last_10_minutes" | "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";
|
|
182
182
|
}>, z.ZodObject<{
|
|
183
183
|
type: z.ZodLiteral<"absolute">;
|
|
184
184
|
start: z.ZodUnion<[z.ZodDate, z.ZodNumber]>;
|
|
@@ -200,7 +200,7 @@ export declare const zodQuerySchema: z.ZodObject<{
|
|
|
200
200
|
sources: string[];
|
|
201
201
|
time_range: {
|
|
202
202
|
type: "relative";
|
|
203
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
203
|
+
time: "last_10_minutes" | "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";
|
|
204
204
|
} | {
|
|
205
205
|
type: "absolute";
|
|
206
206
|
start: number | Date;
|
|
@@ -216,7 +216,7 @@ export declare const zodQuerySchema: z.ZodObject<{
|
|
|
216
216
|
sources: string[];
|
|
217
217
|
time_range: {
|
|
218
218
|
type: "relative";
|
|
219
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
219
|
+
time: "last_10_minutes" | "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";
|
|
220
220
|
} | {
|
|
221
221
|
type: "absolute";
|
|
222
222
|
start: number | Date;
|
|
@@ -252,13 +252,13 @@ export declare const zodUserSettingsSchema: z.ZodObject<{
|
|
|
252
252
|
sources: z.ZodArray<z.ZodString, "many">;
|
|
253
253
|
time_range: z.ZodUnion<[z.ZodObject<{
|
|
254
254
|
type: z.ZodLiteral<"relative">;
|
|
255
|
-
time: z.ZodEnum<["last_12_hours", "last_24_hours", "last_48_hours", "last_72_hours", "last_week"]>;
|
|
255
|
+
time: z.ZodEnum<["last_10_minutes", "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"]>;
|
|
256
256
|
}, "strip", z.ZodTypeAny, {
|
|
257
257
|
type: "relative";
|
|
258
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
258
|
+
time: "last_10_minutes" | "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";
|
|
259
259
|
}, {
|
|
260
260
|
type: "relative";
|
|
261
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
261
|
+
time: "last_10_minutes" | "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";
|
|
262
262
|
}>, z.ZodObject<{
|
|
263
263
|
type: z.ZodLiteral<"absolute">;
|
|
264
264
|
start: z.ZodUnion<[z.ZodDate, z.ZodNumber]>;
|
|
@@ -280,7 +280,7 @@ export declare const zodUserSettingsSchema: z.ZodObject<{
|
|
|
280
280
|
sources: string[];
|
|
281
281
|
time_range: {
|
|
282
282
|
type: "relative";
|
|
283
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
283
|
+
time: "last_10_minutes" | "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";
|
|
284
284
|
} | {
|
|
285
285
|
type: "absolute";
|
|
286
286
|
start: number | Date;
|
|
@@ -294,7 +294,7 @@ export declare const zodUserSettingsSchema: z.ZodObject<{
|
|
|
294
294
|
sources: string[];
|
|
295
295
|
time_range: {
|
|
296
296
|
type: "relative";
|
|
297
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
297
|
+
time: "last_10_minutes" | "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";
|
|
298
298
|
} | {
|
|
299
299
|
type: "absolute";
|
|
300
300
|
start: number | Date;
|
|
@@ -349,13 +349,13 @@ export declare const zodJobSchema: z.ZodObject<{
|
|
|
349
349
|
sources: z.ZodArray<z.ZodString, "many">;
|
|
350
350
|
time_range: z.ZodUnion<[z.ZodObject<{
|
|
351
351
|
type: z.ZodLiteral<"relative">;
|
|
352
|
-
time: z.ZodEnum<["last_12_hours", "last_24_hours", "last_48_hours", "last_72_hours", "last_week"]>;
|
|
352
|
+
time: z.ZodEnum<["last_10_minutes", "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"]>;
|
|
353
353
|
}, "strip", z.ZodTypeAny, {
|
|
354
354
|
type: "relative";
|
|
355
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
355
|
+
time: "last_10_minutes" | "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";
|
|
356
356
|
}, {
|
|
357
357
|
type: "relative";
|
|
358
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
358
|
+
time: "last_10_minutes" | "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";
|
|
359
359
|
}>, z.ZodObject<{
|
|
360
360
|
type: z.ZodLiteral<"absolute">;
|
|
361
361
|
start: z.ZodUnion<[z.ZodDate, z.ZodNumber]>;
|
|
@@ -377,7 +377,7 @@ export declare const zodJobSchema: z.ZodObject<{
|
|
|
377
377
|
sources: string[];
|
|
378
378
|
time_range: {
|
|
379
379
|
type: "relative";
|
|
380
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
380
|
+
time: "last_10_minutes" | "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";
|
|
381
381
|
} | {
|
|
382
382
|
type: "absolute";
|
|
383
383
|
start: number | Date;
|
|
@@ -393,7 +393,7 @@ export declare const zodJobSchema: z.ZodObject<{
|
|
|
393
393
|
sources: string[];
|
|
394
394
|
time_range: {
|
|
395
395
|
type: "relative";
|
|
396
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
396
|
+
time: "last_10_minutes" | "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";
|
|
397
397
|
} | {
|
|
398
398
|
type: "absolute";
|
|
399
399
|
start: number | Date;
|
|
@@ -406,6 +406,8 @@ export declare const zodJobSchema: z.ZodObject<{
|
|
|
406
406
|
thread_id?: string | undefined;
|
|
407
407
|
}>;
|
|
408
408
|
active_until: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodNumber]>>;
|
|
409
|
+
conversation_id: z.ZodOptional<z.ZodString>;
|
|
410
|
+
thread_id: z.ZodOptional<z.ZodString>;
|
|
409
411
|
}, "strip", z.ZodTypeAny, {
|
|
410
412
|
status: "inactive" | "active";
|
|
411
413
|
user_id: string;
|
|
@@ -414,7 +416,7 @@ export declare const zodJobSchema: z.ZodObject<{
|
|
|
414
416
|
sources: string[];
|
|
415
417
|
time_range: {
|
|
416
418
|
type: "relative";
|
|
417
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
419
|
+
time: "last_10_minutes" | "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";
|
|
418
420
|
} | {
|
|
419
421
|
type: "absolute";
|
|
420
422
|
start: number | Date;
|
|
@@ -430,10 +432,12 @@ export declare const zodJobSchema: z.ZodObject<{
|
|
|
430
432
|
_id?: string | undefined;
|
|
431
433
|
created_at?: number | Date | undefined;
|
|
432
434
|
updated_at?: number | Date | undefined;
|
|
435
|
+
thread_id?: string | undefined;
|
|
433
436
|
job_description?: string | undefined;
|
|
434
437
|
schedule?: string | undefined;
|
|
435
438
|
schedule_text?: string | undefined;
|
|
436
439
|
active_until?: number | Date | undefined;
|
|
440
|
+
conversation_id?: string | undefined;
|
|
437
441
|
}, {
|
|
438
442
|
user_id: string;
|
|
439
443
|
query: {
|
|
@@ -441,7 +445,7 @@ export declare const zodJobSchema: z.ZodObject<{
|
|
|
441
445
|
sources: string[];
|
|
442
446
|
time_range: {
|
|
443
447
|
type: "relative";
|
|
444
|
-
time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
|
|
448
|
+
time: "last_10_minutes" | "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";
|
|
445
449
|
} | {
|
|
446
450
|
type: "absolute";
|
|
447
451
|
start: number | Date;
|
|
@@ -458,10 +462,12 @@ export declare const zodJobSchema: z.ZodObject<{
|
|
|
458
462
|
status?: "inactive" | "active" | undefined;
|
|
459
463
|
created_at?: number | Date | undefined;
|
|
460
464
|
updated_at?: number | Date | undefined;
|
|
465
|
+
thread_id?: string | undefined;
|
|
461
466
|
job_description?: string | undefined;
|
|
462
467
|
schedule?: string | undefined;
|
|
463
468
|
schedule_text?: string | undefined;
|
|
464
469
|
active_until?: number | Date | undefined;
|
|
470
|
+
conversation_id?: string | undefined;
|
|
465
471
|
}>;
|
|
466
472
|
export declare const zodCronScheduleResponseSchema: z.ZodObject<{
|
|
467
473
|
schedule: z.ZodOptional<z.ZodString>;
|
package/dist/types.js
CHANGED
|
@@ -66,6 +66,11 @@ exports.zodDataSchema = zod_1.z.object({
|
|
|
66
66
|
.optional(), // media attachments
|
|
67
67
|
});
|
|
68
68
|
exports.relativeTimeRangeList = [
|
|
69
|
+
'last_10_minutes',
|
|
70
|
+
'last_30_minutes',
|
|
71
|
+
'last_1_hour',
|
|
72
|
+
'last_2_hours',
|
|
73
|
+
'last_6_hours',
|
|
69
74
|
'last_12_hours',
|
|
70
75
|
'last_24_hours',
|
|
71
76
|
'last_48_hours',
|
|
@@ -74,13 +79,7 @@ exports.relativeTimeRangeList = [
|
|
|
74
79
|
];
|
|
75
80
|
exports.zodRelativeTimeRangeSchema = zod_1.z.object({
|
|
76
81
|
type: zod_1.z.literal('relative'),
|
|
77
|
-
time: zod_1.z.enum(
|
|
78
|
-
'last_12_hours',
|
|
79
|
-
'last_24_hours',
|
|
80
|
-
'last_48_hours',
|
|
81
|
-
'last_72_hours',
|
|
82
|
-
'last_week',
|
|
83
|
-
]),
|
|
82
|
+
time: zod_1.z.enum(exports.relativeTimeRangeList),
|
|
84
83
|
});
|
|
85
84
|
exports.zodAbsoluteTimeRangeSchema = zod_1.z.object({
|
|
86
85
|
type: zod_1.z.literal('absolute'),
|
|
@@ -133,7 +132,9 @@ exports.zodJobSchema = zod_1.z.object({
|
|
|
133
132
|
status: zod_1.z.enum(exports.generalStatusList).default('active'),
|
|
134
133
|
user_id: zod_1.z.string().nonempty('User ID must be provided'),
|
|
135
134
|
query: exports.zodQuerySchema,
|
|
136
|
-
active_until: zod_1.z.coerce.date().or(zod_1.z.number()).optional(),
|
|
135
|
+
active_until: zod_1.z.coerce.date().or(zod_1.z.number()).optional(),
|
|
136
|
+
conversation_id: zod_1.z.string().optional(),
|
|
137
|
+
thread_id: zod_1.z.string().optional(), // thread ID for the job
|
|
137
138
|
});
|
|
138
139
|
exports.zodCronScheduleResponseSchema = zod_1.z.object({
|
|
139
140
|
schedule: zod_1.z.string().optional(),
|
package/index.ts
CHANGED
|
@@ -169,6 +169,8 @@ export const MongoJobSchema = new Schema<JobType>(
|
|
|
169
169
|
schedule_text: { type: String }, // cron schedule in free-text format
|
|
170
170
|
active_until: { type: Number || undefined }, // optional date until which the job is active
|
|
171
171
|
query: { type: Schema.Types.Mixed, required: true }, // query associated with the job
|
|
172
|
+
conversation_id: { type: String }, // optional conversation ID for the job
|
|
173
|
+
thread_id: { type: String }, // thread ID for the job
|
|
172
174
|
},
|
|
173
175
|
{
|
|
174
176
|
versionKey: false,
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -71,6 +71,11 @@ export const zodDataSchema = z.object({
|
|
|
71
71
|
});
|
|
72
72
|
|
|
73
73
|
export const relativeTimeRangeList = [
|
|
74
|
+
'last_10_minutes',
|
|
75
|
+
'last_30_minutes',
|
|
76
|
+
'last_1_hour',
|
|
77
|
+
'last_2_hours',
|
|
78
|
+
'last_6_hours',
|
|
74
79
|
'last_12_hours',
|
|
75
80
|
'last_24_hours',
|
|
76
81
|
'last_48_hours',
|
|
@@ -80,13 +85,7 @@ export const relativeTimeRangeList = [
|
|
|
80
85
|
|
|
81
86
|
export const zodRelativeTimeRangeSchema = z.object({
|
|
82
87
|
type: z.literal('relative'),
|
|
83
|
-
time: z.enum(
|
|
84
|
-
'last_12_hours',
|
|
85
|
-
'last_24_hours',
|
|
86
|
-
'last_48_hours',
|
|
87
|
-
'last_72_hours',
|
|
88
|
-
'last_week',
|
|
89
|
-
]),
|
|
88
|
+
time: z.enum(relativeTimeRangeList),
|
|
90
89
|
});
|
|
91
90
|
|
|
92
91
|
export const zodAbsoluteTimeRangeSchema = z.object({
|
|
@@ -146,6 +145,8 @@ export const zodJobSchema = z.object({
|
|
|
146
145
|
user_id: z.string().nonempty('User ID must be provided'), // user identifier
|
|
147
146
|
query: zodQuerySchema, // query associated with the job
|
|
148
147
|
active_until: z.coerce.date().or(z.number()).optional(), // optional date until which the job is active
|
|
148
|
+
conversation_id: z.string().optional(), // optional conversation ID for the job
|
|
149
|
+
thread_id: z.string().optional(), // thread ID for the job
|
|
149
150
|
});
|
|
150
151
|
|
|
151
152
|
export const zodCronScheduleResponseSchema = z.object({
|
|
@@ -172,4 +173,6 @@ export type AddSourceToReviewType = Pick<
|
|
|
172
173
|
export type UserSettingsType = z.infer<typeof zodUserSettingsSchema>;
|
|
173
174
|
export type ConversationType = z.infer<typeof zodConversationSchema>;
|
|
174
175
|
export type JobType = z.infer<typeof zodJobSchema>;
|
|
175
|
-
export type CronScheduleResponseType = z.infer<
|
|
176
|
+
export type CronScheduleResponseType = z.infer<
|
|
177
|
+
typeof zodCronScheduleResponseSchema
|
|
178
|
+
>;
|