chatifai 1.0.7 → 1.0.9

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.js CHANGED
@@ -72,11 +72,14 @@ exports.AgentSchema = Schema({
72
72
  });
73
73
  exports.ContextSchema = Schema({
74
74
  organization_id: { type: String },
75
+ file_id: { type: String },
75
76
  title: { type: String, required: true, minlength: 1, maxlength: 100 },
76
77
  description: { type: String, minlength: 1, maxlength: 500 },
77
- document_url: { type: String },
78
+ file_url: { type: String },
78
79
  type: { type: String, minlength: 1, maxlength: 100 },
79
- content: { type: String, required: true, minlength: 1 },
80
+ size: { type: Number },
81
+ tokens: { type: Number },
82
+ is_active: { type: Boolean, default: true },
80
83
  created_at: { type: Number },
81
84
  updated_at: { type: Number },
82
85
  });
package/dist/types.d.ts CHANGED
@@ -81,6 +81,46 @@ export declare const zodUserSchema: z.ZodObject<{
81
81
  avatar?: string | undefined;
82
82
  user_role?: "admin" | "member" | "client" | undefined;
83
83
  }>;
84
+ export declare const zodContextSchema: z.ZodObject<{
85
+ _id: z.ZodOptional<z.ZodString>;
86
+ organization_id: z.ZodOptional<z.ZodString>;
87
+ file_id: z.ZodOptional<z.ZodString>;
88
+ title: z.ZodString;
89
+ description: z.ZodOptional<z.ZodString>;
90
+ file_url: z.ZodOptional<z.ZodString>;
91
+ type: z.ZodOptional<z.ZodString>;
92
+ size: z.ZodOptional<z.ZodNumber>;
93
+ tokens: z.ZodOptional<z.ZodNumber>;
94
+ is_active: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
95
+ created_at: z.ZodOptional<z.ZodNumber>;
96
+ updated_at: z.ZodOptional<z.ZodNumber>;
97
+ }, "strip", z.ZodTypeAny, {
98
+ title: string;
99
+ _id?: string | undefined;
100
+ type?: string | undefined;
101
+ created_at?: number | undefined;
102
+ updated_at?: number | undefined;
103
+ organization_id?: string | undefined;
104
+ file_id?: string | undefined;
105
+ description?: string | undefined;
106
+ file_url?: string | undefined;
107
+ size?: number | undefined;
108
+ tokens?: number | undefined;
109
+ is_active?: boolean | undefined;
110
+ }, {
111
+ title: string;
112
+ _id?: string | undefined;
113
+ type?: string | undefined;
114
+ created_at?: number | undefined;
115
+ updated_at?: number | undefined;
116
+ organization_id?: string | undefined;
117
+ file_id?: string | undefined;
118
+ description?: string | undefined;
119
+ file_url?: string | undefined;
120
+ size?: number | undefined;
121
+ tokens?: number | undefined;
122
+ is_active?: boolean | undefined;
123
+ }>;
84
124
  export declare const zodAgentSchema: z.ZodObject<{
85
125
  _id: z.ZodOptional<z.ZodString>;
86
126
  organization_id: z.ZodOptional<z.ZodString>;
@@ -124,37 +164,6 @@ export declare const zodAgentSchema: z.ZodObject<{
124
164
  message_count_limit?: number | undefined;
125
165
  is_editable?: boolean | undefined;
126
166
  }>;
127
- export declare const zodContextSchema: z.ZodObject<{
128
- _id: z.ZodOptional<z.ZodString>;
129
- organization_id: z.ZodOptional<z.ZodString>;
130
- title: z.ZodString;
131
- description: z.ZodOptional<z.ZodString>;
132
- document_url: z.ZodOptional<z.ZodString>;
133
- type: z.ZodOptional<z.ZodString>;
134
- content: z.ZodOptional<z.ZodString>;
135
- created_at: z.ZodOptional<z.ZodNumber>;
136
- updated_at: z.ZodOptional<z.ZodNumber>;
137
- }, "strip", z.ZodTypeAny, {
138
- title: string;
139
- _id?: string | undefined;
140
- type?: string | undefined;
141
- created_at?: number | undefined;
142
- updated_at?: number | undefined;
143
- organization_id?: string | undefined;
144
- description?: string | undefined;
145
- document_url?: string | undefined;
146
- content?: string | undefined;
147
- }, {
148
- title: string;
149
- _id?: string | undefined;
150
- type?: string | undefined;
151
- created_at?: number | undefined;
152
- updated_at?: number | undefined;
153
- organization_id?: string | undefined;
154
- description?: string | undefined;
155
- document_url?: string | undefined;
156
- content?: string | undefined;
157
- }>;
158
167
  export declare const zodQuerySchema: z.ZodObject<{
159
168
  _id: z.ZodOptional<z.ZodString>;
160
169
  organization_id: z.ZodOptional<z.ZodString>;
package/dist/types.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zodQuerySchema = exports.zodContextSchema = exports.zodAgentSchema = exports.zodUserSchema = exports.zodOrganizationSchema = exports.userRoles = exports.modelsList = void 0;
3
+ exports.zodQuerySchema = exports.zodAgentSchema = exports.zodContextSchema = exports.zodUserSchema = exports.zodOrganizationSchema = exports.userRoles = exports.modelsList = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.modelsList = [
6
6
  'gemini-2.5-flash-lite',
@@ -41,6 +41,20 @@ exports.zodUserSchema = zod_1.z.object({
41
41
  created_at: zod_1.z.number().optional(),
42
42
  updated_at: zod_1.z.number().optional(),
43
43
  });
44
+ exports.zodContextSchema = zod_1.z.object({
45
+ _id: zod_1.z.string().optional(),
46
+ organization_id: zod_1.z.string().optional(),
47
+ file_id: zod_1.z.string().optional(),
48
+ title: zod_1.z.string().min(1).max(100),
49
+ description: zod_1.z.string().min(1).max(500).optional(),
50
+ file_url: zod_1.z.string().optional(),
51
+ type: zod_1.z.string().min(1).max(100).optional(),
52
+ size: zod_1.z.number().optional(),
53
+ tokens: zod_1.z.number().optional(),
54
+ is_active: zod_1.z.boolean().default(true).optional(),
55
+ created_at: zod_1.z.number().optional(),
56
+ updated_at: zod_1.z.number().optional(),
57
+ });
44
58
  exports.zodAgentSchema = zod_1.z.object({
45
59
  _id: zod_1.z.string().optional(),
46
60
  organization_id: zod_1.z.string().optional(),
@@ -56,17 +70,6 @@ exports.zodAgentSchema = zod_1.z.object({
56
70
  created_at: zod_1.z.number().optional(),
57
71
  updated_at: zod_1.z.number().optional(),
58
72
  });
59
- exports.zodContextSchema = zod_1.z.object({
60
- _id: zod_1.z.string().optional(),
61
- organization_id: zod_1.z.string().optional(),
62
- title: zod_1.z.string().min(1).max(100),
63
- description: zod_1.z.string().min(1).max(500).optional(),
64
- document_url: zod_1.z.string().optional(),
65
- type: zod_1.z.string().min(1).max(100).optional(),
66
- content: zod_1.z.string().min(1).optional(),
67
- created_at: zod_1.z.number().optional(),
68
- updated_at: zod_1.z.number().optional(),
69
- });
70
73
  exports.zodQuerySchema = zod_1.z.object({
71
74
  _id: zod_1.z.string().optional(),
72
75
  organization_id: zod_1.z.string().optional(),
package/index.ts CHANGED
@@ -66,11 +66,14 @@ export const AgentSchema = Schema({
66
66
 
67
67
  export const ContextSchema = Schema({
68
68
  organization_id: { type: String },
69
+ file_id: { type: String },
69
70
  title: { type: String, required: true, minlength: 1, maxlength: 100 },
70
71
  description: { type: String, minlength: 1, maxlength: 500 },
71
- document_url: { type: String },
72
+ file_url: { type: String },
72
73
  type: { type: String, minlength: 1, maxlength: 100 },
73
- content: { type: String, required: true, minlength: 1 },
74
+ size: { type: Number },
75
+ tokens: { type: Number },
76
+ is_active: { type: Boolean, default: true },
74
77
  created_at: { type: Number },
75
78
  updated_at: { type: Number },
76
79
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chatifai",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
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
@@ -43,30 +43,33 @@ export const zodUserSchema = z.object({
43
43
  updated_at: z.number().optional(),
44
44
  });
45
45
 
46
- export const zodAgentSchema = z.object({
46
+ export const zodContextSchema = z.object({
47
47
  _id: z.string().optional(),
48
48
  organization_id: z.string().optional(),
49
+ file_id: z.string().optional(),
49
50
  title: z.string().min(1).max(100),
50
51
  description: z.string().min(1).max(500).optional(),
51
- instructions: z.string().min(1).max(1000).optional(),
52
- model: z.enum(modelsList),
53
- temperature: z.number().min(0).max(1).optional(),
54
- max_tokens: z.number().min(1).max(4000).optional(),
55
- elevenlabs_voice_id: z.string().min(1).max(100).optional(),
56
- message_count_limit: z.number().min(1).optional(),
57
- is_editable: z.boolean().default(true).optional(),
52
+ file_url: z.string().optional(),
53
+ type: z.string().min(1).max(100).optional(),
54
+ size: z.number().optional(),
55
+ tokens: z.number().optional(),
56
+ is_active: z.boolean().default(true).optional(),
58
57
  created_at: z.number().optional(),
59
58
  updated_at: z.number().optional(),
60
59
  });
61
60
 
62
- export const zodContextSchema = z.object({
61
+ export const zodAgentSchema = z.object({
63
62
  _id: z.string().optional(),
64
63
  organization_id: z.string().optional(),
65
64
  title: z.string().min(1).max(100),
66
65
  description: z.string().min(1).max(500).optional(),
67
- document_url: z.string().optional(),
68
- type: z.string().min(1).max(100).optional(),
69
- content: z.string().min(1).optional(),
66
+ instructions: z.string().min(1).max(1000).optional(),
67
+ model: z.enum(modelsList),
68
+ temperature: z.number().min(0).max(1).optional(),
69
+ max_tokens: z.number().min(1).max(4000).optional(),
70
+ elevenlabs_voice_id: z.string().min(1).max(100).optional(),
71
+ message_count_limit: z.number().min(1).optional(),
72
+ is_editable: z.boolean().default(true).optional(),
70
73
  created_at: z.number().optional(),
71
74
  updated_at: z.number().optional(),
72
75
  });