chatifai 1.0.33 → 1.0.35

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
@@ -160,7 +160,7 @@ export declare const AgentSchema: Schema<any, import("mongoose").Model<any, any,
160
160
  updatedAt: NativeDate;
161
161
  } & {
162
162
  title: string;
163
- model: "gemini-2.5-flash-lite" | "gemini-2.5-flash" | "gemini-2.5-pro" | "grok-4-fast-non-reasoning" | "grok-4-fast-reasoning" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano";
163
+ model: "gemini-2.5-flash-lite" | "gemini-2.5-flash" | "gemini-2.5-pro" | "grok-4-fast-non-reasoning" | "grok-4-fast-reasoning" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano" | "claude-3.7-sonnet";
164
164
  is_editable: boolean;
165
165
  created_at?: number | null | undefined;
166
166
  updated_at?: number | null | undefined;
@@ -175,7 +175,7 @@ export declare const AgentSchema: Schema<any, import("mongoose").Model<any, any,
175
175
  updatedAt: NativeDate;
176
176
  } & {
177
177
  title: string;
178
- model: "gemini-2.5-flash-lite" | "gemini-2.5-flash" | "gemini-2.5-pro" | "grok-4-fast-non-reasoning" | "grok-4-fast-reasoning" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano";
178
+ model: "gemini-2.5-flash-lite" | "gemini-2.5-flash" | "gemini-2.5-pro" | "grok-4-fast-non-reasoning" | "grok-4-fast-reasoning" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano" | "claude-3.7-sonnet";
179
179
  is_editable: boolean;
180
180
  created_at?: number | null | undefined;
181
181
  updated_at?: number | null | undefined;
@@ -190,7 +190,7 @@ export declare const AgentSchema: Schema<any, import("mongoose").Model<any, any,
190
190
  updatedAt: NativeDate;
191
191
  } & {
192
192
  title: string;
193
- model: "gemini-2.5-flash-lite" | "gemini-2.5-flash" | "gemini-2.5-pro" | "grok-4-fast-non-reasoning" | "grok-4-fast-reasoning" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano";
193
+ model: "gemini-2.5-flash-lite" | "gemini-2.5-flash" | "gemini-2.5-pro" | "grok-4-fast-non-reasoning" | "grok-4-fast-reasoning" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano" | "claude-3.7-sonnet";
194
194
  is_editable: boolean;
195
195
  created_at?: number | null | undefined;
196
196
  updated_at?: number | null | undefined;
@@ -1329,6 +1329,7 @@ export declare const MessageSchema: Schema<any, import("mongoose").Model<any, an
1329
1329
  user_id?: string | null | undefined;
1330
1330
  created_at?: number | null | undefined;
1331
1331
  updated_at?: number | null | undefined;
1332
+ metadata?: any;
1332
1333
  agent_id?: string | null | undefined;
1333
1334
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
1334
1335
  createdAt: NativeDate;
@@ -1343,6 +1344,7 @@ export declare const MessageSchema: Schema<any, import("mongoose").Model<any, an
1343
1344
  user_id?: string | null | undefined;
1344
1345
  created_at?: number | null | undefined;
1345
1346
  updated_at?: number | null | undefined;
1347
+ metadata?: any;
1346
1348
  agent_id?: string | null | undefined;
1347
1349
  }>, {}> & import("mongoose").FlatRecord<{
1348
1350
  createdAt: NativeDate;
@@ -1357,6 +1359,7 @@ export declare const MessageSchema: Schema<any, import("mongoose").Model<any, an
1357
1359
  user_id?: string | null | undefined;
1358
1360
  created_at?: number | null | undefined;
1359
1361
  updated_at?: number | null | undefined;
1362
+ metadata?: any;
1360
1363
  agent_id?: string | null | undefined;
1361
1364
  }> & {
1362
1365
  _id: import("mongoose").Types.ObjectId;
package/dist/index.js CHANGED
@@ -219,6 +219,7 @@ exports.MessageSchema = new mongoose_1.Schema({
219
219
  role: { type: String, enum: ['user', 'agent', 'system'], required: true },
220
220
  created_at: { type: Number },
221
221
  updated_at: { type: Number },
222
+ metadata: { type: Object },
222
223
  }, {
223
224
  versionKey: false,
224
225
  toJSON: { virtuals: true },
package/dist/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- export declare const modelsList: readonly ["gemini-2.5-flash-lite", "gemini-2.5-flash", "gemini-2.5-pro", "grok-4-fast-non-reasoning", "grok-4-fast-reasoning", "gpt-4.1", "gpt-4.1-mini", "gpt-4.1-nano"];
2
+ export declare const modelsList: readonly ["gemini-2.5-flash-lite", "gemini-2.5-flash", "gemini-2.5-pro", "grok-4-fast-non-reasoning", "grok-4-fast-reasoning", "gpt-4.1", "gpt-4.1-mini", "gpt-4.1-nano", "claude-3.7-sonnet"];
3
3
  export declare const userRoles: readonly ["admin", "member", "client"];
4
4
  export declare const zodClerkMinimalUserSchema: z.ZodObject<{
5
5
  user_id: z.ZodString;
@@ -26,7 +26,7 @@ export declare const zodOrganizationSchema: z.ZodObject<{
26
26
  plan: z.ZodOptional<z.ZodString>;
27
27
  active_user_limit: z.ZodOptional<z.ZodNumber>;
28
28
  documents_size_limit: z.ZodOptional<z.ZodNumber>;
29
- allowed_models: z.ZodOptional<z.ZodArray<z.ZodEnum<["gemini-2.5-flash-lite", "gemini-2.5-flash", "gemini-2.5-pro", "grok-4-fast-non-reasoning", "grok-4-fast-reasoning", "gpt-4.1", "gpt-4.1-mini", "gpt-4.1-nano"]>, "many">>;
29
+ allowed_models: z.ZodOptional<z.ZodArray<z.ZodEnum<["gemini-2.5-flash-lite", "gemini-2.5-flash", "gemini-2.5-pro", "grok-4-fast-non-reasoning", "grok-4-fast-reasoning", "gpt-4.1", "gpt-4.1-mini", "gpt-4.1-nano", "claude-3.7-sonnet"]>, "many">>;
30
30
  queries_limit: z.ZodOptional<z.ZodNumber>;
31
31
  created_at: z.ZodOptional<z.ZodNumber>;
32
32
  updated_at: z.ZodOptional<z.ZodNumber>;
@@ -39,7 +39,7 @@ export declare const zodOrganizationSchema: z.ZodObject<{
39
39
  plan?: string | undefined;
40
40
  active_user_limit?: number | undefined;
41
41
  documents_size_limit?: number | undefined;
42
- allowed_models?: ("gemini-2.5-flash-lite" | "gemini-2.5-flash" | "gemini-2.5-pro" | "grok-4-fast-non-reasoning" | "grok-4-fast-reasoning" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano")[] | undefined;
42
+ allowed_models?: ("gemini-2.5-flash-lite" | "gemini-2.5-flash" | "gemini-2.5-pro" | "grok-4-fast-non-reasoning" | "grok-4-fast-reasoning" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano" | "claude-3.7-sonnet")[] | undefined;
43
43
  queries_limit?: number | undefined;
44
44
  created_at?: number | undefined;
45
45
  updated_at?: number | undefined;
@@ -52,7 +52,7 @@ export declare const zodOrganizationSchema: z.ZodObject<{
52
52
  plan?: string | undefined;
53
53
  active_user_limit?: number | undefined;
54
54
  documents_size_limit?: number | undefined;
55
- allowed_models?: ("gemini-2.5-flash-lite" | "gemini-2.5-flash" | "gemini-2.5-pro" | "grok-4-fast-non-reasoning" | "grok-4-fast-reasoning" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano")[] | undefined;
55
+ allowed_models?: ("gemini-2.5-flash-lite" | "gemini-2.5-flash" | "gemini-2.5-pro" | "grok-4-fast-non-reasoning" | "grok-4-fast-reasoning" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano" | "claude-3.7-sonnet")[] | undefined;
56
56
  queries_limit?: number | undefined;
57
57
  created_at?: number | undefined;
58
58
  updated_at?: number | undefined;
@@ -181,7 +181,7 @@ export declare const zodAgentSchema: z.ZodObject<{
181
181
  title: z.ZodString;
182
182
  description: z.ZodOptional<z.ZodString>;
183
183
  instructions: z.ZodString;
184
- model: z.ZodEnum<["gemini-2.5-flash-lite", "gemini-2.5-flash", "gemini-2.5-pro", "grok-4-fast-non-reasoning", "grok-4-fast-reasoning", "gpt-4.1", "gpt-4.1-mini", "gpt-4.1-nano"]>;
184
+ model: z.ZodEnum<["gemini-2.5-flash-lite", "gemini-2.5-flash", "gemini-2.5-pro", "grok-4-fast-non-reasoning", "grok-4-fast-reasoning", "gpt-4.1", "gpt-4.1-mini", "gpt-4.1-nano", "claude-3.7-sonnet"]>;
185
185
  temperature: z.ZodOptional<z.ZodNumber>;
186
186
  elevenlabs_voice_id: z.ZodOptional<z.ZodString>;
187
187
  message_count_limit: z.ZodOptional<z.ZodNumber>;
@@ -191,7 +191,7 @@ export declare const zodAgentSchema: z.ZodObject<{
191
191
  }, "strip", z.ZodTypeAny, {
192
192
  title: string;
193
193
  instructions: string;
194
- model: "gemini-2.5-flash-lite" | "gemini-2.5-flash" | "gemini-2.5-pro" | "grok-4-fast-non-reasoning" | "grok-4-fast-reasoning" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano";
194
+ model: "gemini-2.5-flash-lite" | "gemini-2.5-flash" | "gemini-2.5-pro" | "grok-4-fast-non-reasoning" | "grok-4-fast-reasoning" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano" | "claude-3.7-sonnet";
195
195
  _id?: string | undefined;
196
196
  created_at?: number | undefined;
197
197
  updated_at?: number | undefined;
@@ -204,7 +204,7 @@ export declare const zodAgentSchema: z.ZodObject<{
204
204
  }, {
205
205
  title: string;
206
206
  instructions: string;
207
- model: "gemini-2.5-flash-lite" | "gemini-2.5-flash" | "gemini-2.5-pro" | "grok-4-fast-non-reasoning" | "grok-4-fast-reasoning" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano";
207
+ model: "gemini-2.5-flash-lite" | "gemini-2.5-flash" | "gemini-2.5-pro" | "grok-4-fast-non-reasoning" | "grok-4-fast-reasoning" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano" | "claude-3.7-sonnet";
208
208
  _id?: string | undefined;
209
209
  created_at?: number | undefined;
210
210
  updated_at?: number | undefined;
@@ -772,6 +772,7 @@ export declare const zodMessageSchema: z.ZodObject<{
772
772
  like: z.ZodOptional<z.ZodEnum<["liked", "disliked", "waiting_response"]>>;
773
773
  created_at: z.ZodOptional<z.ZodNumber>;
774
774
  updated_at: z.ZodOptional<z.ZodNumber>;
775
+ metadata: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
775
776
  }, "strip", z.ZodTypeAny, {
776
777
  organization_id: string;
777
778
  thread_id: string;
@@ -781,6 +782,7 @@ export declare const zodMessageSchema: z.ZodObject<{
781
782
  _id?: string | undefined;
782
783
  created_at?: number | undefined;
783
784
  updated_at?: number | undefined;
785
+ metadata?: {} | undefined;
784
786
  agent_id?: string | undefined;
785
787
  is_favorite?: boolean | undefined;
786
788
  like?: "liked" | "disliked" | "waiting_response" | undefined;
@@ -793,6 +795,7 @@ export declare const zodMessageSchema: z.ZodObject<{
793
795
  _id?: string | undefined;
794
796
  created_at?: number | undefined;
795
797
  updated_at?: number | undefined;
798
+ metadata?: {} | undefined;
796
799
  agent_id?: string | undefined;
797
800
  is_favorite?: boolean | undefined;
798
801
  like?: "liked" | "disliked" | "waiting_response" | undefined;
package/dist/types.js CHANGED
@@ -11,6 +11,7 @@ exports.modelsList = [
11
11
  'gpt-4.1',
12
12
  'gpt-4.1-mini',
13
13
  'gpt-4.1-nano',
14
+ 'claude-3.7-sonnet',
14
15
  ];
15
16
  exports.userRoles = ['admin', 'member', 'client'];
16
17
  exports.zodClerkMinimalUserSchema = zod_1.z.object({
@@ -175,6 +176,7 @@ exports.zodMessageSchema = zod_1.z.object({
175
176
  like: zod_1.z.enum(['liked', 'disliked', 'waiting_response']).optional(),
176
177
  created_at: zod_1.z.number().optional(),
177
178
  updated_at: zod_1.z.number().optional(),
179
+ metadata: zod_1.z.object({}).optional(),
178
180
  });
179
181
  var FileType;
180
182
  (function (FileType) {
package/index.ts CHANGED
@@ -237,6 +237,7 @@ export const MessageSchema = new Schema(
237
237
  role: { type: String, enum: ['user', 'agent', 'system'], required: true },
238
238
  created_at: { type: Number },
239
239
  updated_at: { type: Number },
240
+ metadata: { type: Object },
240
241
  },
241
242
  {
242
243
  versionKey: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chatifai",
3
- "version": "1.0.33",
3
+ "version": "1.0.35",
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
@@ -9,6 +9,8 @@ export const modelsList = [
9
9
  'gpt-4.1',
10
10
  'gpt-4.1-mini',
11
11
  'gpt-4.1-nano',
12
+ 'claude-3.7-sonnet',
13
+
12
14
  ] as const;
13
15
 
14
16
  export const userRoles = ['admin', 'member', 'client'] as const;
@@ -185,6 +187,7 @@ export const zodMessageSchema = z.object({
185
187
  like: z.enum(['liked', 'disliked', 'waiting_response']).optional(), // 1 for like, -1 for dislike
186
188
  created_at: z.number().optional(),
187
189
  updated_at: z.number().optional(),
190
+ metadata: z.object({}).optional(),
188
191
  });
189
192
 
190
193
  export type EventAttributeType = {