chatifai 1.0.27 → 1.0.29
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 +6 -0
- package/dist/index.js +11 -1
- package/dist/types.d.ts +6 -0
- package/dist/types.js +2 -0
- package/index.ts +12 -2
- package/package.json +1 -1
- package/types.ts +2 -0
package/dist/index.d.ts
CHANGED
|
@@ -1327,6 +1327,8 @@ export declare const MessageSchema: Schema<any, import("mongoose").Model<any, an
|
|
|
1327
1327
|
thread_id: string;
|
|
1328
1328
|
role: "user" | "agent" | "system";
|
|
1329
1329
|
content: string;
|
|
1330
|
+
is_favorite: boolean;
|
|
1331
|
+
like: "liked" | "disliked" | "waiting_response";
|
|
1330
1332
|
created_at?: number | null | undefined;
|
|
1331
1333
|
updated_at?: number | null | undefined;
|
|
1332
1334
|
user_id?: string | null | undefined;
|
|
@@ -1339,6 +1341,8 @@ export declare const MessageSchema: Schema<any, import("mongoose").Model<any, an
|
|
|
1339
1341
|
thread_id: string;
|
|
1340
1342
|
role: "user" | "agent" | "system";
|
|
1341
1343
|
content: string;
|
|
1344
|
+
is_favorite: boolean;
|
|
1345
|
+
like: "liked" | "disliked" | "waiting_response";
|
|
1342
1346
|
created_at?: number | null | undefined;
|
|
1343
1347
|
updated_at?: number | null | undefined;
|
|
1344
1348
|
user_id?: string | null | undefined;
|
|
@@ -1351,6 +1355,8 @@ export declare const MessageSchema: Schema<any, import("mongoose").Model<any, an
|
|
|
1351
1355
|
thread_id: string;
|
|
1352
1356
|
role: "user" | "agent" | "system";
|
|
1353
1357
|
content: string;
|
|
1358
|
+
is_favorite: boolean;
|
|
1359
|
+
like: "liked" | "disliked" | "waiting_response";
|
|
1354
1360
|
created_at?: number | null | undefined;
|
|
1355
1361
|
updated_at?: number | null | undefined;
|
|
1356
1362
|
user_id?: string | null | undefined;
|
package/dist/index.js
CHANGED
|
@@ -99,7 +99,11 @@ exports.ContextSchema = new mongoose_1.Schema({
|
|
|
99
99
|
email: { type: String },
|
|
100
100
|
},
|
|
101
101
|
bucket_name: { type: String },
|
|
102
|
-
processing_status: {
|
|
102
|
+
processing_status: {
|
|
103
|
+
type: String,
|
|
104
|
+
enum: ['pending', 'processing', 'completed', 'failed'],
|
|
105
|
+
default: 'pending',
|
|
106
|
+
},
|
|
103
107
|
created_at: { type: Number },
|
|
104
108
|
updated_at: { type: Number },
|
|
105
109
|
}, {
|
|
@@ -207,6 +211,12 @@ exports.MessageSchema = new mongoose_1.Schema({
|
|
|
207
211
|
user_id: { type: String },
|
|
208
212
|
agent_id: { type: String },
|
|
209
213
|
content: { type: String, required: true },
|
|
214
|
+
is_favorite: { type: Boolean, default: false },
|
|
215
|
+
like: {
|
|
216
|
+
type: String,
|
|
217
|
+
enum: ['liked', 'disliked', 'waiting_response'],
|
|
218
|
+
default: 'waiting_response',
|
|
219
|
+
},
|
|
210
220
|
role: { type: String, enum: ['user', 'agent', 'system'], required: true },
|
|
211
221
|
created_at: { type: Number },
|
|
212
222
|
updated_at: { type: Number },
|
package/dist/types.d.ts
CHANGED
|
@@ -647,6 +647,8 @@ export declare const zodMessageSchema: z.ZodObject<{
|
|
|
647
647
|
agent_id: z.ZodOptional<z.ZodString>;
|
|
648
648
|
role: z.ZodEnum<["user", "agent", "system"]>;
|
|
649
649
|
content: z.ZodString;
|
|
650
|
+
is_favorite: z.ZodOptional<z.ZodBoolean>;
|
|
651
|
+
like: z.ZodOptional<z.ZodEnum<["liked", "disliked", "waiting_response"]>>;
|
|
650
652
|
created_at: z.ZodOptional<z.ZodNumber>;
|
|
651
653
|
updated_at: z.ZodOptional<z.ZodNumber>;
|
|
652
654
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -659,6 +661,8 @@ export declare const zodMessageSchema: z.ZodObject<{
|
|
|
659
661
|
updated_at?: number | undefined;
|
|
660
662
|
user_id?: string | undefined;
|
|
661
663
|
agent_id?: string | undefined;
|
|
664
|
+
is_favorite?: boolean | undefined;
|
|
665
|
+
like?: "liked" | "disliked" | "waiting_response" | undefined;
|
|
662
666
|
}, {
|
|
663
667
|
organization_id: string;
|
|
664
668
|
thread_id: string;
|
|
@@ -669,6 +673,8 @@ export declare const zodMessageSchema: z.ZodObject<{
|
|
|
669
673
|
updated_at?: number | undefined;
|
|
670
674
|
user_id?: string | undefined;
|
|
671
675
|
agent_id?: string | undefined;
|
|
676
|
+
is_favorite?: boolean | undefined;
|
|
677
|
+
like?: "liked" | "disliked" | "waiting_response" | undefined;
|
|
672
678
|
}>;
|
|
673
679
|
export type EventAttributeType = {
|
|
674
680
|
http_request: {
|
package/dist/types.js
CHANGED
|
@@ -171,6 +171,8 @@ exports.zodMessageSchema = zod_1.z.object({
|
|
|
171
171
|
agent_id: zod_1.z.string().optional(),
|
|
172
172
|
role: zod_1.z.enum(['user', 'agent', 'system']),
|
|
173
173
|
content: zod_1.z.string(),
|
|
174
|
+
is_favorite: zod_1.z.boolean().optional(),
|
|
175
|
+
like: zod_1.z.enum(['liked', 'disliked', 'waiting_response']).optional(),
|
|
174
176
|
created_at: zod_1.z.number().optional(),
|
|
175
177
|
updated_at: zod_1.z.number().optional(),
|
|
176
178
|
});
|
package/index.ts
CHANGED
|
@@ -97,7 +97,11 @@ export const ContextSchema = new Schema(
|
|
|
97
97
|
email: { type: String },
|
|
98
98
|
},
|
|
99
99
|
bucket_name: { type: String },
|
|
100
|
-
processing_status: {
|
|
100
|
+
processing_status: {
|
|
101
|
+
type: String,
|
|
102
|
+
enum: ['pending', 'processing', 'completed', 'failed'],
|
|
103
|
+
default: 'pending',
|
|
104
|
+
},
|
|
101
105
|
created_at: { type: Number },
|
|
102
106
|
updated_at: { type: Number },
|
|
103
107
|
},
|
|
@@ -225,6 +229,12 @@ export const MessageSchema = new Schema(
|
|
|
225
229
|
user_id: { type: String },
|
|
226
230
|
agent_id: { type: String },
|
|
227
231
|
content: { type: String, required: true },
|
|
232
|
+
is_favorite: { type: Boolean, default: false },
|
|
233
|
+
like: {
|
|
234
|
+
type: String,
|
|
235
|
+
enum: ['liked', 'disliked', 'waiting_response'],
|
|
236
|
+
default: 'waiting_response',
|
|
237
|
+
},
|
|
228
238
|
role: { type: String, enum: ['user', 'agent', 'system'], required: true },
|
|
229
239
|
created_at: { type: Number },
|
|
230
240
|
updated_at: { type: Number },
|
|
@@ -237,4 +247,4 @@ export const MessageSchema = new Schema(
|
|
|
237
247
|
id: true,
|
|
238
248
|
// encryptionType: 'csfle',
|
|
239
249
|
}
|
|
240
|
-
);
|
|
250
|
+
);
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -180,6 +180,8 @@ export const zodMessageSchema = z.object({
|
|
|
180
180
|
agent_id: z.string().optional(),
|
|
181
181
|
role: z.enum(['user', 'agent', 'system']),
|
|
182
182
|
content: z.string(),
|
|
183
|
+
is_favorite: z.boolean().optional(),
|
|
184
|
+
like: z.enum(['liked', 'disliked', 'waiting_response']).optional(), // 1 for like, -1 for dislike
|
|
183
185
|
created_at: z.number().optional(),
|
|
184
186
|
updated_at: z.number().optional(),
|
|
185
187
|
});
|