chatifai 1.0.0 → 1.0.1

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
@@ -40,6 +40,8 @@ exports.OrganizationSchema = Schema({
40
40
  documents_size_limit: { type: Number, min: 1 },
41
41
  allowed_models: { type: [String], enum: types_1.modelsList },
42
42
  queries_limit: { type: Number, min: 1 },
43
+ created_at: { type: Number },
44
+ updated_at: { type: Number },
43
45
  });
44
46
  exports.UserSchema = Schema({
45
47
  organization_id: { type: String, required: true },
@@ -51,6 +53,8 @@ exports.UserSchema = Schema({
51
53
  notes: { type: String, maxlength: 500 },
52
54
  avatar: { type: String },
53
55
  user_role: { type: String, enum: types_1.userRoles, required: true },
56
+ created_at: { type: Number },
57
+ updated_at: { type: Number },
54
58
  });
55
59
  exports.AgentSchema = Schema({
56
60
  organization_id: { type: String },
@@ -63,6 +67,8 @@ exports.AgentSchema = Schema({
63
67
  elevenlabs_voice_id: { type: String, minlength: 1, maxlength: 100 },
64
68
  message_count_limit: { type: Number, min: 1 },
65
69
  is_editable: { type: Boolean, default: true },
70
+ created_at: { type: Number },
71
+ updated_at: { type: Number },
66
72
  });
67
73
  exports.ContextSchema = Schema({
68
74
  organization_id: { type: String },
@@ -71,6 +77,8 @@ exports.ContextSchema = Schema({
71
77
  document_url: { type: String },
72
78
  type: { type: String, minlength: 1, maxlength: 100 },
73
79
  content: { type: String, required: true, minlength: 1 },
80
+ created_at: { type: Number },
81
+ updated_at: { type: Number },
74
82
  });
75
83
  exports.QuerySchema = Schema({
76
84
  organization_id: { type: String },
@@ -79,4 +87,6 @@ exports.QuerySchema = Schema({
79
87
  context_ids: { type: [String] },
80
88
  status: { type: String, enum: ['active', 'inactive', 'archived'], default: 'active', required: true },
81
89
  users_ids: { type: [String] },
90
+ created_at: { type: Number },
91
+ updated_at: { type: Number },
82
92
  });
package/dist/types.d.ts CHANGED
@@ -12,6 +12,8 @@ export declare const zodOrganizationSchema: z.ZodObject<{
12
12
  documents_size_limit: z.ZodOptional<z.ZodNumber>;
13
13
  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">>;
14
14
  queries_limit: z.ZodOptional<z.ZodNumber>;
15
+ created_at: z.ZodOptional<z.ZodNumber>;
16
+ updated_at: z.ZodOptional<z.ZodNumber>;
15
17
  }, "strip", z.ZodTypeAny, {
16
18
  clerk_organization_id: string;
17
19
  title: string;
@@ -23,6 +25,8 @@ export declare const zodOrganizationSchema: z.ZodObject<{
23
25
  documents_size_limit?: number | undefined;
24
26
  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;
25
27
  queries_limit?: number | undefined;
28
+ created_at?: number | undefined;
29
+ updated_at?: number | undefined;
26
30
  }, {
27
31
  clerk_organization_id: string;
28
32
  title: string;
@@ -34,6 +38,8 @@ export declare const zodOrganizationSchema: z.ZodObject<{
34
38
  documents_size_limit?: number | undefined;
35
39
  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;
36
40
  queries_limit?: number | undefined;
41
+ created_at?: number | undefined;
42
+ updated_at?: number | undefined;
37
43
  }>;
38
44
  export declare const zodUserSchema: z.ZodObject<{
39
45
  _id: z.ZodOptional<z.ZodString>;
@@ -46,11 +52,15 @@ export declare const zodUserSchema: z.ZodObject<{
46
52
  notes: z.ZodOptional<z.ZodString>;
47
53
  avatar: z.ZodOptional<z.ZodString>;
48
54
  user_role: z.ZodOptional<z.ZodDefault<z.ZodEnum<["admin", "member", "client"]>>>;
55
+ created_at: z.ZodOptional<z.ZodNumber>;
56
+ updated_at: z.ZodOptional<z.ZodNumber>;
49
57
  }, "strip", z.ZodTypeAny, {
50
58
  organization_id: string;
51
59
  clerk_user_id: string;
52
60
  email: string;
53
61
  _id?: string | undefined;
62
+ created_at?: number | undefined;
63
+ updated_at?: number | undefined;
54
64
  first_name?: string | undefined;
55
65
  last_name?: string | undefined;
56
66
  active_until?: number | undefined;
@@ -62,6 +72,8 @@ export declare const zodUserSchema: z.ZodObject<{
62
72
  clerk_user_id: string;
63
73
  email: string;
64
74
  _id?: string | undefined;
75
+ created_at?: number | undefined;
76
+ updated_at?: number | undefined;
65
77
  first_name?: string | undefined;
66
78
  last_name?: string | undefined;
67
79
  active_until?: number | undefined;
@@ -81,10 +93,14 @@ export declare const zodAgentSchema: z.ZodObject<{
81
93
  elevenlabs_voice_id: z.ZodOptional<z.ZodString>;
82
94
  message_count_limit: z.ZodOptional<z.ZodNumber>;
83
95
  is_editable: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
96
+ created_at: z.ZodOptional<z.ZodNumber>;
97
+ updated_at: z.ZodOptional<z.ZodNumber>;
84
98
  }, "strip", z.ZodTypeAny, {
85
99
  title: string;
86
100
  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";
87
101
  _id?: string | undefined;
102
+ created_at?: number | undefined;
103
+ updated_at?: number | undefined;
88
104
  organization_id?: string | undefined;
89
105
  description?: string | undefined;
90
106
  instructions?: string | undefined;
@@ -97,6 +113,8 @@ export declare const zodAgentSchema: z.ZodObject<{
97
113
  title: string;
98
114
  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";
99
115
  _id?: string | undefined;
116
+ created_at?: number | undefined;
117
+ updated_at?: number | undefined;
100
118
  organization_id?: string | undefined;
101
119
  description?: string | undefined;
102
120
  instructions?: string | undefined;
@@ -114,10 +132,14 @@ export declare const zodContextSchema: z.ZodObject<{
114
132
  document_url: z.ZodOptional<z.ZodString>;
115
133
  type: z.ZodOptional<z.ZodString>;
116
134
  content: z.ZodOptional<z.ZodString>;
135
+ created_at: z.ZodOptional<z.ZodNumber>;
136
+ updated_at: z.ZodOptional<z.ZodNumber>;
117
137
  }, "strip", z.ZodTypeAny, {
118
138
  title: string;
119
139
  _id?: string | undefined;
120
140
  type?: string | undefined;
141
+ created_at?: number | undefined;
142
+ updated_at?: number | undefined;
121
143
  organization_id?: string | undefined;
122
144
  description?: string | undefined;
123
145
  document_url?: string | undefined;
@@ -126,6 +148,8 @@ export declare const zodContextSchema: z.ZodObject<{
126
148
  title: string;
127
149
  _id?: string | undefined;
128
150
  type?: string | undefined;
151
+ created_at?: number | undefined;
152
+ updated_at?: number | undefined;
129
153
  organization_id?: string | undefined;
130
154
  description?: string | undefined;
131
155
  document_url?: string | undefined;
@@ -139,11 +163,15 @@ export declare const zodQuerySchema: z.ZodObject<{
139
163
  context_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
140
164
  status: z.ZodDefault<z.ZodEnum<["active", "inactive", "archived"]>>;
141
165
  users_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
166
+ created_at: z.ZodOptional<z.ZodNumber>;
167
+ updated_at: z.ZodOptional<z.ZodNumber>;
142
168
  }, "strip", z.ZodTypeAny, {
143
169
  status: "active" | "inactive" | "archived";
144
170
  query: string;
145
171
  _id?: string | undefined;
146
172
  title?: string | undefined;
173
+ created_at?: number | undefined;
174
+ updated_at?: number | undefined;
147
175
  organization_id?: string | undefined;
148
176
  context_ids?: string[] | undefined;
149
177
  users_ids?: string[] | undefined;
@@ -152,6 +180,8 @@ export declare const zodQuerySchema: z.ZodObject<{
152
180
  _id?: string | undefined;
153
181
  title?: string | undefined;
154
182
  status?: "active" | "inactive" | "archived" | undefined;
183
+ created_at?: number | undefined;
184
+ updated_at?: number | undefined;
155
185
  organization_id?: string | undefined;
156
186
  context_ids?: string[] | undefined;
157
187
  users_ids?: string[] | undefined;
package/dist/types.js CHANGED
@@ -24,6 +24,8 @@ exports.zodOrganizationSchema = zod_1.z.object({
24
24
  documents_size_limit: zod_1.z.number().min(1).optional(),
25
25
  allowed_models: zod_1.z.array(zod_1.z.enum(exports.modelsList)).optional(),
26
26
  queries_limit: zod_1.z.number().min(1).optional(),
27
+ created_at: zod_1.z.number().optional(),
28
+ updated_at: zod_1.z.number().optional(),
27
29
  });
28
30
  exports.zodUserSchema = zod_1.z.object({
29
31
  _id: zod_1.z.string().optional(),
@@ -36,6 +38,8 @@ exports.zodUserSchema = zod_1.z.object({
36
38
  notes: zod_1.z.string().max(500).optional(),
37
39
  avatar: zod_1.z.string().url().optional(),
38
40
  user_role: zod_1.z.enum(exports.userRoles).default('member').optional(),
41
+ created_at: zod_1.z.number().optional(),
42
+ updated_at: zod_1.z.number().optional(),
39
43
  });
40
44
  exports.zodAgentSchema = zod_1.z.object({
41
45
  _id: zod_1.z.string().optional(),
@@ -49,6 +53,8 @@ exports.zodAgentSchema = zod_1.z.object({
49
53
  elevenlabs_voice_id: zod_1.z.string().min(1).max(100).optional(),
50
54
  message_count_limit: zod_1.z.number().min(1).optional(),
51
55
  is_editable: zod_1.z.boolean().default(true).optional(),
56
+ created_at: zod_1.z.number().optional(),
57
+ updated_at: zod_1.z.number().optional(),
52
58
  });
53
59
  exports.zodContextSchema = zod_1.z.object({
54
60
  _id: zod_1.z.string().optional(),
@@ -58,6 +64,8 @@ exports.zodContextSchema = zod_1.z.object({
58
64
  document_url: zod_1.z.string().optional(),
59
65
  type: zod_1.z.string().min(1).max(100).optional(),
60
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(),
61
69
  });
62
70
  exports.zodQuerySchema = zod_1.z.object({
63
71
  _id: zod_1.z.string().optional(),
@@ -67,4 +75,6 @@ exports.zodQuerySchema = zod_1.z.object({
67
75
  context_ids: zod_1.z.array(zod_1.z.string()).optional(),
68
76
  status: zod_1.z.enum(['active', 'inactive', 'archived']).default('active'),
69
77
  users_ids: zod_1.z.array(zod_1.z.string()).optional(),
78
+ created_at: zod_1.z.number().optional(),
79
+ updated_at: zod_1.z.number().optional(),
70
80
  });
package/index.ts CHANGED
@@ -31,6 +31,8 @@ export const OrganizationSchema = Schema({
31
31
  documents_size_limit: { type: Number, min: 1 },
32
32
  allowed_models: { type: [String], enum: modelsList },
33
33
  queries_limit: { type: Number, min: 1 },
34
+ created_at: { type: Number },
35
+ updated_at: { type: Number },
34
36
  });
35
37
 
36
38
  export const UserSchema = Schema({
@@ -43,6 +45,8 @@ export const UserSchema = Schema({
43
45
  notes: { type: String, maxlength: 500 },
44
46
  avatar: { type: String },
45
47
  user_role: { type: String, enum: userRoles, required: true },
48
+ created_at: { type: Number },
49
+ updated_at: { type: Number },
46
50
  });
47
51
 
48
52
  export const AgentSchema = Schema({
@@ -56,6 +60,8 @@ export const AgentSchema = Schema({
56
60
  elevenlabs_voice_id: { type: String, minlength: 1, maxlength: 100 },
57
61
  message_count_limit: { type: Number, min: 1 },
58
62
  is_editable: { type: Boolean, default: true },
63
+ created_at: { type: Number },
64
+ updated_at: { type: Number },
59
65
  });
60
66
 
61
67
  export const ContextSchema = Schema({
@@ -65,6 +71,8 @@ export const ContextSchema = Schema({
65
71
  document_url: { type: String },
66
72
  type: { type: String, minlength: 1, maxlength: 100 },
67
73
  content: { type: String, required: true, minlength: 1 },
74
+ created_at: { type: Number },
75
+ updated_at: { type: Number },
68
76
  });
69
77
 
70
78
  export const QuerySchema = Schema({
@@ -74,4 +82,6 @@ export const QuerySchema = Schema({
74
82
  context_ids: { type: [String] },
75
83
  status: { type: String, enum: ['active', 'inactive', 'archived'], default: 'active', required: true },
76
84
  users_ids: { type: [String] },
85
+ created_at: { type: Number },
86
+ updated_at: { type: Number },
77
87
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chatifai",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
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
@@ -24,6 +24,8 @@ export const zodOrganizationSchema = z.object({
24
24
  documents_size_limit: z.number().min(1).optional(),
25
25
  allowed_models: z.array(z.enum(modelsList)).optional(),
26
26
  queries_limit: z.number().min(1).optional(),
27
+ created_at: z.number().optional(),
28
+ updated_at: z.number().optional(),
27
29
  });
28
30
 
29
31
  export const zodUserSchema = z.object({
@@ -37,6 +39,8 @@ export const zodUserSchema = z.object({
37
39
  notes: z.string().max(500).optional(),
38
40
  avatar: z.string().url().optional(),
39
41
  user_role: z.enum(userRoles).default('member').optional(),
42
+ created_at: z.number().optional(),
43
+ updated_at: z.number().optional(),
40
44
  });
41
45
 
42
46
  export const zodAgentSchema = z.object({
@@ -51,6 +55,8 @@ export const zodAgentSchema = z.object({
51
55
  elevenlabs_voice_id: z.string().min(1).max(100).optional(),
52
56
  message_count_limit: z.number().min(1).optional(),
53
57
  is_editable: z.boolean().default(true).optional(),
58
+ created_at: z.number().optional(),
59
+ updated_at: z.number().optional(),
54
60
  });
55
61
 
56
62
  export const zodContextSchema = z.object({
@@ -61,6 +67,8 @@ export const zodContextSchema = z.object({
61
67
  document_url: z.string().optional(),
62
68
  type: z.string().min(1).max(100).optional(),
63
69
  content: z.string().min(1).optional(),
70
+ created_at: z.number().optional(),
71
+ updated_at: z.number().optional(),
64
72
  });
65
73
 
66
74
  export const zodQuerySchema = z.object({
@@ -71,6 +79,8 @@ export const zodQuerySchema = z.object({
71
79
  context_ids: z.array(z.string()).optional(),
72
80
  status: z.enum(['active', 'inactive', 'archived']).default('active'),
73
81
  users_ids: z.array(z.string()).optional(),
82
+ created_at: z.number().optional(),
83
+ updated_at: z.number().optional(),
74
84
  });
75
85
 
76
86
  export type OrganizationType = z.infer<typeof zodOrganizationSchema>;