asfur 1.0.30 → 1.0.31
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 +7 -0
- package/dist/index.js +7 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.js +4 -2
- package/index.ts +6 -0
- package/package.json +1 -1
- package/types.ts +4 -1
package/dist/index.d.ts
CHANGED
|
@@ -624,21 +624,25 @@ export declare const MongoUserSettingsSchema: Schema<{
|
|
|
624
624
|
__v: number;
|
|
625
625
|
}>;
|
|
626
626
|
export declare const MongoConversationSchema: Schema<{
|
|
627
|
+
status: "inactive" | "active";
|
|
627
628
|
user_id: string;
|
|
628
629
|
_id?: string | undefined;
|
|
629
630
|
title?: string | undefined;
|
|
630
631
|
thread_id?: string | undefined;
|
|
631
632
|
}, import("mongoose").Model<{
|
|
633
|
+
status: "inactive" | "active";
|
|
632
634
|
user_id: string;
|
|
633
635
|
_id?: string | undefined;
|
|
634
636
|
title?: string | undefined;
|
|
635
637
|
thread_id?: string | undefined;
|
|
636
638
|
}, any, any, any, import("mongoose").Document<unknown, any, {
|
|
639
|
+
status: "inactive" | "active";
|
|
637
640
|
user_id: string;
|
|
638
641
|
_id?: string | undefined;
|
|
639
642
|
title?: string | undefined;
|
|
640
643
|
thread_id?: string | undefined;
|
|
641
644
|
}, any> & {
|
|
645
|
+
status: "inactive" | "active";
|
|
642
646
|
user_id: string;
|
|
643
647
|
_id?: string | undefined;
|
|
644
648
|
title?: string | undefined;
|
|
@@ -648,16 +652,19 @@ export declare const MongoConversationSchema: Schema<{
|
|
|
648
652
|
}> & {
|
|
649
653
|
__v: number;
|
|
650
654
|
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
|
|
655
|
+
status: "inactive" | "active";
|
|
651
656
|
user_id: string;
|
|
652
657
|
_id?: string | undefined;
|
|
653
658
|
title?: string | undefined;
|
|
654
659
|
thread_id?: string | undefined;
|
|
655
660
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
661
|
+
status: "inactive" | "active";
|
|
656
662
|
user_id: string;
|
|
657
663
|
_id?: string | undefined;
|
|
658
664
|
title?: string | undefined;
|
|
659
665
|
thread_id?: string | undefined;
|
|
660
666
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
667
|
+
status: "inactive" | "active";
|
|
661
668
|
user_id: string;
|
|
662
669
|
_id?: string | undefined;
|
|
663
670
|
title?: string | undefined;
|
package/dist/index.js
CHANGED
|
@@ -18,6 +18,7 @@ exports.MongoConversationSchema = exports.MongoUserSettingsSchema = exports.Mong
|
|
|
18
18
|
// Export types for consumers
|
|
19
19
|
__exportStar(require("./types"), exports);
|
|
20
20
|
const mongoose_1 = require("mongoose");
|
|
21
|
+
const types_1 = require("./types");
|
|
21
22
|
exports.MongoDataSchema = new mongoose_1.Schema({
|
|
22
23
|
source_id: { type: String || Number },
|
|
23
24
|
source_public_id: { type: String || Number },
|
|
@@ -120,7 +121,12 @@ exports.MongoUserSettingsSchema = new mongoose_1.Schema({
|
|
|
120
121
|
exports.MongoConversationSchema = new mongoose_1.Schema({
|
|
121
122
|
user_id: { type: String, required: true },
|
|
122
123
|
title: { type: String },
|
|
123
|
-
thread_id: { type: String },
|
|
124
|
+
thread_id: { type: String },
|
|
125
|
+
status: {
|
|
126
|
+
type: String,
|
|
127
|
+
enum: types_1.generalStatusList,
|
|
128
|
+
default: 'active',
|
|
129
|
+
}, // status of the conversation
|
|
124
130
|
}, {
|
|
125
131
|
versionKey: false,
|
|
126
132
|
toJSON: { virtuals: true },
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const platformsList: readonly ["telegram", "facebook", "instagram", "tiktok", "website", "document", "other"];
|
|
3
3
|
export declare const statusList: readonly ["approved", "pending", "inactive", "in_review"];
|
|
4
|
+
export declare const generalStatusList: readonly ["active", "inactive"];
|
|
4
5
|
export declare const zodSourceSchema: z.ZodObject<{
|
|
5
6
|
_id: z.ZodOptional<z.ZodString>;
|
|
6
7
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -308,7 +309,9 @@ export declare const zodConversationSchema: z.ZodObject<{
|
|
|
308
309
|
user_id: z.ZodString;
|
|
309
310
|
title: z.ZodOptional<z.ZodString>;
|
|
310
311
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
312
|
+
status: z.ZodDefault<z.ZodEnum<["active", "inactive"]>>;
|
|
311
313
|
}, "strip", z.ZodTypeAny, {
|
|
314
|
+
status: "inactive" | "active";
|
|
312
315
|
user_id: string;
|
|
313
316
|
_id?: string | undefined;
|
|
314
317
|
title?: string | undefined;
|
|
@@ -317,6 +320,7 @@ export declare const zodConversationSchema: z.ZodObject<{
|
|
|
317
320
|
user_id: string;
|
|
318
321
|
_id?: string | undefined;
|
|
319
322
|
title?: string | undefined;
|
|
323
|
+
status?: "inactive" | "active" | undefined;
|
|
320
324
|
thread_id?: string | undefined;
|
|
321
325
|
}>;
|
|
322
326
|
export type SourceType = z.infer<typeof zodSourceSchema>;
|
package/dist/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zodConversationSchema = exports.zodUserSettingsSchema = exports.zodInstructionsSchema = exports.zodQuerySchema = exports.zodAbsoluteTimeRangeSchema = exports.zodRelativeTimeRangeSchema = exports.relativeTimeRangeList = exports.zodDataSchema = exports.zodSourceSchema = exports.statusList = exports.platformsList = void 0;
|
|
3
|
+
exports.zodConversationSchema = exports.zodUserSettingsSchema = exports.zodInstructionsSchema = exports.zodQuerySchema = exports.zodAbsoluteTimeRangeSchema = exports.zodRelativeTimeRangeSchema = exports.relativeTimeRangeList = exports.zodDataSchema = exports.zodSourceSchema = exports.generalStatusList = exports.statusList = exports.platformsList = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.platformsList = [
|
|
6
6
|
'telegram',
|
|
@@ -17,6 +17,7 @@ exports.statusList = [
|
|
|
17
17
|
'inactive',
|
|
18
18
|
'in_review',
|
|
19
19
|
];
|
|
20
|
+
exports.generalStatusList = ['active', 'inactive'];
|
|
20
21
|
exports.zodSourceSchema = zod_1.z.object({
|
|
21
22
|
_id: zod_1.z.string().optional(),
|
|
22
23
|
title: zod_1.z.string().optional(),
|
|
@@ -115,5 +116,6 @@ exports.zodConversationSchema = zod_1.z.object({
|
|
|
115
116
|
_id: zod_1.z.string().optional(),
|
|
116
117
|
user_id: zod_1.z.string().nonempty('User ID must be provided'),
|
|
117
118
|
title: zod_1.z.string().optional(),
|
|
118
|
-
thread_id: zod_1.z.string().optional(),
|
|
119
|
+
thread_id: zod_1.z.string().optional(),
|
|
120
|
+
status: zod_1.z.enum(exports.generalStatusList).default('active'), // status of the conversation
|
|
119
121
|
});
|
package/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { Schema } from 'mongoose';
|
|
|
5
5
|
import {
|
|
6
6
|
ConversationType,
|
|
7
7
|
DataType,
|
|
8
|
+
generalStatusList,
|
|
8
9
|
InstructionsType,
|
|
9
10
|
QueryType,
|
|
10
11
|
SourceType,
|
|
@@ -135,6 +136,11 @@ export const MongoConversationSchema = new Schema<ConversationType>(
|
|
|
135
136
|
user_id: { type: String, required: true }, // user identifier
|
|
136
137
|
title: { type: String }, // optional title for the conversation
|
|
137
138
|
thread_id: { type: String }, // thread ID for the conversation
|
|
139
|
+
status: {
|
|
140
|
+
type: String,
|
|
141
|
+
enum: generalStatusList,
|
|
142
|
+
default: 'active',
|
|
143
|
+
}, // status of the conversation
|
|
138
144
|
},
|
|
139
145
|
{
|
|
140
146
|
versionKey: false,
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -17,6 +17,8 @@ export const statusList = [
|
|
|
17
17
|
'in_review',
|
|
18
18
|
] as const;
|
|
19
19
|
|
|
20
|
+
export const generalStatusList = ['active', 'inactive'] as const;
|
|
21
|
+
|
|
20
22
|
export const zodSourceSchema = z.object({
|
|
21
23
|
_id: z.string().optional(),
|
|
22
24
|
title: z.string().optional(), // e.g., 'Telegram Channel Name'
|
|
@@ -126,7 +128,8 @@ export const zodConversationSchema = z.object({
|
|
|
126
128
|
user_id: z.string().nonempty('User ID must be provided'), // user identifier
|
|
127
129
|
title: z.string().optional(), // optional title for the conversation
|
|
128
130
|
thread_id: z.string().optional(), // thread ID for the conversation
|
|
129
|
-
|
|
131
|
+
status: z.enum(generalStatusList).default('active'), // status of the conversation
|
|
132
|
+
});
|
|
130
133
|
|
|
131
134
|
export type SourceType = z.infer<typeof zodSourceSchema>;
|
|
132
135
|
export type DataType = z.infer<typeof zodDataSchema>;
|