chatifai 1.0.28 → 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 CHANGED
@@ -1328,6 +1328,7 @@ export declare const MessageSchema: Schema<any, import("mongoose").Model<any, an
1328
1328
  role: "user" | "agent" | "system";
1329
1329
  content: string;
1330
1330
  is_favorite: boolean;
1331
+ like: "liked" | "disliked" | "waiting_response";
1331
1332
  created_at?: number | null | undefined;
1332
1333
  updated_at?: number | null | undefined;
1333
1334
  user_id?: string | null | undefined;
@@ -1341,6 +1342,7 @@ export declare const MessageSchema: Schema<any, import("mongoose").Model<any, an
1341
1342
  role: "user" | "agent" | "system";
1342
1343
  content: string;
1343
1344
  is_favorite: boolean;
1345
+ like: "liked" | "disliked" | "waiting_response";
1344
1346
  created_at?: number | null | undefined;
1345
1347
  updated_at?: number | null | undefined;
1346
1348
  user_id?: string | null | undefined;
@@ -1354,6 +1356,7 @@ export declare const MessageSchema: Schema<any, import("mongoose").Model<any, an
1354
1356
  role: "user" | "agent" | "system";
1355
1357
  content: string;
1356
1358
  is_favorite: boolean;
1359
+ like: "liked" | "disliked" | "waiting_response";
1357
1360
  created_at?: number | null | undefined;
1358
1361
  updated_at?: number | null | undefined;
1359
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: { type: String, enum: ['pending', 'processing', 'completed', 'failed'], default: 'pending' },
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
  }, {
@@ -208,6 +212,11 @@ exports.MessageSchema = new mongoose_1.Schema({
208
212
  agent_id: { type: String },
209
213
  content: { type: String, required: true },
210
214
  is_favorite: { type: Boolean, default: false },
215
+ like: {
216
+ type: String,
217
+ enum: ['liked', 'disliked', 'waiting_response'],
218
+ default: 'waiting_response',
219
+ },
211
220
  role: { type: String, enum: ['user', 'agent', 'system'], required: true },
212
221
  created_at: { type: Number },
213
222
  updated_at: { type: Number },
package/dist/types.d.ts CHANGED
@@ -648,6 +648,7 @@ export declare const zodMessageSchema: z.ZodObject<{
648
648
  role: z.ZodEnum<["user", "agent", "system"]>;
649
649
  content: z.ZodString;
650
650
  is_favorite: z.ZodOptional<z.ZodBoolean>;
651
+ like: z.ZodOptional<z.ZodEnum<["liked", "disliked", "waiting_response"]>>;
651
652
  created_at: z.ZodOptional<z.ZodNumber>;
652
653
  updated_at: z.ZodOptional<z.ZodNumber>;
653
654
  }, "strip", z.ZodTypeAny, {
@@ -661,6 +662,7 @@ export declare const zodMessageSchema: z.ZodObject<{
661
662
  user_id?: string | undefined;
662
663
  agent_id?: string | undefined;
663
664
  is_favorite?: boolean | undefined;
665
+ like?: "liked" | "disliked" | "waiting_response" | undefined;
664
666
  }, {
665
667
  organization_id: string;
666
668
  thread_id: string;
@@ -672,6 +674,7 @@ export declare const zodMessageSchema: z.ZodObject<{
672
674
  user_id?: string | undefined;
673
675
  agent_id?: string | undefined;
674
676
  is_favorite?: boolean | undefined;
677
+ like?: "liked" | "disliked" | "waiting_response" | undefined;
675
678
  }>;
676
679
  export type EventAttributeType = {
677
680
  http_request: {
package/dist/types.js CHANGED
@@ -172,6 +172,7 @@ exports.zodMessageSchema = zod_1.z.object({
172
172
  role: zod_1.z.enum(['user', 'agent', 'system']),
173
173
  content: zod_1.z.string(),
174
174
  is_favorite: zod_1.z.boolean().optional(),
175
+ like: zod_1.z.enum(['liked', 'disliked', 'waiting_response']).optional(),
175
176
  created_at: zod_1.z.number().optional(),
176
177
  updated_at: zod_1.z.number().optional(),
177
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: { type: String, enum: ['pending', 'processing', 'completed', 'failed'] , default: 'pending' },
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
  },
@@ -226,6 +230,11 @@ export const MessageSchema = new Schema(
226
230
  agent_id: { type: String },
227
231
  content: { type: String, required: true },
228
232
  is_favorite: { type: Boolean, default: false },
233
+ like: {
234
+ type: String,
235
+ enum: ['liked', 'disliked', 'waiting_response'],
236
+ default: 'waiting_response',
237
+ },
229
238
  role: { type: String, enum: ['user', 'agent', 'system'], required: true },
230
239
  created_at: { type: Number },
231
240
  updated_at: { type: Number },
@@ -238,4 +247,4 @@ export const MessageSchema = new Schema(
238
247
  id: true,
239
248
  // encryptionType: 'csfle',
240
249
  }
241
- );
250
+ );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chatifai",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "description": "SDK for interacting with the Chatifai API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/types.ts CHANGED
@@ -181,6 +181,7 @@ export const zodMessageSchema = z.object({
181
181
  role: z.enum(['user', 'agent', 'system']),
182
182
  content: z.string(),
183
183
  is_favorite: z.boolean().optional(),
184
+ like: z.enum(['liked', 'disliked', 'waiting_response']).optional(), // 1 for like, -1 for dislike
184
185
  created_at: z.number().optional(),
185
186
  updated_at: z.number().optional(),
186
187
  });