chatifai 1.0.30 → 1.0.32

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
@@ -1269,41 +1269,38 @@ export declare const ThreadSchema: Schema<any, import("mongoose").Model<any, any
1269
1269
  createdAt: NativeDate;
1270
1270
  updatedAt: NativeDate;
1271
1271
  } & {
1272
- user_id: string;
1273
1272
  organization_id: string;
1274
- agent_id: string;
1273
+ user: any;
1275
1274
  messages_count: number;
1276
1275
  title?: string | null | undefined;
1277
1276
  created_at?: number | null | undefined;
1278
1277
  updated_at?: number | null | undefined;
1279
1278
  description?: string | null | undefined;
1280
- query_id?: string | null | undefined;
1279
+ pre_defined_query_id?: string | null | undefined;
1281
1280
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
1282
1281
  createdAt: NativeDate;
1283
1282
  updatedAt: NativeDate;
1284
1283
  } & {
1285
- user_id: string;
1286
1284
  organization_id: string;
1287
- agent_id: string;
1285
+ user: any;
1288
1286
  messages_count: number;
1289
1287
  title?: string | null | undefined;
1290
1288
  created_at?: number | null | undefined;
1291
1289
  updated_at?: number | null | undefined;
1292
1290
  description?: string | null | undefined;
1293
- query_id?: string | null | undefined;
1291
+ pre_defined_query_id?: string | null | undefined;
1294
1292
  }>, {}> & import("mongoose").FlatRecord<{
1295
1293
  createdAt: NativeDate;
1296
1294
  updatedAt: NativeDate;
1297
1295
  } & {
1298
- user_id: string;
1299
1296
  organization_id: string;
1300
- agent_id: string;
1297
+ user: any;
1301
1298
  messages_count: number;
1302
1299
  title?: string | null | undefined;
1303
1300
  created_at?: number | null | undefined;
1304
1301
  updated_at?: number | null | undefined;
1305
1302
  description?: string | null | undefined;
1306
- query_id?: string | null | undefined;
1303
+ pre_defined_query_id?: string | null | undefined;
1307
1304
  }> & {
1308
1305
  _id: import("mongoose").Types.ObjectId;
1309
1306
  } & {
package/dist/index.js CHANGED
@@ -189,11 +189,10 @@ exports.FullFileTextSchema = new mongoose_1.Schema({
189
189
  });
190
190
  exports.ThreadSchema = new mongoose_1.Schema({
191
191
  organization_id: { type: String, required: true },
192
- user_id: { type: String, required: true },
193
- agent_id: { type: String, required: true },
192
+ user: { type: Object, required: true },
194
193
  title: { type: String, minlength: 1, maxlength: 200 },
195
194
  description: { type: String },
196
- query_id: { type: String },
195
+ pre_defined_query_id: { type: String },
197
196
  messages_count: { type: Number, default: 0 },
198
197
  created_at: { type: Number },
199
198
  updated_at: { type: Number },
package/dist/types.d.ts CHANGED
@@ -584,7 +584,7 @@ export declare const zodQuerySchema: z.ZodObject<{
584
584
  export declare const zodThreadSchema: z.ZodObject<{
585
585
  _id: z.ZodOptional<z.ZodString>;
586
586
  organization_id: z.ZodString;
587
- user_id: z.ZodObject<{
587
+ user: z.ZodObject<{
588
588
  user_id: z.ZodString;
589
589
  first_name: z.ZodOptional<z.ZodString>;
590
590
  last_name: z.ZodOptional<z.ZodString>;
@@ -600,44 +600,41 @@ export declare const zodThreadSchema: z.ZodObject<{
600
600
  last_name?: string | undefined;
601
601
  email?: string | undefined;
602
602
  }>;
603
- agent_id: z.ZodOptional<z.ZodString>;
604
603
  title: z.ZodOptional<z.ZodString>;
605
604
  description: z.ZodOptional<z.ZodString>;
606
605
  created_at: z.ZodOptional<z.ZodNumber>;
607
606
  updated_at: z.ZodOptional<z.ZodNumber>;
608
- query_id: z.ZodOptional<z.ZodString>;
607
+ pre_defined_query_id: z.ZodOptional<z.ZodString>;
609
608
  messages_count: z.ZodOptional<z.ZodNumber>;
610
609
  }, "strip", z.ZodTypeAny, {
611
- user_id: {
610
+ organization_id: string;
611
+ user: {
612
612
  user_id: string;
613
613
  first_name?: string | undefined;
614
614
  last_name?: string | undefined;
615
615
  email?: string | undefined;
616
616
  };
617
- organization_id: string;
618
617
  _id?: string | undefined;
619
618
  title?: string | undefined;
620
619
  created_at?: number | undefined;
621
620
  updated_at?: number | undefined;
622
621
  description?: string | undefined;
623
- agent_id?: string | undefined;
624
- query_id?: string | undefined;
622
+ pre_defined_query_id?: string | undefined;
625
623
  messages_count?: number | undefined;
626
624
  }, {
627
- user_id: {
625
+ organization_id: string;
626
+ user: {
628
627
  user_id: string;
629
628
  first_name?: string | undefined;
630
629
  last_name?: string | undefined;
631
630
  email?: string | undefined;
632
631
  };
633
- organization_id: string;
634
632
  _id?: string | undefined;
635
633
  title?: string | undefined;
636
634
  created_at?: number | undefined;
637
635
  updated_at?: number | undefined;
638
636
  description?: string | undefined;
639
- agent_id?: string | undefined;
640
- query_id?: string | undefined;
637
+ pre_defined_query_id?: string | undefined;
641
638
  messages_count?: number | undefined;
642
639
  }>;
643
640
  export declare const zodMessageSchema: z.ZodObject<{
package/dist/types.js CHANGED
@@ -155,13 +155,12 @@ exports.zodQuerySchema = zod_1.z.object({
155
155
  exports.zodThreadSchema = zod_1.z.object({
156
156
  _id: zod_1.z.string().optional(),
157
157
  organization_id: zod_1.z.string(),
158
- user_id: exports.zodClerkMinimalUserSchema,
159
- agent_id: zod_1.z.string().optional(),
158
+ user: exports.zodClerkMinimalUserSchema,
160
159
  title: zod_1.z.string().min(1).max(200).optional(),
161
160
  description: zod_1.z.string().optional(),
162
161
  created_at: zod_1.z.number().optional(),
163
162
  updated_at: zod_1.z.number().optional(),
164
- query_id: zod_1.z.string().optional(),
163
+ pre_defined_query_id: zod_1.z.string().optional(),
165
164
  messages_count: zod_1.z.number().optional(),
166
165
  });
167
166
  exports.zodMessageSchema = zod_1.z.object({
package/index.ts CHANGED
@@ -203,11 +203,10 @@ export const FullFileTextSchema = new Schema(
203
203
  export const ThreadSchema = new Schema(
204
204
  {
205
205
  organization_id: { type: String, required: true },
206
- user_id: { type: String, required: true },
207
- agent_id: { type: String, required: true },
206
+ user: { type: Object, required: true },
208
207
  title: { type: String, minlength: 1, maxlength: 200 },
209
208
  description: { type: String },
210
- query_id: { type: String },
209
+ pre_defined_query_id: { type: String },
211
210
  messages_count: { type: Number, default: 0 },
212
211
  created_at: { type: Number },
213
212
  updated_at: { type: Number },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chatifai",
3
- "version": "1.0.30",
3
+ "version": "1.0.32",
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
@@ -164,13 +164,12 @@ export const zodQuerySchema = z.object({
164
164
  export const zodThreadSchema = z.object({
165
165
  _id: z.string().optional(),
166
166
  organization_id: z.string(),
167
- user_id: zodClerkMinimalUserSchema,
168
- agent_id: z.string().optional(),
167
+ user: zodClerkMinimalUserSchema,
169
168
  title: z.string().min(1).max(200).optional(),
170
169
  description: z.string().optional(),
171
170
  created_at: z.number().optional(),
172
171
  updated_at: z.number().optional(),
173
- query_id: z.string().optional(),
172
+ pre_defined_query_id: z.string().optional(),
174
173
  messages_count: z.number().optional(),
175
174
  });
176
175