chatifai 1.0.31 → 1.0.33
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/types.d.ts +126 -3
- package/dist/types.js +1 -1
- package/package.json +1 -1
- package/types.ts +3 -3
package/dist/types.d.ts
CHANGED
|
@@ -527,7 +527,84 @@ export declare const zodPreDefinedQuerySchema: z.ZodObject<{
|
|
|
527
527
|
}>;
|
|
528
528
|
export declare const zodQuerySchema: z.ZodObject<{
|
|
529
529
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
530
|
-
|
|
530
|
+
contexts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
531
|
+
_id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
532
|
+
organization_id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
533
|
+
title: z.ZodOptional<z.ZodString>;
|
|
534
|
+
ai_description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
535
|
+
note: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
536
|
+
file_id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
537
|
+
file_url: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
538
|
+
file_gcs_url: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
539
|
+
file_name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
540
|
+
type: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
541
|
+
size: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
542
|
+
tokens: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
543
|
+
is_active: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodBoolean>>>;
|
|
544
|
+
created_at: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
545
|
+
updated_at: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
546
|
+
uploaded_by: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
547
|
+
first_name: z.ZodOptional<z.ZodString>;
|
|
548
|
+
last_name: z.ZodOptional<z.ZodString>;
|
|
549
|
+
email: z.ZodOptional<z.ZodString>;
|
|
550
|
+
}, "strip", z.ZodTypeAny, {
|
|
551
|
+
first_name?: string | undefined;
|
|
552
|
+
last_name?: string | undefined;
|
|
553
|
+
email?: string | undefined;
|
|
554
|
+
}, {
|
|
555
|
+
first_name?: string | undefined;
|
|
556
|
+
last_name?: string | undefined;
|
|
557
|
+
email?: string | undefined;
|
|
558
|
+
}>>>;
|
|
559
|
+
bucket_name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
560
|
+
processing_status: z.ZodOptional<z.ZodOptional<z.ZodEnum<["pending", "processing", "completed", "failed"]>>>;
|
|
561
|
+
}, "strip", z.ZodTypeAny, {
|
|
562
|
+
type?: string | undefined;
|
|
563
|
+
_id?: string | undefined;
|
|
564
|
+
title?: string | undefined;
|
|
565
|
+
created_at?: number | undefined;
|
|
566
|
+
updated_at?: number | undefined;
|
|
567
|
+
organization_id?: string | undefined;
|
|
568
|
+
ai_description?: string | undefined;
|
|
569
|
+
note?: string | undefined;
|
|
570
|
+
file_id?: string | undefined;
|
|
571
|
+
file_url?: string | undefined;
|
|
572
|
+
file_gcs_url?: string | undefined;
|
|
573
|
+
file_name?: string | undefined;
|
|
574
|
+
size?: number | undefined;
|
|
575
|
+
tokens?: number | undefined;
|
|
576
|
+
is_active?: boolean | undefined;
|
|
577
|
+
uploaded_by?: {
|
|
578
|
+
first_name?: string | undefined;
|
|
579
|
+
last_name?: string | undefined;
|
|
580
|
+
email?: string | undefined;
|
|
581
|
+
} | undefined;
|
|
582
|
+
bucket_name?: string | undefined;
|
|
583
|
+
processing_status?: "pending" | "processing" | "completed" | "failed" | undefined;
|
|
584
|
+
}, {
|
|
585
|
+
type?: string | undefined;
|
|
586
|
+
_id?: string | undefined;
|
|
587
|
+
title?: string | undefined;
|
|
588
|
+
created_at?: number | undefined;
|
|
589
|
+
updated_at?: number | undefined;
|
|
590
|
+
organization_id?: string | undefined;
|
|
591
|
+
ai_description?: string | undefined;
|
|
592
|
+
note?: string | undefined;
|
|
593
|
+
file_id?: string | undefined;
|
|
594
|
+
file_url?: string | undefined;
|
|
595
|
+
file_gcs_url?: string | undefined;
|
|
596
|
+
file_name?: string | undefined;
|
|
597
|
+
size?: number | undefined;
|
|
598
|
+
tokens?: number | undefined;
|
|
599
|
+
is_active?: boolean | undefined;
|
|
600
|
+
uploaded_by?: {
|
|
601
|
+
first_name?: string | undefined;
|
|
602
|
+
last_name?: string | undefined;
|
|
603
|
+
email?: string | undefined;
|
|
604
|
+
} | undefined;
|
|
605
|
+
bucket_name?: string | undefined;
|
|
606
|
+
processing_status?: "pending" | "processing" | "completed" | "failed" | undefined;
|
|
607
|
+
}>, "many">>;
|
|
531
608
|
organization_id: z.ZodString;
|
|
532
609
|
user: z.ZodObject<{
|
|
533
610
|
user_id: z.ZodString;
|
|
@@ -560,9 +637,32 @@ export declare const zodQuerySchema: z.ZodObject<{
|
|
|
560
637
|
email?: string | undefined;
|
|
561
638
|
};
|
|
562
639
|
timestamp: number;
|
|
640
|
+
contexts?: {
|
|
641
|
+
type?: string | undefined;
|
|
642
|
+
_id?: string | undefined;
|
|
643
|
+
title?: string | undefined;
|
|
644
|
+
created_at?: number | undefined;
|
|
645
|
+
updated_at?: number | undefined;
|
|
646
|
+
organization_id?: string | undefined;
|
|
647
|
+
ai_description?: string | undefined;
|
|
648
|
+
note?: string | undefined;
|
|
649
|
+
file_id?: string | undefined;
|
|
650
|
+
file_url?: string | undefined;
|
|
651
|
+
file_gcs_url?: string | undefined;
|
|
652
|
+
file_name?: string | undefined;
|
|
653
|
+
size?: number | undefined;
|
|
654
|
+
tokens?: number | undefined;
|
|
655
|
+
is_active?: boolean | undefined;
|
|
656
|
+
uploaded_by?: {
|
|
657
|
+
first_name?: string | undefined;
|
|
658
|
+
last_name?: string | undefined;
|
|
659
|
+
email?: string | undefined;
|
|
660
|
+
} | undefined;
|
|
661
|
+
bucket_name?: string | undefined;
|
|
662
|
+
processing_status?: "pending" | "processing" | "completed" | "failed" | undefined;
|
|
663
|
+
}[] | undefined;
|
|
563
664
|
full_document_search?: boolean | undefined;
|
|
564
665
|
thread_id?: string | undefined;
|
|
565
|
-
context_ids?: string[] | undefined;
|
|
566
666
|
pre_defined_query_id?: string | undefined;
|
|
567
667
|
custom_instructions?: string | undefined;
|
|
568
668
|
}, {
|
|
@@ -575,9 +675,32 @@ export declare const zodQuerySchema: z.ZodObject<{
|
|
|
575
675
|
email?: string | undefined;
|
|
576
676
|
};
|
|
577
677
|
timestamp: number;
|
|
678
|
+
contexts?: {
|
|
679
|
+
type?: string | undefined;
|
|
680
|
+
_id?: string | undefined;
|
|
681
|
+
title?: string | undefined;
|
|
682
|
+
created_at?: number | undefined;
|
|
683
|
+
updated_at?: number | undefined;
|
|
684
|
+
organization_id?: string | undefined;
|
|
685
|
+
ai_description?: string | undefined;
|
|
686
|
+
note?: string | undefined;
|
|
687
|
+
file_id?: string | undefined;
|
|
688
|
+
file_url?: string | undefined;
|
|
689
|
+
file_gcs_url?: string | undefined;
|
|
690
|
+
file_name?: string | undefined;
|
|
691
|
+
size?: number | undefined;
|
|
692
|
+
tokens?: number | undefined;
|
|
693
|
+
is_active?: boolean | undefined;
|
|
694
|
+
uploaded_by?: {
|
|
695
|
+
first_name?: string | undefined;
|
|
696
|
+
last_name?: string | undefined;
|
|
697
|
+
email?: string | undefined;
|
|
698
|
+
} | undefined;
|
|
699
|
+
bucket_name?: string | undefined;
|
|
700
|
+
processing_status?: "pending" | "processing" | "completed" | "failed" | undefined;
|
|
701
|
+
}[] | undefined;
|
|
578
702
|
full_document_search?: boolean | undefined;
|
|
579
703
|
thread_id?: string | undefined;
|
|
580
|
-
context_ids?: string[] | undefined;
|
|
581
704
|
pre_defined_query_id?: string | undefined;
|
|
582
705
|
custom_instructions?: string | undefined;
|
|
583
706
|
}>;
|
package/dist/types.js
CHANGED
|
@@ -143,7 +143,7 @@ exports.zodPreDefinedQuerySchema = zod_1.z.object({
|
|
|
143
143
|
// Zod schema for handling user queries
|
|
144
144
|
exports.zodQuerySchema = zod_1.z.object({
|
|
145
145
|
thread_id: zod_1.z.string().optional(),
|
|
146
|
-
|
|
146
|
+
contexts: zod_1.z.array(exports.zodContextSchema.partial()).optional(),
|
|
147
147
|
organization_id: zod_1.z.string(),
|
|
148
148
|
user: exports.zodClerkMinimalUserSchema,
|
|
149
149
|
query: zod_1.z.string().min(1),
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -150,11 +150,11 @@ export const zodPreDefinedQuerySchema = z.object({
|
|
|
150
150
|
|
|
151
151
|
// Zod schema for handling user queries
|
|
152
152
|
export const zodQuerySchema = z.object({
|
|
153
|
-
thread_id: z.string().optional(), //
|
|
154
|
-
|
|
153
|
+
thread_id: z.string().optional(), // Two types of queries: Regular Thread and Predefined Query Thread
|
|
154
|
+
contexts: z.array(zodContextSchema.partial()).optional(), // Run on all organization files unless specific file ids are provided
|
|
155
155
|
organization_id: z.string(), // Will be used to fetch the agent, contexts, chunks, etc.
|
|
156
156
|
user: zodClerkMinimalUserSchema,
|
|
157
|
-
query: z.string().min(1),
|
|
157
|
+
query: z.string().min(1), // Comes from free text input or predefined query
|
|
158
158
|
pre_defined_query_id: z.string().optional(),
|
|
159
159
|
custom_instructions: z.string().optional(),
|
|
160
160
|
full_document_search: z.boolean().optional(),
|