chatifai 1.0.7 → 1.0.8

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,13 @@ 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 },
80
82
  created_at: { type: Number },
81
83
  updated_at: { type: Number },
82
84
  });
package/dist/types.d.ts CHANGED
@@ -81,6 +81,43 @@ 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
+ created_at: z.ZodOptional<z.ZodNumber>;
95
+ updated_at: z.ZodOptional<z.ZodNumber>;
96
+ }, "strip", z.ZodTypeAny, {
97
+ title: string;
98
+ _id?: string | undefined;
99
+ type?: string | undefined;
100
+ created_at?: number | undefined;
101
+ updated_at?: number | undefined;
102
+ organization_id?: string | undefined;
103
+ file_id?: string | undefined;
104
+ description?: string | undefined;
105
+ file_url?: string | undefined;
106
+ size?: number | undefined;
107
+ tokens?: number | undefined;
108
+ }, {
109
+ title: string;
110
+ _id?: string | undefined;
111
+ type?: string | undefined;
112
+ created_at?: number | undefined;
113
+ updated_at?: number | undefined;
114
+ organization_id?: string | undefined;
115
+ file_id?: string | undefined;
116
+ description?: string | undefined;
117
+ file_url?: string | undefined;
118
+ size?: number | undefined;
119
+ tokens?: number | undefined;
120
+ }>;
84
121
  export declare const zodAgentSchema: z.ZodObject<{
85
122
  _id: z.ZodOptional<z.ZodString>;
86
123
  organization_id: z.ZodOptional<z.ZodString>;
@@ -124,37 +161,6 @@ export declare const zodAgentSchema: z.ZodObject<{
124
161
  message_count_limit?: number | undefined;
125
162
  is_editable?: boolean | undefined;
126
163
  }>;
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
164
  export declare const zodQuerySchema: z.ZodObject<{
159
165
  _id: z.ZodOptional<z.ZodString>;
160
166
  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,19 @@ 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
+ created_at: zod_1.z.number().optional(),
55
+ updated_at: zod_1.z.number().optional(),
56
+ });
44
57
  exports.zodAgentSchema = zod_1.z.object({
45
58
  _id: zod_1.z.string().optional(),
46
59
  organization_id: zod_1.z.string().optional(),
@@ -56,17 +69,6 @@ exports.zodAgentSchema = zod_1.z.object({
56
69
  created_at: zod_1.z.number().optional(),
57
70
  updated_at: zod_1.z.number().optional(),
58
71
  });
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
72
  exports.zodQuerySchema = zod_1.z.object({
71
73
  _id: zod_1.z.string().optional(),
72
74
  organization_id: zod_1.z.string().optional(),
package/index.ts CHANGED
@@ -66,11 +66,13 @@ 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 },
74
76
  created_at: { type: Number },
75
77
  updated_at: { type: Number },
76
78
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chatifai",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
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,32 @@ 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(),
58
56
  created_at: z.number().optional(),
59
57
  updated_at: z.number().optional(),
60
58
  });
61
59
 
62
- export const zodContextSchema = z.object({
60
+ export const zodAgentSchema = z.object({
63
61
  _id: z.string().optional(),
64
62
  organization_id: z.string().optional(),
65
63
  title: z.string().min(1).max(100),
66
64
  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(),
65
+ instructions: z.string().min(1).max(1000).optional(),
66
+ model: z.enum(modelsList),
67
+ temperature: z.number().min(0).max(1).optional(),
68
+ max_tokens: z.number().min(1).max(4000).optional(),
69
+ elevenlabs_voice_id: z.string().min(1).max(100).optional(),
70
+ message_count_limit: z.number().min(1).optional(),
71
+ is_editable: z.boolean().default(true).optional(),
70
72
  created_at: z.number().optional(),
71
73
  updated_at: z.number().optional(),
72
74
  });