chatifai 1.0.46 → 1.0.48

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
@@ -241,6 +241,7 @@ export declare const ContextSchema: Schema<any, import("mongoose").Model<any, an
241
241
  updatedAt: NativeDate;
242
242
  } & {
243
243
  title: string;
244
+ is_free_text: boolean;
244
245
  is_active: boolean;
245
246
  processing_status: "pending" | "processing" | "completed" | "failed";
246
247
  type?: string | null | undefined;
@@ -253,6 +254,9 @@ export declare const ContextSchema: Schema<any, import("mongoose").Model<any, an
253
254
  file_url?: string | null | undefined;
254
255
  file_gcs_url?: string | null | undefined;
255
256
  file_name?: string | null | undefined;
257
+ free_text_editor_object?: string | null | undefined;
258
+ free_text_description?: string | null | undefined;
259
+ free_text_content?: string | null | undefined;
256
260
  size?: number | null | undefined;
257
261
  tokens?: number | null | undefined;
258
262
  uploaded_by?: {
@@ -268,6 +272,7 @@ export declare const ContextSchema: Schema<any, import("mongoose").Model<any, an
268
272
  updatedAt: NativeDate;
269
273
  } & {
270
274
  title: string;
275
+ is_free_text: boolean;
271
276
  is_active: boolean;
272
277
  processing_status: "pending" | "processing" | "completed" | "failed";
273
278
  type?: string | null | undefined;
@@ -280,6 +285,9 @@ export declare const ContextSchema: Schema<any, import("mongoose").Model<any, an
280
285
  file_url?: string | null | undefined;
281
286
  file_gcs_url?: string | null | undefined;
282
287
  file_name?: string | null | undefined;
288
+ free_text_editor_object?: string | null | undefined;
289
+ free_text_description?: string | null | undefined;
290
+ free_text_content?: string | null | undefined;
283
291
  size?: number | null | undefined;
284
292
  tokens?: number | null | undefined;
285
293
  uploaded_by?: {
@@ -295,6 +303,7 @@ export declare const ContextSchema: Schema<any, import("mongoose").Model<any, an
295
303
  updatedAt: NativeDate;
296
304
  } & {
297
305
  title: string;
306
+ is_free_text: boolean;
298
307
  is_active: boolean;
299
308
  processing_status: "pending" | "processing" | "completed" | "failed";
300
309
  type?: string | null | undefined;
@@ -307,6 +316,9 @@ export declare const ContextSchema: Schema<any, import("mongoose").Model<any, an
307
316
  file_url?: string | null | undefined;
308
317
  file_gcs_url?: string | null | undefined;
309
318
  file_name?: string | null | undefined;
319
+ free_text_editor_object?: string | null | undefined;
320
+ free_text_description?: string | null | undefined;
321
+ free_text_content?: string | null | undefined;
310
322
  size?: number | null | undefined;
311
323
  tokens?: number | null | undefined;
312
324
  uploaded_by?: {
@@ -1396,3 +1408,54 @@ export declare const MessageSchema: Schema<any, import("mongoose").Model<any, an
1396
1408
  } & {
1397
1409
  __v: number;
1398
1410
  }>;
1411
+ export declare const FreeTextSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
1412
+ versionKey: false;
1413
+ toJSON: {
1414
+ virtuals: true;
1415
+ };
1416
+ toObject: {
1417
+ virtuals: true;
1418
+ };
1419
+ timestamps: true;
1420
+ id: true;
1421
+ }, {
1422
+ createdAt: NativeDate;
1423
+ updatedAt: NativeDate;
1424
+ } & {
1425
+ title: string;
1426
+ organization_id: string;
1427
+ context_id: string;
1428
+ text: string;
1429
+ editor_object: string;
1430
+ created_at?: number | null | undefined;
1431
+ updated_at?: number | null | undefined;
1432
+ description?: string | null | undefined;
1433
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
1434
+ createdAt: NativeDate;
1435
+ updatedAt: NativeDate;
1436
+ } & {
1437
+ title: string;
1438
+ organization_id: string;
1439
+ context_id: string;
1440
+ text: string;
1441
+ editor_object: string;
1442
+ created_at?: number | null | undefined;
1443
+ updated_at?: number | null | undefined;
1444
+ description?: string | null | undefined;
1445
+ }>, {}> & import("mongoose").FlatRecord<{
1446
+ createdAt: NativeDate;
1447
+ updatedAt: NativeDate;
1448
+ } & {
1449
+ title: string;
1450
+ organization_id: string;
1451
+ context_id: string;
1452
+ text: string;
1453
+ editor_object: string;
1454
+ created_at?: number | null | undefined;
1455
+ updated_at?: number | null | undefined;
1456
+ description?: string | null | undefined;
1457
+ }> & {
1458
+ _id: import("mongoose").Types.ObjectId;
1459
+ } & {
1460
+ __v: number;
1461
+ }>;
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.MessageSchema = exports.ThreadSchema = exports.FullFileTextSchema = exports.PreDefinedQuerySchema = exports.ChunkSchema = exports.ContextSchema = exports.AgentSchema = exports.UserSchema = exports.OrganizationSchema = void 0;
17
+ exports.FreeTextSchema = exports.MessageSchema = exports.ThreadSchema = exports.FullFileTextSchema = exports.PreDefinedQuerySchema = exports.ChunkSchema = exports.ContextSchema = exports.AgentSchema = exports.UserSchema = exports.OrganizationSchema = void 0;
18
18
  // Export types for consumers
19
19
  __exportStar(require("./types"), exports);
20
20
  const mongoose_1 = require("mongoose");
@@ -96,6 +96,10 @@ exports.ContextSchema = new mongoose_1.Schema({
96
96
  file_gcs_url: { type: String },
97
97
  file_name: { type: String },
98
98
  type: { type: String, minlength: 1, maxlength: 100 },
99
+ is_free_text: { type: Boolean, default: false },
100
+ free_text_editor_object: { type: String },
101
+ free_text_description: { type: String },
102
+ free_text_content: { type: String },
99
103
  size: { type: Number },
100
104
  tokens: { type: Number },
101
105
  is_active: { type: Boolean, default: true },
@@ -237,3 +241,20 @@ exports.MessageSchema = new mongoose_1.Schema({
237
241
  id: true,
238
242
  // encryptionType: 'csfle',
239
243
  });
244
+ exports.FreeTextSchema = new mongoose_1.Schema({
245
+ organization_id: { type: String, required: true },
246
+ context_id: { type: String, required: true },
247
+ title: { type: String, required: true },
248
+ description: { type: String },
249
+ editor_object: { type: String, required: true },
250
+ text: { type: String, required: true },
251
+ created_at: { type: Number },
252
+ updated_at: { type: Number },
253
+ }, {
254
+ versionKey: false,
255
+ toJSON: { virtuals: true },
256
+ toObject: { virtuals: true },
257
+ timestamps: true,
258
+ id: true,
259
+ // encryptionType: 'csfle',
260
+ });
package/dist/types.d.ts CHANGED
@@ -108,6 +108,10 @@ export declare const zodContextSchema: z.ZodObject<{
108
108
  file_gcs_url: z.ZodOptional<z.ZodString>;
109
109
  file_name: z.ZodOptional<z.ZodString>;
110
110
  type: z.ZodOptional<z.ZodString>;
111
+ is_free_text: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
112
+ free_text_editor_object: z.ZodOptional<z.ZodString>;
113
+ free_text_description: z.ZodOptional<z.ZodString>;
114
+ free_text_content: z.ZodOptional<z.ZodString>;
111
115
  size: z.ZodOptional<z.ZodNumber>;
112
116
  tokens: z.ZodOptional<z.ZodNumber>;
113
117
  is_active: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
@@ -143,6 +147,10 @@ export declare const zodContextSchema: z.ZodObject<{
143
147
  file_url?: string | undefined;
144
148
  file_gcs_url?: string | undefined;
145
149
  file_name?: string | undefined;
150
+ is_free_text?: boolean | undefined;
151
+ free_text_editor_object?: string | undefined;
152
+ free_text_description?: string | undefined;
153
+ free_text_content?: string | undefined;
146
154
  size?: number | undefined;
147
155
  tokens?: number | undefined;
148
156
  is_active?: boolean | undefined;
@@ -168,6 +176,10 @@ export declare const zodContextSchema: z.ZodObject<{
168
176
  file_url?: string | undefined;
169
177
  file_gcs_url?: string | undefined;
170
178
  file_name?: string | undefined;
179
+ is_free_text?: boolean | undefined;
180
+ free_text_editor_object?: string | undefined;
181
+ free_text_description?: string | undefined;
182
+ free_text_content?: string | undefined;
171
183
  size?: number | undefined;
172
184
  tokens?: number | undefined;
173
185
  is_active?: boolean | undefined;
@@ -379,6 +391,10 @@ export declare const zodPreDefinedQuerySchema: z.ZodObject<{
379
391
  file_gcs_url: z.ZodOptional<z.ZodOptional<z.ZodString>>;
380
392
  file_name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
381
393
  type: z.ZodOptional<z.ZodOptional<z.ZodString>>;
394
+ is_free_text: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodBoolean>>>;
395
+ free_text_editor_object: z.ZodOptional<z.ZodOptional<z.ZodString>>;
396
+ free_text_description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
397
+ free_text_content: z.ZodOptional<z.ZodOptional<z.ZodString>>;
382
398
  size: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
383
399
  tokens: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
384
400
  is_active: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodBoolean>>>;
@@ -414,6 +430,10 @@ export declare const zodPreDefinedQuerySchema: z.ZodObject<{
414
430
  file_url?: string | undefined;
415
431
  file_gcs_url?: string | undefined;
416
432
  file_name?: string | undefined;
433
+ is_free_text?: boolean | undefined;
434
+ free_text_editor_object?: string | undefined;
435
+ free_text_description?: string | undefined;
436
+ free_text_content?: string | undefined;
417
437
  size?: number | undefined;
418
438
  tokens?: number | undefined;
419
439
  is_active?: boolean | undefined;
@@ -439,6 +459,10 @@ export declare const zodPreDefinedQuerySchema: z.ZodObject<{
439
459
  file_url?: string | undefined;
440
460
  file_gcs_url?: string | undefined;
441
461
  file_name?: string | undefined;
462
+ is_free_text?: boolean | undefined;
463
+ free_text_editor_object?: string | undefined;
464
+ free_text_description?: string | undefined;
465
+ free_text_content?: string | undefined;
442
466
  size?: number | undefined;
443
467
  tokens?: number | undefined;
444
468
  is_active?: boolean | undefined;
@@ -496,6 +520,10 @@ export declare const zodPreDefinedQuerySchema: z.ZodObject<{
496
520
  file_url?: string | undefined;
497
521
  file_gcs_url?: string | undefined;
498
522
  file_name?: string | undefined;
523
+ is_free_text?: boolean | undefined;
524
+ free_text_editor_object?: string | undefined;
525
+ free_text_description?: string | undefined;
526
+ free_text_content?: string | undefined;
499
527
  size?: number | undefined;
500
528
  tokens?: number | undefined;
501
529
  is_active?: boolean | undefined;
@@ -540,6 +568,10 @@ export declare const zodPreDefinedQuerySchema: z.ZodObject<{
540
568
  file_url?: string | undefined;
541
569
  file_gcs_url?: string | undefined;
542
570
  file_name?: string | undefined;
571
+ is_free_text?: boolean | undefined;
572
+ free_text_editor_object?: string | undefined;
573
+ free_text_description?: string | undefined;
574
+ free_text_content?: string | undefined;
543
575
  size?: number | undefined;
544
576
  tokens?: number | undefined;
545
577
  is_active?: boolean | undefined;
@@ -575,6 +607,10 @@ export declare const zodQuerySchema: z.ZodObject<{
575
607
  file_gcs_url: z.ZodOptional<z.ZodOptional<z.ZodString>>;
576
608
  file_name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
577
609
  type: z.ZodOptional<z.ZodOptional<z.ZodString>>;
610
+ is_free_text: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodBoolean>>>;
611
+ free_text_editor_object: z.ZodOptional<z.ZodOptional<z.ZodString>>;
612
+ free_text_description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
613
+ free_text_content: z.ZodOptional<z.ZodOptional<z.ZodString>>;
578
614
  size: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
579
615
  tokens: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
580
616
  is_active: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodBoolean>>>;
@@ -610,6 +646,10 @@ export declare const zodQuerySchema: z.ZodObject<{
610
646
  file_url?: string | undefined;
611
647
  file_gcs_url?: string | undefined;
612
648
  file_name?: string | undefined;
649
+ is_free_text?: boolean | undefined;
650
+ free_text_editor_object?: string | undefined;
651
+ free_text_description?: string | undefined;
652
+ free_text_content?: string | undefined;
613
653
  size?: number | undefined;
614
654
  tokens?: number | undefined;
615
655
  is_active?: boolean | undefined;
@@ -635,6 +675,10 @@ export declare const zodQuerySchema: z.ZodObject<{
635
675
  file_url?: string | undefined;
636
676
  file_gcs_url?: string | undefined;
637
677
  file_name?: string | undefined;
678
+ is_free_text?: boolean | undefined;
679
+ free_text_editor_object?: string | undefined;
680
+ free_text_description?: string | undefined;
681
+ free_text_content?: string | undefined;
638
682
  size?: number | undefined;
639
683
  tokens?: number | undefined;
640
684
  is_active?: boolean | undefined;
@@ -693,6 +737,10 @@ export declare const zodQuerySchema: z.ZodObject<{
693
737
  file_url?: string | undefined;
694
738
  file_gcs_url?: string | undefined;
695
739
  file_name?: string | undefined;
740
+ is_free_text?: boolean | undefined;
741
+ free_text_editor_object?: string | undefined;
742
+ free_text_description?: string | undefined;
743
+ free_text_content?: string | undefined;
696
744
  size?: number | undefined;
697
745
  tokens?: number | undefined;
698
746
  is_active?: boolean | undefined;
@@ -733,6 +781,10 @@ export declare const zodQuerySchema: z.ZodObject<{
733
781
  file_url?: string | undefined;
734
782
  file_gcs_url?: string | undefined;
735
783
  file_name?: string | undefined;
784
+ is_free_text?: boolean | undefined;
785
+ free_text_editor_object?: string | undefined;
786
+ free_text_description?: string | undefined;
787
+ free_text_content?: string | undefined;
736
788
  size?: number | undefined;
737
789
  tokens?: number | undefined;
738
790
  is_active?: boolean | undefined;
@@ -850,6 +902,34 @@ export declare const zodMessageSchema: z.ZodObject<{
850
902
  is_favorite?: boolean | undefined;
851
903
  like?: "liked" | "disliked" | "waiting_response" | undefined;
852
904
  }>;
905
+ export declare const zodFreeTextSchema: z.ZodObject<{
906
+ organization_id: z.ZodString;
907
+ context_id: z.ZodString;
908
+ title: z.ZodString;
909
+ description: z.ZodOptional<z.ZodString>;
910
+ editor_object: z.ZodString;
911
+ text: z.ZodString;
912
+ created_at: z.ZodOptional<z.ZodNumber>;
913
+ updated_at: z.ZodOptional<z.ZodNumber>;
914
+ }, "strip", z.ZodTypeAny, {
915
+ title: string;
916
+ organization_id: string;
917
+ context_id: string;
918
+ text: string;
919
+ editor_object: string;
920
+ created_at?: number | undefined;
921
+ updated_at?: number | undefined;
922
+ description?: string | undefined;
923
+ }, {
924
+ title: string;
925
+ organization_id: string;
926
+ context_id: string;
927
+ text: string;
928
+ editor_object: string;
929
+ created_at?: number | undefined;
930
+ updated_at?: number | undefined;
931
+ description?: string | undefined;
932
+ }>;
853
933
  export type EventAttributeType = {
854
934
  http_request: {
855
935
  client_ip?: string;
package/dist/types.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QueuesList = exports.FileType = exports.zodMessageSchema = exports.zodThreadSchema = exports.zodQuerySchema = exports.zodPreDefinedQuerySchema = exports.zodFullTextSchema = exports.zodChunkSchema = exports.zodAgentSchema = exports.zodContextSchema = exports.zodUserSchema = exports.zodOrganizationSchema = exports.zodClerkMinimalUserSchema = exports.userRoles = exports.modelsList = void 0;
3
+ exports.QueuesList = exports.FileType = exports.zodFreeTextSchema = exports.zodMessageSchema = exports.zodThreadSchema = exports.zodQuerySchema = exports.zodPreDefinedQuerySchema = exports.zodFullTextSchema = exports.zodChunkSchema = exports.zodAgentSchema = exports.zodContextSchema = exports.zodUserSchema = exports.zodOrganizationSchema = exports.zodClerkMinimalUserSchema = exports.userRoles = exports.modelsList = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.modelsList = [
6
6
  'gemini-2.5-flash-lite',
@@ -59,6 +59,10 @@ exports.zodContextSchema = zod_1.z.object({
59
59
  file_gcs_url: zod_1.z.string().optional(),
60
60
  file_name: zod_1.z.string().optional(),
61
61
  type: zod_1.z.string().min(1).max(100).optional(),
62
+ is_free_text: zod_1.z.boolean().default(false).optional(),
63
+ free_text_editor_object: zod_1.z.string().optional(),
64
+ free_text_description: zod_1.z.string().optional(),
65
+ free_text_content: zod_1.z.string().optional(),
62
66
  size: zod_1.z.number().optional(),
63
67
  tokens: zod_1.z.number().optional(),
64
68
  is_active: zod_1.z.boolean().default(true).optional(),
@@ -187,6 +191,16 @@ exports.zodMessageSchema = zod_1.z.object({
187
191
  updated_at: zod_1.z.number().optional(),
188
192
  metadata: zod_1.z.object({}).optional(),
189
193
  });
194
+ exports.zodFreeTextSchema = zod_1.z.object({
195
+ organization_id: zod_1.z.string(),
196
+ context_id: zod_1.z.string(),
197
+ title: zod_1.z.string(),
198
+ description: zod_1.z.string().optional(),
199
+ editor_object: zod_1.z.string(),
200
+ text: zod_1.z.string(),
201
+ created_at: zod_1.z.number().optional(),
202
+ updated_at: zod_1.z.number().optional(),
203
+ });
190
204
  var FileType;
191
205
  (function (FileType) {
192
206
  FileType["PDF"] = "application/pdf";
package/index.ts CHANGED
@@ -94,6 +94,10 @@ export const ContextSchema = new Schema(
94
94
  file_gcs_url: { type: String },
95
95
  file_name: { type: String },
96
96
  type: { type: String, minlength: 1, maxlength: 100 },
97
+ is_free_text: { type: Boolean, default: false },
98
+ free_text_editor_object: { type: String },
99
+ free_text_description: { type: String },
100
+ free_text_content: { type: String },
97
101
  size: { type: Number },
98
102
  tokens: { type: Number },
99
103
  is_active: { type: Boolean, default: true },
@@ -257,3 +261,24 @@ export const MessageSchema = new Schema(
257
261
  // encryptionType: 'csfle',
258
262
  },
259
263
  );
264
+
265
+ export const FreeTextSchema = new Schema(
266
+ {
267
+ organization_id: { type: String, required: true },
268
+ context_id: { type: String, required: true },
269
+ title: { type: String, required: true },
270
+ description: { type: String },
271
+ editor_object: { type: String, required: true },
272
+ text: { type: String, required: true },
273
+ created_at: { type: Number },
274
+ updated_at: { type: Number },
275
+ },
276
+ {
277
+ versionKey: false,
278
+ toJSON: { virtuals: true },
279
+ toObject: { virtuals: true },
280
+ timestamps: true,
281
+ id: true,
282
+ // encryptionType: 'csfle',
283
+ },
284
+ );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chatifai",
3
- "version": "1.0.46",
3
+ "version": "1.0.48",
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
@@ -62,6 +62,10 @@ export const zodContextSchema = z.object({
62
62
  file_gcs_url: z.string().optional(),
63
63
  file_name: z.string().optional(),
64
64
  type: z.string().min(1).max(100).optional(),
65
+ is_free_text: z.boolean().default(false).optional(),
66
+ free_text_editor_object: z.string().optional(),
67
+ free_text_description: z.string().optional(),
68
+ free_text_content: z.string().optional(),
65
69
  size: z.number().optional(),
66
70
  tokens: z.number().optional(),
67
71
  is_active: z.boolean().default(true).optional(),
@@ -198,6 +202,17 @@ export const zodMessageSchema = z.object({
198
202
  metadata: z.object({}).optional(),
199
203
  });
200
204
 
205
+ export const zodFreeTextSchema = z.object({
206
+ organization_id: z.string(),
207
+ context_id: z.string(),
208
+ title: z.string(),
209
+ description: z.string().optional(),
210
+ editor_object: z.string(),
211
+ text: z.string(),
212
+ created_at: z.number().optional(),
213
+ updated_at: z.number().optional(),
214
+ });
215
+
201
216
  export type EventAttributeType = {
202
217
  http_request: {
203
218
  client_ip?: string;
@@ -207,7 +222,7 @@ export type EventAttributeType = {
207
222
 
208
223
  /**
209
224
  * Used for queue message bodies
210
- * Used in context processing queue
225
+ * Used in context processing queue
211
226
  */
212
227
  export type QueueMessageBodyType<T> = {
213
228
  organization_id: string;