asfur 1.0.41 → 1.0.43
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 +21 -0
- package/dist/index.js +5 -2
- package/dist/types.d.ts +9 -0
- package/dist/types.js +5 -2
- package/index.ts +3 -0
- package/package.json +1 -1
- package/types.ts +3 -0
package/dist/index.d.ts
CHANGED
|
@@ -626,6 +626,7 @@ export declare const MongoUserSettingsSchema: Schema<{
|
|
|
626
626
|
export declare const MongoConversationSchema: Schema<{
|
|
627
627
|
status: "inactive" | "active";
|
|
628
628
|
user_id: string;
|
|
629
|
+
is_job: boolean;
|
|
629
630
|
_id?: string | undefined;
|
|
630
631
|
title?: string | undefined;
|
|
631
632
|
created_at?: number | Date | undefined;
|
|
@@ -634,6 +635,7 @@ export declare const MongoConversationSchema: Schema<{
|
|
|
634
635
|
}, import("mongoose").Model<{
|
|
635
636
|
status: "inactive" | "active";
|
|
636
637
|
user_id: string;
|
|
638
|
+
is_job: boolean;
|
|
637
639
|
_id?: string | undefined;
|
|
638
640
|
title?: string | undefined;
|
|
639
641
|
created_at?: number | Date | undefined;
|
|
@@ -642,6 +644,7 @@ export declare const MongoConversationSchema: Schema<{
|
|
|
642
644
|
}, any, any, any, import("mongoose").Document<unknown, any, {
|
|
643
645
|
status: "inactive" | "active";
|
|
644
646
|
user_id: string;
|
|
647
|
+
is_job: boolean;
|
|
645
648
|
_id?: string | undefined;
|
|
646
649
|
title?: string | undefined;
|
|
647
650
|
created_at?: number | Date | undefined;
|
|
@@ -650,6 +653,7 @@ export declare const MongoConversationSchema: Schema<{
|
|
|
650
653
|
}, any> & {
|
|
651
654
|
status: "inactive" | "active";
|
|
652
655
|
user_id: string;
|
|
656
|
+
is_job: boolean;
|
|
653
657
|
_id?: string | undefined;
|
|
654
658
|
title?: string | undefined;
|
|
655
659
|
created_at?: number | Date | undefined;
|
|
@@ -662,6 +666,7 @@ export declare const MongoConversationSchema: Schema<{
|
|
|
662
666
|
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
|
|
663
667
|
status: "inactive" | "active";
|
|
664
668
|
user_id: string;
|
|
669
|
+
is_job: boolean;
|
|
665
670
|
_id?: string | undefined;
|
|
666
671
|
title?: string | undefined;
|
|
667
672
|
created_at?: number | Date | undefined;
|
|
@@ -670,6 +675,7 @@ export declare const MongoConversationSchema: Schema<{
|
|
|
670
675
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
671
676
|
status: "inactive" | "active";
|
|
672
677
|
user_id: string;
|
|
678
|
+
is_job: boolean;
|
|
673
679
|
_id?: string | undefined;
|
|
674
680
|
title?: string | undefined;
|
|
675
681
|
created_at?: number | Date | undefined;
|
|
@@ -678,6 +684,7 @@ export declare const MongoConversationSchema: Schema<{
|
|
|
678
684
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
679
685
|
status: "inactive" | "active";
|
|
680
686
|
user_id: string;
|
|
687
|
+
is_job: boolean;
|
|
681
688
|
_id?: string | undefined;
|
|
682
689
|
title?: string | undefined;
|
|
683
690
|
created_at?: number | Date | undefined;
|
|
@@ -712,10 +719,12 @@ export declare const MongoJobSchema: Schema<{
|
|
|
712
719
|
_id?: string | undefined;
|
|
713
720
|
created_at?: number | Date | undefined;
|
|
714
721
|
updated_at?: number | Date | undefined;
|
|
722
|
+
thread_id?: string | undefined;
|
|
715
723
|
job_description?: string | undefined;
|
|
716
724
|
schedule?: string | undefined;
|
|
717
725
|
schedule_text?: string | undefined;
|
|
718
726
|
active_until?: number | Date | undefined;
|
|
727
|
+
conversation_id?: string | undefined;
|
|
719
728
|
}, import("mongoose").Model<{
|
|
720
729
|
status: "inactive" | "active";
|
|
721
730
|
user_id: string;
|
|
@@ -740,10 +749,12 @@ export declare const MongoJobSchema: Schema<{
|
|
|
740
749
|
_id?: string | undefined;
|
|
741
750
|
created_at?: number | Date | undefined;
|
|
742
751
|
updated_at?: number | Date | undefined;
|
|
752
|
+
thread_id?: string | undefined;
|
|
743
753
|
job_description?: string | undefined;
|
|
744
754
|
schedule?: string | undefined;
|
|
745
755
|
schedule_text?: string | undefined;
|
|
746
756
|
active_until?: number | Date | undefined;
|
|
757
|
+
conversation_id?: string | undefined;
|
|
747
758
|
}, any, any, any, import("mongoose").Document<unknown, any, {
|
|
748
759
|
status: "inactive" | "active";
|
|
749
760
|
user_id: string;
|
|
@@ -768,10 +779,12 @@ export declare const MongoJobSchema: Schema<{
|
|
|
768
779
|
_id?: string | undefined;
|
|
769
780
|
created_at?: number | Date | undefined;
|
|
770
781
|
updated_at?: number | Date | undefined;
|
|
782
|
+
thread_id?: string | undefined;
|
|
771
783
|
job_description?: string | undefined;
|
|
772
784
|
schedule?: string | undefined;
|
|
773
785
|
schedule_text?: string | undefined;
|
|
774
786
|
active_until?: number | Date | undefined;
|
|
787
|
+
conversation_id?: string | undefined;
|
|
775
788
|
}, any> & {
|
|
776
789
|
status: "inactive" | "active";
|
|
777
790
|
user_id: string;
|
|
@@ -796,10 +809,12 @@ export declare const MongoJobSchema: Schema<{
|
|
|
796
809
|
_id?: string | undefined;
|
|
797
810
|
created_at?: number | Date | undefined;
|
|
798
811
|
updated_at?: number | Date | undefined;
|
|
812
|
+
thread_id?: string | undefined;
|
|
799
813
|
job_description?: string | undefined;
|
|
800
814
|
schedule?: string | undefined;
|
|
801
815
|
schedule_text?: string | undefined;
|
|
802
816
|
active_until?: number | Date | undefined;
|
|
817
|
+
conversation_id?: string | undefined;
|
|
803
818
|
} & Required<{
|
|
804
819
|
_id: string;
|
|
805
820
|
}> & {
|
|
@@ -828,10 +843,12 @@ export declare const MongoJobSchema: Schema<{
|
|
|
828
843
|
_id?: string | undefined;
|
|
829
844
|
created_at?: number | Date | undefined;
|
|
830
845
|
updated_at?: number | Date | undefined;
|
|
846
|
+
thread_id?: string | undefined;
|
|
831
847
|
job_description?: string | undefined;
|
|
832
848
|
schedule?: string | undefined;
|
|
833
849
|
schedule_text?: string | undefined;
|
|
834
850
|
active_until?: number | Date | undefined;
|
|
851
|
+
conversation_id?: string | undefined;
|
|
835
852
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
836
853
|
status: "inactive" | "active";
|
|
837
854
|
user_id: string;
|
|
@@ -856,10 +873,12 @@ export declare const MongoJobSchema: Schema<{
|
|
|
856
873
|
_id?: string | undefined;
|
|
857
874
|
created_at?: number | Date | undefined;
|
|
858
875
|
updated_at?: number | Date | undefined;
|
|
876
|
+
thread_id?: string | undefined;
|
|
859
877
|
job_description?: string | undefined;
|
|
860
878
|
schedule?: string | undefined;
|
|
861
879
|
schedule_text?: string | undefined;
|
|
862
880
|
active_until?: number | Date | undefined;
|
|
881
|
+
conversation_id?: string | undefined;
|
|
863
882
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
864
883
|
status: "inactive" | "active";
|
|
865
884
|
user_id: string;
|
|
@@ -884,10 +903,12 @@ export declare const MongoJobSchema: Schema<{
|
|
|
884
903
|
_id?: string | undefined;
|
|
885
904
|
created_at?: number | Date | undefined;
|
|
886
905
|
updated_at?: number | Date | undefined;
|
|
906
|
+
thread_id?: string | undefined;
|
|
887
907
|
job_description?: string | undefined;
|
|
888
908
|
schedule?: string | undefined;
|
|
889
909
|
schedule_text?: string | undefined;
|
|
890
910
|
active_until?: number | Date | undefined;
|
|
911
|
+
conversation_id?: string | undefined;
|
|
891
912
|
}> & Required<{
|
|
892
913
|
_id: string;
|
|
893
914
|
}> & {
|
package/dist/index.js
CHANGED
|
@@ -128,7 +128,8 @@ exports.MongoConversationSchema = new mongoose_1.Schema({
|
|
|
128
128
|
default: 'active',
|
|
129
129
|
},
|
|
130
130
|
created_at: { type: Date, default: Date.now },
|
|
131
|
-
updated_at: { type: Date, default: Date.now },
|
|
131
|
+
updated_at: { type: Date, default: Date.now },
|
|
132
|
+
is_job: { type: Boolean, default: false }, // true if this is a job conversation
|
|
132
133
|
}, {
|
|
133
134
|
versionKey: false,
|
|
134
135
|
toJSON: { virtuals: true },
|
|
@@ -148,7 +149,9 @@ exports.MongoJobSchema = new mongoose_1.Schema({
|
|
|
148
149
|
schedule: { type: String },
|
|
149
150
|
schedule_text: { type: String },
|
|
150
151
|
active_until: { type: Number || undefined },
|
|
151
|
-
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
|
|
152
155
|
}, {
|
|
153
156
|
versionKey: false,
|
|
154
157
|
toJSON: { virtuals: true },
|
package/dist/types.d.ts
CHANGED
|
@@ -312,9 +312,11 @@ export declare const zodConversationSchema: z.ZodObject<{
|
|
|
312
312
|
status: z.ZodDefault<z.ZodEnum<["active", "inactive"]>>;
|
|
313
313
|
created_at: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodNumber]>>;
|
|
314
314
|
updated_at: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodNumber]>>;
|
|
315
|
+
is_job: z.ZodDefault<z.ZodBoolean>;
|
|
315
316
|
}, "strip", z.ZodTypeAny, {
|
|
316
317
|
status: "inactive" | "active";
|
|
317
318
|
user_id: string;
|
|
319
|
+
is_job: boolean;
|
|
318
320
|
_id?: string | undefined;
|
|
319
321
|
title?: string | undefined;
|
|
320
322
|
created_at?: number | Date | undefined;
|
|
@@ -328,6 +330,7 @@ export declare const zodConversationSchema: z.ZodObject<{
|
|
|
328
330
|
created_at?: number | Date | undefined;
|
|
329
331
|
updated_at?: number | Date | undefined;
|
|
330
332
|
thread_id?: string | undefined;
|
|
333
|
+
is_job?: boolean | undefined;
|
|
331
334
|
}>;
|
|
332
335
|
export declare const zodJobSchema: z.ZodObject<{
|
|
333
336
|
_id: z.ZodOptional<z.ZodString>;
|
|
@@ -403,6 +406,8 @@ export declare const zodJobSchema: z.ZodObject<{
|
|
|
403
406
|
thread_id?: string | undefined;
|
|
404
407
|
}>;
|
|
405
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>;
|
|
406
411
|
}, "strip", z.ZodTypeAny, {
|
|
407
412
|
status: "inactive" | "active";
|
|
408
413
|
user_id: string;
|
|
@@ -427,10 +432,12 @@ export declare const zodJobSchema: z.ZodObject<{
|
|
|
427
432
|
_id?: string | undefined;
|
|
428
433
|
created_at?: number | Date | undefined;
|
|
429
434
|
updated_at?: number | Date | undefined;
|
|
435
|
+
thread_id?: string | undefined;
|
|
430
436
|
job_description?: string | undefined;
|
|
431
437
|
schedule?: string | undefined;
|
|
432
438
|
schedule_text?: string | undefined;
|
|
433
439
|
active_until?: number | Date | undefined;
|
|
440
|
+
conversation_id?: string | undefined;
|
|
434
441
|
}, {
|
|
435
442
|
user_id: string;
|
|
436
443
|
query: {
|
|
@@ -455,10 +462,12 @@ export declare const zodJobSchema: z.ZodObject<{
|
|
|
455
462
|
status?: "inactive" | "active" | undefined;
|
|
456
463
|
created_at?: number | Date | undefined;
|
|
457
464
|
updated_at?: number | Date | undefined;
|
|
465
|
+
thread_id?: string | undefined;
|
|
458
466
|
job_description?: string | undefined;
|
|
459
467
|
schedule?: string | undefined;
|
|
460
468
|
schedule_text?: string | undefined;
|
|
461
469
|
active_until?: number | Date | undefined;
|
|
470
|
+
conversation_id?: string | undefined;
|
|
462
471
|
}>;
|
|
463
472
|
export declare const zodCronScheduleResponseSchema: z.ZodObject<{
|
|
464
473
|
schedule: z.ZodOptional<z.ZodString>;
|
package/dist/types.js
CHANGED
|
@@ -119,7 +119,8 @@ exports.zodConversationSchema = zod_1.z.object({
|
|
|
119
119
|
thread_id: zod_1.z.string().optional(),
|
|
120
120
|
status: zod_1.z.enum(exports.generalStatusList).default('active'),
|
|
121
121
|
created_at: zod_1.z.coerce.date().or(zod_1.z.number()).optional(),
|
|
122
|
-
updated_at: zod_1.z.coerce.date().or(zod_1.z.number()).optional(),
|
|
122
|
+
updated_at: zod_1.z.coerce.date().or(zod_1.z.number()).optional(),
|
|
123
|
+
is_job: zod_1.z.boolean().default(false), // true if this is a job conversation
|
|
123
124
|
});
|
|
124
125
|
exports.zodJobSchema = zod_1.z.object({
|
|
125
126
|
_id: zod_1.z.string().optional(),
|
|
@@ -132,7 +133,9 @@ exports.zodJobSchema = zod_1.z.object({
|
|
|
132
133
|
status: zod_1.z.enum(exports.generalStatusList).default('active'),
|
|
133
134
|
user_id: zod_1.z.string().nonempty('User ID must be provided'),
|
|
134
135
|
query: exports.zodQuerySchema,
|
|
135
|
-
active_until: zod_1.z.coerce.date().or(zod_1.z.number()).optional(),
|
|
136
|
+
active_until: zod_1.z.coerce.date().or(zod_1.z.number()).optional(),
|
|
137
|
+
conversation_id: zod_1.z.string().optional(),
|
|
138
|
+
thread_id: zod_1.z.string().optional(), // thread ID for the job
|
|
136
139
|
});
|
|
137
140
|
exports.zodCronScheduleResponseSchema = zod_1.z.object({
|
|
138
141
|
schedule: zod_1.z.string().optional(),
|
package/index.ts
CHANGED
|
@@ -144,6 +144,7 @@ export const MongoConversationSchema = new Schema<ConversationType>(
|
|
|
144
144
|
}, // status of the conversation
|
|
145
145
|
created_at: { type: Date, default: Date.now }, // creation date
|
|
146
146
|
updated_at: { type: Date, default: Date.now }, // last update date
|
|
147
|
+
is_job: { type: Boolean, default: false }, // true if this is a job conversation
|
|
147
148
|
},
|
|
148
149
|
{
|
|
149
150
|
versionKey: false,
|
|
@@ -168,6 +169,8 @@ export const MongoJobSchema = new Schema<JobType>(
|
|
|
168
169
|
schedule_text: { type: String }, // cron schedule in free-text format
|
|
169
170
|
active_until: { type: Number || undefined }, // optional date until which the job is active
|
|
170
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
|
|
171
174
|
},
|
|
172
175
|
{
|
|
173
176
|
versionKey: false,
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -131,6 +131,7 @@ export const zodConversationSchema = z.object({
|
|
|
131
131
|
status: z.enum(generalStatusList).default('active'), // status of the conversation
|
|
132
132
|
created_at: z.coerce.date().or(z.number()).optional(), // creation date
|
|
133
133
|
updated_at: z.coerce.date().or(z.number()).optional(), // last update date
|
|
134
|
+
is_job: z.boolean().default(false), // true if this is a job conversation
|
|
134
135
|
});
|
|
135
136
|
|
|
136
137
|
export const zodJobSchema = z.object({
|
|
@@ -145,6 +146,8 @@ export const zodJobSchema = z.object({
|
|
|
145
146
|
user_id: z.string().nonempty('User ID must be provided'), // user identifier
|
|
146
147
|
query: zodQuerySchema, // query associated with the job
|
|
147
148
|
active_until: z.coerce.date().or(z.number()).optional(), // optional date until which the job is active
|
|
149
|
+
conversation_id: z.string().optional(), // optional conversation ID for the job
|
|
150
|
+
thread_id: z.string().optional(), // thread ID for the job
|
|
148
151
|
});
|
|
149
152
|
|
|
150
153
|
export const zodCronScheduleResponseSchema = z.object({
|