@llmops/core 0.6.10 → 1.0.0-beta.2
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/{bun-sqlite-dialect-C06VxkTn.cjs → bun-sqlite-dialect-CVUG5QUU.cjs} +1 -1
- package/dist/db/index.cjs +2 -2
- package/dist/db/index.d.cts +1 -1
- package/dist/db/index.d.mts +1 -1
- package/dist/db/index.mjs +1 -1
- package/dist/{db-CdAtHHw5.mjs → db-CZ8KtpL-.mjs} +7 -422
- package/dist/{db-D8otWwZL.cjs → db-DZv0NtMm.cjs} +8 -431
- package/dist/{index-D3onb7gK.d.mts → index-BlFAMkmT.d.mts} +519 -1471
- package/dist/{index-CyVFWq76.d.cts → index-DjIHdwhi.d.cts} +519 -1471
- package/dist/index.cjs +65 -1648
- package/dist/index.d.cts +157 -1663
- package/dist/index.d.mts +157 -1663
- package/dist/index.mjs +65 -1634
- package/dist/{neon-dialect-DIuEesTA.cjs → neon-dialect-BOnuygPe.cjs} +1 -1
- package/dist/{neon-dialect-ccr-mLKR.cjs → neon-dialect-ByrFa9iy.cjs} +1 -1
- package/dist/{node-sqlite-dialect-AU81Qz0n.cjs → node-sqlite-dialect-fwmW40Ar.cjs} +1 -1
- package/package.json +2 -4
|
@@ -85,7 +85,8 @@ declare const playgroundColumnSchema: z.ZodObject<{
|
|
|
85
85
|
id: z.ZodString;
|
|
86
86
|
name: z.ZodString;
|
|
87
87
|
position: z.ZodNumber;
|
|
88
|
-
providerConfigId: z.ZodUnion<readonly [z.ZodString, z.ZodNull]
|
|
88
|
+
providerConfigId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
89
|
+
providerSlug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
89
90
|
modelName: z.ZodString;
|
|
90
91
|
messages: z.ZodArray<z.ZodObject<{
|
|
91
92
|
role: z.ZodEnum<{
|
|
@@ -100,9 +101,6 @@ declare const playgroundColumnSchema: z.ZodObject<{
|
|
|
100
101
|
topP: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
101
102
|
frequencyPenalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
102
103
|
presencePenalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
103
|
-
configId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
104
|
-
variantId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
105
|
-
variantVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
106
104
|
}, z.core.$strip>;
|
|
107
105
|
declare const playgroundsSchema: z.ZodObject<{
|
|
108
106
|
name: z.ZodString;
|
|
@@ -111,7 +109,8 @@ declare const playgroundsSchema: z.ZodObject<{
|
|
|
111
109
|
id: z.ZodString;
|
|
112
110
|
name: z.ZodString;
|
|
113
111
|
position: z.ZodNumber;
|
|
114
|
-
providerConfigId: z.ZodUnion<readonly [z.ZodString, z.ZodNull]
|
|
112
|
+
providerConfigId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
113
|
+
providerSlug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
115
114
|
modelName: z.ZodString;
|
|
116
115
|
messages: z.ZodArray<z.ZodObject<{
|
|
117
116
|
role: z.ZodEnum<{
|
|
@@ -126,9 +125,6 @@ declare const playgroundsSchema: z.ZodObject<{
|
|
|
126
125
|
topP: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
127
126
|
frequencyPenalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
128
127
|
presencePenalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
129
|
-
configId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
130
|
-
variantId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
131
|
-
variantVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
132
128
|
}, z.core.$strip>>>;
|
|
133
129
|
id: z.ZodString;
|
|
134
130
|
createdAt: z.ZodDate;
|
|
@@ -619,20 +615,10 @@ interface SpanEventsTable {
|
|
|
619
615
|
* Main Kysely Database interface
|
|
620
616
|
*/
|
|
621
617
|
interface Database {
|
|
622
|
-
configs: ConfigsTable;
|
|
623
|
-
variants: VariantsTable;
|
|
624
|
-
variant_versions: VariantVersionsTable;
|
|
625
|
-
environments: EnvironmentsTable;
|
|
626
|
-
environment_secrets: EnvironmentSecretsTable;
|
|
627
|
-
config_variants: ConfigVariantsTable;
|
|
628
|
-
targeting_rules: TargetingRulesTable;
|
|
629
618
|
workspace_settings: WorkspaceSettingsTable;
|
|
630
|
-
provider_configs: ProviderConfigsTable;
|
|
631
619
|
playgrounds: PlaygroundsTable;
|
|
632
620
|
playground_runs: PlaygroundRunsTable;
|
|
633
621
|
playground_results: PlaygroundResultsTable;
|
|
634
|
-
guardrail_configs: GuardrailConfigsTable;
|
|
635
|
-
provider_guardrail_overrides: ProviderGuardrailOverridesTable;
|
|
636
622
|
datasets: DatasetsTable;
|
|
637
623
|
dataset_versions: DatasetVersionsTable;
|
|
638
624
|
dataset_records: DatasetRecordsTable;
|
|
@@ -658,11 +644,12 @@ type Updateable<T extends TableName> = { [K in keyof Database[T]]?: Database[T][
|
|
|
658
644
|
*/
|
|
659
645
|
declare const SCHEMA_METADATA: {
|
|
660
646
|
readonly tables: {
|
|
661
|
-
readonly
|
|
662
|
-
readonly order:
|
|
647
|
+
readonly workspace_settings: {
|
|
648
|
+
readonly order: 8;
|
|
663
649
|
readonly schema: z.ZodObject<{
|
|
664
|
-
|
|
665
|
-
|
|
650
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
651
|
+
setupComplete: z.ZodDefault<z.ZodBoolean>;
|
|
652
|
+
superAdminId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
666
653
|
id: z.ZodString;
|
|
667
654
|
createdAt: z.ZodDate;
|
|
668
655
|
updatedAt: z.ZodDate;
|
|
@@ -672,11 +659,15 @@ declare const SCHEMA_METADATA: {
|
|
|
672
659
|
readonly type: "uuid";
|
|
673
660
|
readonly primaryKey: true;
|
|
674
661
|
};
|
|
675
|
-
readonly
|
|
662
|
+
readonly name: {
|
|
676
663
|
readonly type: "text";
|
|
677
|
-
readonly
|
|
664
|
+
readonly nullable: true;
|
|
678
665
|
};
|
|
679
|
-
readonly
|
|
666
|
+
readonly setupComplete: {
|
|
667
|
+
readonly type: "boolean";
|
|
668
|
+
readonly default: false;
|
|
669
|
+
};
|
|
670
|
+
readonly superAdminId: {
|
|
680
671
|
readonly type: "text";
|
|
681
672
|
readonly nullable: true;
|
|
682
673
|
};
|
|
@@ -691,10 +682,32 @@ declare const SCHEMA_METADATA: {
|
|
|
691
682
|
};
|
|
692
683
|
};
|
|
693
684
|
};
|
|
694
|
-
readonly
|
|
695
|
-
readonly order:
|
|
685
|
+
readonly playgrounds: {
|
|
686
|
+
readonly order: 20;
|
|
696
687
|
readonly schema: z.ZodObject<{
|
|
697
688
|
name: z.ZodString;
|
|
689
|
+
datasetId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
690
|
+
columns: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
691
|
+
id: z.ZodString;
|
|
692
|
+
name: z.ZodString;
|
|
693
|
+
position: z.ZodNumber;
|
|
694
|
+
providerConfigId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
695
|
+
providerSlug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
696
|
+
modelName: z.ZodString;
|
|
697
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
698
|
+
role: z.ZodEnum<{
|
|
699
|
+
system: "system";
|
|
700
|
+
user: "user";
|
|
701
|
+
assistant: "assistant";
|
|
702
|
+
}>;
|
|
703
|
+
content: z.ZodString;
|
|
704
|
+
}, z.core.$strip>>;
|
|
705
|
+
temperature: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
706
|
+
maxTokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
707
|
+
topP: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
708
|
+
frequencyPenalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
709
|
+
presencePenalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
710
|
+
}, z.core.$strip>>>;
|
|
698
711
|
id: z.ZodString;
|
|
699
712
|
createdAt: z.ZodDate;
|
|
700
713
|
updatedAt: z.ZodDate;
|
|
@@ -707,6 +720,18 @@ declare const SCHEMA_METADATA: {
|
|
|
707
720
|
readonly name: {
|
|
708
721
|
readonly type: "text";
|
|
709
722
|
};
|
|
723
|
+
readonly datasetId: {
|
|
724
|
+
readonly type: "uuid";
|
|
725
|
+
readonly nullable: true;
|
|
726
|
+
readonly references: {
|
|
727
|
+
readonly table: "datasets";
|
|
728
|
+
readonly column: "id";
|
|
729
|
+
};
|
|
730
|
+
};
|
|
731
|
+
readonly columns: {
|
|
732
|
+
readonly type: "jsonb";
|
|
733
|
+
readonly nullable: true;
|
|
734
|
+
};
|
|
710
735
|
readonly createdAt: {
|
|
711
736
|
readonly type: "timestamp";
|
|
712
737
|
readonly default: "now()";
|
|
@@ -718,14 +743,23 @@ declare const SCHEMA_METADATA: {
|
|
|
718
743
|
};
|
|
719
744
|
};
|
|
720
745
|
};
|
|
721
|
-
readonly
|
|
722
|
-
readonly order:
|
|
746
|
+
readonly playground_runs: {
|
|
747
|
+
readonly order: 21;
|
|
723
748
|
readonly schema: z.ZodObject<{
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
749
|
+
playgroundId: z.ZodString;
|
|
750
|
+
datasetId: z.ZodNullable<z.ZodString>;
|
|
751
|
+
datasetVersionId: z.ZodNullable<z.ZodString>;
|
|
752
|
+
status: z.ZodEnum<{
|
|
753
|
+
pending: "pending";
|
|
754
|
+
running: "running";
|
|
755
|
+
completed: "completed";
|
|
756
|
+
failed: "failed";
|
|
757
|
+
cancelled: "cancelled";
|
|
758
|
+
}>;
|
|
759
|
+
startedAt: z.ZodNullable<z.ZodDate>;
|
|
760
|
+
completedAt: z.ZodNullable<z.ZodDate>;
|
|
761
|
+
totalRecords: z.ZodDefault<z.ZodNumber>;
|
|
762
|
+
completedRecords: z.ZodDefault<z.ZodNumber>;
|
|
729
763
|
id: z.ZodString;
|
|
730
764
|
createdAt: z.ZodDate;
|
|
731
765
|
updatedAt: z.ZodDate;
|
|
@@ -735,24 +769,47 @@ declare const SCHEMA_METADATA: {
|
|
|
735
769
|
readonly type: "uuid";
|
|
736
770
|
readonly primaryKey: true;
|
|
737
771
|
};
|
|
738
|
-
readonly
|
|
772
|
+
readonly playgroundId: {
|
|
739
773
|
readonly type: "uuid";
|
|
740
774
|
readonly references: {
|
|
741
|
-
readonly table: "
|
|
775
|
+
readonly table: "playgrounds";
|
|
742
776
|
readonly column: "id";
|
|
743
777
|
};
|
|
744
778
|
};
|
|
745
|
-
readonly
|
|
746
|
-
readonly type: "
|
|
779
|
+
readonly datasetId: {
|
|
780
|
+
readonly type: "uuid";
|
|
781
|
+
readonly nullable: true;
|
|
782
|
+
readonly references: {
|
|
783
|
+
readonly table: "datasets";
|
|
784
|
+
readonly column: "id";
|
|
785
|
+
};
|
|
747
786
|
};
|
|
748
|
-
readonly
|
|
749
|
-
readonly type: "
|
|
787
|
+
readonly datasetVersionId: {
|
|
788
|
+
readonly type: "uuid";
|
|
789
|
+
readonly nullable: true;
|
|
790
|
+
readonly references: {
|
|
791
|
+
readonly table: "dataset_versions";
|
|
792
|
+
readonly column: "id";
|
|
793
|
+
};
|
|
750
794
|
};
|
|
751
|
-
readonly
|
|
795
|
+
readonly status: {
|
|
752
796
|
readonly type: "text";
|
|
753
797
|
};
|
|
754
|
-
readonly
|
|
755
|
-
readonly type: "
|
|
798
|
+
readonly startedAt: {
|
|
799
|
+
readonly type: "timestamp";
|
|
800
|
+
readonly nullable: true;
|
|
801
|
+
};
|
|
802
|
+
readonly completedAt: {
|
|
803
|
+
readonly type: "timestamp";
|
|
804
|
+
readonly nullable: true;
|
|
805
|
+
};
|
|
806
|
+
readonly totalRecords: {
|
|
807
|
+
readonly type: "integer";
|
|
808
|
+
readonly default: 0;
|
|
809
|
+
};
|
|
810
|
+
readonly completedRecords: {
|
|
811
|
+
readonly type: "integer";
|
|
812
|
+
readonly default: 0;
|
|
756
813
|
};
|
|
757
814
|
readonly createdAt: {
|
|
758
815
|
readonly type: "timestamp";
|
|
@@ -764,16 +821,27 @@ declare const SCHEMA_METADATA: {
|
|
|
764
821
|
readonly onUpdate: "now()";
|
|
765
822
|
};
|
|
766
823
|
};
|
|
767
|
-
readonly uniqueConstraints: readonly [{
|
|
768
|
-
readonly columns: readonly ["variantId", "version"];
|
|
769
|
-
}];
|
|
770
824
|
};
|
|
771
|
-
readonly
|
|
772
|
-
readonly order:
|
|
825
|
+
readonly playground_results: {
|
|
826
|
+
readonly order: 22;
|
|
773
827
|
readonly schema: z.ZodObject<{
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
828
|
+
runId: z.ZodString;
|
|
829
|
+
columnId: z.ZodString;
|
|
830
|
+
datasetRecordId: z.ZodNullable<z.ZodString>;
|
|
831
|
+
inputVariables: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
832
|
+
outputContent: z.ZodNullable<z.ZodString>;
|
|
833
|
+
status: z.ZodEnum<{
|
|
834
|
+
pending: "pending";
|
|
835
|
+
running: "running";
|
|
836
|
+
completed: "completed";
|
|
837
|
+
failed: "failed";
|
|
838
|
+
}>;
|
|
839
|
+
error: z.ZodNullable<z.ZodString>;
|
|
840
|
+
latencyMs: z.ZodNullable<z.ZodNumber>;
|
|
841
|
+
promptTokens: z.ZodNullable<z.ZodNumber>;
|
|
842
|
+
completionTokens: z.ZodNullable<z.ZodNumber>;
|
|
843
|
+
totalTokens: z.ZodNullable<z.ZodNumber>;
|
|
844
|
+
cost: z.ZodNullable<z.ZodNumber>;
|
|
777
845
|
id: z.ZodString;
|
|
778
846
|
createdAt: z.ZodDate;
|
|
779
847
|
updatedAt: z.ZodDate;
|
|
@@ -783,16 +851,58 @@ declare const SCHEMA_METADATA: {
|
|
|
783
851
|
readonly type: "uuid";
|
|
784
852
|
readonly primaryKey: true;
|
|
785
853
|
};
|
|
786
|
-
readonly
|
|
854
|
+
readonly runId: {
|
|
855
|
+
readonly type: "uuid";
|
|
856
|
+
readonly references: {
|
|
857
|
+
readonly table: "playground_runs";
|
|
858
|
+
readonly column: "id";
|
|
859
|
+
};
|
|
860
|
+
};
|
|
861
|
+
readonly columnId: {
|
|
862
|
+
readonly type: "uuid";
|
|
863
|
+
};
|
|
864
|
+
readonly datasetRecordId: {
|
|
865
|
+
readonly type: "uuid";
|
|
866
|
+
readonly nullable: true;
|
|
867
|
+
readonly references: {
|
|
868
|
+
readonly table: "dataset_records";
|
|
869
|
+
readonly column: "id";
|
|
870
|
+
};
|
|
871
|
+
};
|
|
872
|
+
readonly inputVariables: {
|
|
873
|
+
readonly type: "jsonb";
|
|
874
|
+
readonly default: "{}";
|
|
875
|
+
};
|
|
876
|
+
readonly outputContent: {
|
|
787
877
|
readonly type: "text";
|
|
878
|
+
readonly nullable: true;
|
|
788
879
|
};
|
|
789
|
-
readonly
|
|
880
|
+
readonly status: {
|
|
790
881
|
readonly type: "text";
|
|
791
|
-
readonly unique: true;
|
|
792
882
|
};
|
|
793
|
-
readonly
|
|
794
|
-
readonly type: "
|
|
795
|
-
readonly
|
|
883
|
+
readonly error: {
|
|
884
|
+
readonly type: "text";
|
|
885
|
+
readonly nullable: true;
|
|
886
|
+
};
|
|
887
|
+
readonly latencyMs: {
|
|
888
|
+
readonly type: "integer";
|
|
889
|
+
readonly nullable: true;
|
|
890
|
+
};
|
|
891
|
+
readonly promptTokens: {
|
|
892
|
+
readonly type: "integer";
|
|
893
|
+
readonly nullable: true;
|
|
894
|
+
};
|
|
895
|
+
readonly completionTokens: {
|
|
896
|
+
readonly type: "integer";
|
|
897
|
+
readonly nullable: true;
|
|
898
|
+
};
|
|
899
|
+
readonly totalTokens: {
|
|
900
|
+
readonly type: "integer";
|
|
901
|
+
readonly nullable: true;
|
|
902
|
+
};
|
|
903
|
+
readonly cost: {
|
|
904
|
+
readonly type: "integer";
|
|
905
|
+
readonly nullable: true;
|
|
796
906
|
};
|
|
797
907
|
readonly createdAt: {
|
|
798
908
|
readonly type: "timestamp";
|
|
@@ -805,12 +915,13 @@ declare const SCHEMA_METADATA: {
|
|
|
805
915
|
};
|
|
806
916
|
};
|
|
807
917
|
};
|
|
808
|
-
readonly
|
|
809
|
-
readonly order:
|
|
918
|
+
readonly datasets: {
|
|
919
|
+
readonly order: 10;
|
|
810
920
|
readonly schema: z.ZodObject<{
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
921
|
+
name: z.ZodString;
|
|
922
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
923
|
+
recordCount: z.ZodDefault<z.ZodNumber>;
|
|
924
|
+
latestVersionNumber: z.ZodDefault<z.ZodNumber>;
|
|
814
925
|
id: z.ZodString;
|
|
815
926
|
createdAt: z.ZodDate;
|
|
816
927
|
updatedAt: z.ZodDate;
|
|
@@ -820,18 +931,20 @@ declare const SCHEMA_METADATA: {
|
|
|
820
931
|
readonly type: "uuid";
|
|
821
932
|
readonly primaryKey: true;
|
|
822
933
|
};
|
|
823
|
-
readonly
|
|
824
|
-
readonly type: "uuid";
|
|
825
|
-
readonly references: {
|
|
826
|
-
readonly table: "environments";
|
|
827
|
-
readonly column: "id";
|
|
828
|
-
};
|
|
829
|
-
};
|
|
830
|
-
readonly keyName: {
|
|
934
|
+
readonly name: {
|
|
831
935
|
readonly type: "text";
|
|
832
936
|
};
|
|
833
|
-
readonly
|
|
937
|
+
readonly description: {
|
|
834
938
|
readonly type: "text";
|
|
939
|
+
readonly nullable: true;
|
|
940
|
+
};
|
|
941
|
+
readonly recordCount: {
|
|
942
|
+
readonly type: "integer";
|
|
943
|
+
readonly default: 0;
|
|
944
|
+
};
|
|
945
|
+
readonly latestVersionNumber: {
|
|
946
|
+
readonly type: "integer";
|
|
947
|
+
readonly default: 1;
|
|
835
948
|
};
|
|
836
949
|
readonly createdAt: {
|
|
837
950
|
readonly type: "timestamp";
|
|
@@ -844,11 +957,15 @@ declare const SCHEMA_METADATA: {
|
|
|
844
957
|
};
|
|
845
958
|
};
|
|
846
959
|
};
|
|
847
|
-
readonly
|
|
848
|
-
readonly order:
|
|
960
|
+
readonly dataset_versions: {
|
|
961
|
+
readonly order: 11;
|
|
849
962
|
readonly schema: z.ZodObject<{
|
|
850
|
-
|
|
851
|
-
|
|
963
|
+
datasetId: z.ZodString;
|
|
964
|
+
versionNumber: z.ZodNumber;
|
|
965
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
966
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
967
|
+
recordCount: z.ZodDefault<z.ZodNumber>;
|
|
968
|
+
snapshotHash: z.ZodString;
|
|
852
969
|
id: z.ZodString;
|
|
853
970
|
createdAt: z.ZodDate;
|
|
854
971
|
updatedAt: z.ZodDate;
|
|
@@ -858,19 +975,30 @@ declare const SCHEMA_METADATA: {
|
|
|
858
975
|
readonly type: "uuid";
|
|
859
976
|
readonly primaryKey: true;
|
|
860
977
|
};
|
|
861
|
-
readonly
|
|
978
|
+
readonly datasetId: {
|
|
862
979
|
readonly type: "uuid";
|
|
863
980
|
readonly references: {
|
|
864
|
-
readonly table: "
|
|
981
|
+
readonly table: "datasets";
|
|
865
982
|
readonly column: "id";
|
|
866
983
|
};
|
|
867
984
|
};
|
|
868
|
-
readonly
|
|
869
|
-
readonly type: "
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
985
|
+
readonly versionNumber: {
|
|
986
|
+
readonly type: "integer";
|
|
987
|
+
};
|
|
988
|
+
readonly name: {
|
|
989
|
+
readonly type: "text";
|
|
990
|
+
readonly nullable: true;
|
|
991
|
+
};
|
|
992
|
+
readonly description: {
|
|
993
|
+
readonly type: "text";
|
|
994
|
+
readonly nullable: true;
|
|
995
|
+
};
|
|
996
|
+
readonly recordCount: {
|
|
997
|
+
readonly type: "integer";
|
|
998
|
+
readonly default: 0;
|
|
999
|
+
};
|
|
1000
|
+
readonly snapshotHash: {
|
|
1001
|
+
readonly type: "text";
|
|
874
1002
|
};
|
|
875
1003
|
readonly createdAt: {
|
|
876
1004
|
readonly type: "timestamp";
|
|
@@ -882,18 +1010,17 @@ declare const SCHEMA_METADATA: {
|
|
|
882
1010
|
readonly onUpdate: "now()";
|
|
883
1011
|
};
|
|
884
1012
|
};
|
|
1013
|
+
readonly uniqueConstraints: readonly [{
|
|
1014
|
+
readonly columns: readonly ["datasetId", "versionNumber"];
|
|
1015
|
+
}];
|
|
885
1016
|
};
|
|
886
|
-
readonly
|
|
887
|
-
readonly order:
|
|
1017
|
+
readonly dataset_records: {
|
|
1018
|
+
readonly order: 12;
|
|
888
1019
|
readonly schema: z.ZodObject<{
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
weight: z.ZodDefault<z.ZodNumber>;
|
|
894
|
-
priority: z.ZodDefault<z.ZodNumber>;
|
|
895
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
896
|
-
conditions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1020
|
+
datasetId: z.ZodString;
|
|
1021
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1022
|
+
expected: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
1023
|
+
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
897
1024
|
id: z.ZodString;
|
|
898
1025
|
createdAt: z.ZodDate;
|
|
899
1026
|
updatedAt: z.ZodDate;
|
|
@@ -903,566 +1030,10 @@ declare const SCHEMA_METADATA: {
|
|
|
903
1030
|
readonly type: "uuid";
|
|
904
1031
|
readonly primaryKey: true;
|
|
905
1032
|
};
|
|
906
|
-
readonly
|
|
1033
|
+
readonly datasetId: {
|
|
907
1034
|
readonly type: "uuid";
|
|
908
1035
|
readonly references: {
|
|
909
|
-
readonly table: "
|
|
910
|
-
readonly column: "id";
|
|
911
|
-
};
|
|
912
|
-
};
|
|
913
|
-
readonly configId: {
|
|
914
|
-
readonly type: "uuid";
|
|
915
|
-
readonly references: {
|
|
916
|
-
readonly table: "configs";
|
|
917
|
-
readonly column: "id";
|
|
918
|
-
};
|
|
919
|
-
};
|
|
920
|
-
readonly configVariantId: {
|
|
921
|
-
readonly type: "uuid";
|
|
922
|
-
readonly references: {
|
|
923
|
-
readonly table: "config_variants";
|
|
924
|
-
readonly column: "id";
|
|
925
|
-
};
|
|
926
|
-
};
|
|
927
|
-
readonly variantVersionId: {
|
|
928
|
-
readonly type: "uuid";
|
|
929
|
-
readonly nullable: true;
|
|
930
|
-
readonly references: {
|
|
931
|
-
readonly table: "variant_versions";
|
|
932
|
-
readonly column: "id";
|
|
933
|
-
};
|
|
934
|
-
};
|
|
935
|
-
readonly weight: {
|
|
936
|
-
readonly type: "integer";
|
|
937
|
-
readonly default: 10000;
|
|
938
|
-
};
|
|
939
|
-
readonly priority: {
|
|
940
|
-
readonly type: "integer";
|
|
941
|
-
readonly default: 0;
|
|
942
|
-
};
|
|
943
|
-
readonly enabled: {
|
|
944
|
-
readonly type: "boolean";
|
|
945
|
-
readonly default: true;
|
|
946
|
-
};
|
|
947
|
-
readonly conditions: {
|
|
948
|
-
readonly type: "jsonb";
|
|
949
|
-
readonly default: "{}";
|
|
950
|
-
};
|
|
951
|
-
readonly createdAt: {
|
|
952
|
-
readonly type: "timestamp";
|
|
953
|
-
readonly default: "now()";
|
|
954
|
-
};
|
|
955
|
-
readonly updatedAt: {
|
|
956
|
-
readonly type: "timestamp";
|
|
957
|
-
readonly default: "now()";
|
|
958
|
-
readonly onUpdate: "now()";
|
|
959
|
-
};
|
|
960
|
-
};
|
|
961
|
-
};
|
|
962
|
-
readonly workspace_settings: {
|
|
963
|
-
readonly order: 8;
|
|
964
|
-
readonly schema: z.ZodObject<{
|
|
965
|
-
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
966
|
-
setupComplete: z.ZodDefault<z.ZodBoolean>;
|
|
967
|
-
superAdminId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
968
|
-
id: z.ZodString;
|
|
969
|
-
createdAt: z.ZodDate;
|
|
970
|
-
updatedAt: z.ZodDate;
|
|
971
|
-
}, z.core.$strip>;
|
|
972
|
-
readonly fields: {
|
|
973
|
-
readonly id: {
|
|
974
|
-
readonly type: "uuid";
|
|
975
|
-
readonly primaryKey: true;
|
|
976
|
-
};
|
|
977
|
-
readonly name: {
|
|
978
|
-
readonly type: "text";
|
|
979
|
-
readonly nullable: true;
|
|
980
|
-
};
|
|
981
|
-
readonly setupComplete: {
|
|
982
|
-
readonly type: "boolean";
|
|
983
|
-
readonly default: false;
|
|
984
|
-
};
|
|
985
|
-
readonly superAdminId: {
|
|
986
|
-
readonly type: "text";
|
|
987
|
-
readonly nullable: true;
|
|
988
|
-
};
|
|
989
|
-
readonly createdAt: {
|
|
990
|
-
readonly type: "timestamp";
|
|
991
|
-
readonly default: "now()";
|
|
992
|
-
};
|
|
993
|
-
readonly updatedAt: {
|
|
994
|
-
readonly type: "timestamp";
|
|
995
|
-
readonly default: "now()";
|
|
996
|
-
readonly onUpdate: "now()";
|
|
997
|
-
};
|
|
998
|
-
};
|
|
999
|
-
};
|
|
1000
|
-
readonly provider_configs: {
|
|
1001
|
-
readonly order: 9;
|
|
1002
|
-
readonly schema: z.ZodObject<{
|
|
1003
|
-
providerId: z.ZodString;
|
|
1004
|
-
slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1005
|
-
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1006
|
-
config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1007
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1008
|
-
id: z.ZodString;
|
|
1009
|
-
createdAt: z.ZodDate;
|
|
1010
|
-
updatedAt: z.ZodDate;
|
|
1011
|
-
}, z.core.$strip>;
|
|
1012
|
-
readonly fields: {
|
|
1013
|
-
readonly id: {
|
|
1014
|
-
readonly type: "uuid";
|
|
1015
|
-
readonly primaryKey: true;
|
|
1016
|
-
};
|
|
1017
|
-
readonly providerId: {
|
|
1018
|
-
readonly type: "text";
|
|
1019
|
-
};
|
|
1020
|
-
readonly slug: {
|
|
1021
|
-
readonly type: "text";
|
|
1022
|
-
readonly nullable: true;
|
|
1023
|
-
};
|
|
1024
|
-
readonly name: {
|
|
1025
|
-
readonly type: "text";
|
|
1026
|
-
readonly nullable: true;
|
|
1027
|
-
};
|
|
1028
|
-
readonly config: {
|
|
1029
|
-
readonly type: "jsonb";
|
|
1030
|
-
readonly default: "{}";
|
|
1031
|
-
};
|
|
1032
|
-
readonly enabled: {
|
|
1033
|
-
readonly type: "boolean";
|
|
1034
|
-
readonly default: true;
|
|
1035
|
-
};
|
|
1036
|
-
readonly createdAt: {
|
|
1037
|
-
readonly type: "timestamp";
|
|
1038
|
-
readonly default: "now()";
|
|
1039
|
-
};
|
|
1040
|
-
readonly updatedAt: {
|
|
1041
|
-
readonly type: "timestamp";
|
|
1042
|
-
readonly default: "now()";
|
|
1043
|
-
readonly onUpdate: "now()";
|
|
1044
|
-
};
|
|
1045
|
-
};
|
|
1046
|
-
};
|
|
1047
|
-
readonly playgrounds: {
|
|
1048
|
-
readonly order: 20;
|
|
1049
|
-
readonly schema: z.ZodObject<{
|
|
1050
|
-
name: z.ZodString;
|
|
1051
|
-
datasetId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1052
|
-
columns: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
1053
|
-
id: z.ZodString;
|
|
1054
|
-
name: z.ZodString;
|
|
1055
|
-
position: z.ZodNumber;
|
|
1056
|
-
providerConfigId: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
1057
|
-
modelName: z.ZodString;
|
|
1058
|
-
messages: z.ZodArray<z.ZodObject<{
|
|
1059
|
-
role: z.ZodEnum<{
|
|
1060
|
-
system: "system";
|
|
1061
|
-
user: "user";
|
|
1062
|
-
assistant: "assistant";
|
|
1063
|
-
}>;
|
|
1064
|
-
content: z.ZodString;
|
|
1065
|
-
}, z.core.$strip>>;
|
|
1066
|
-
temperature: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1067
|
-
maxTokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1068
|
-
topP: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1069
|
-
frequencyPenalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1070
|
-
presencePenalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1071
|
-
configId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1072
|
-
variantId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1073
|
-
variantVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1074
|
-
}, z.core.$strip>>>;
|
|
1075
|
-
id: z.ZodString;
|
|
1076
|
-
createdAt: z.ZodDate;
|
|
1077
|
-
updatedAt: z.ZodDate;
|
|
1078
|
-
}, z.core.$strip>;
|
|
1079
|
-
readonly fields: {
|
|
1080
|
-
readonly id: {
|
|
1081
|
-
readonly type: "uuid";
|
|
1082
|
-
readonly primaryKey: true;
|
|
1083
|
-
};
|
|
1084
|
-
readonly name: {
|
|
1085
|
-
readonly type: "text";
|
|
1086
|
-
};
|
|
1087
|
-
readonly datasetId: {
|
|
1088
|
-
readonly type: "uuid";
|
|
1089
|
-
readonly nullable: true;
|
|
1090
|
-
readonly references: {
|
|
1091
|
-
readonly table: "datasets";
|
|
1092
|
-
readonly column: "id";
|
|
1093
|
-
};
|
|
1094
|
-
};
|
|
1095
|
-
readonly columns: {
|
|
1096
|
-
readonly type: "jsonb";
|
|
1097
|
-
readonly nullable: true;
|
|
1098
|
-
};
|
|
1099
|
-
readonly createdAt: {
|
|
1100
|
-
readonly type: "timestamp";
|
|
1101
|
-
readonly default: "now()";
|
|
1102
|
-
};
|
|
1103
|
-
readonly updatedAt: {
|
|
1104
|
-
readonly type: "timestamp";
|
|
1105
|
-
readonly default: "now()";
|
|
1106
|
-
readonly onUpdate: "now()";
|
|
1107
|
-
};
|
|
1108
|
-
};
|
|
1109
|
-
};
|
|
1110
|
-
readonly playground_runs: {
|
|
1111
|
-
readonly order: 21;
|
|
1112
|
-
readonly schema: z.ZodObject<{
|
|
1113
|
-
playgroundId: z.ZodString;
|
|
1114
|
-
datasetId: z.ZodNullable<z.ZodString>;
|
|
1115
|
-
datasetVersionId: z.ZodNullable<z.ZodString>;
|
|
1116
|
-
status: z.ZodEnum<{
|
|
1117
|
-
pending: "pending";
|
|
1118
|
-
running: "running";
|
|
1119
|
-
completed: "completed";
|
|
1120
|
-
failed: "failed";
|
|
1121
|
-
cancelled: "cancelled";
|
|
1122
|
-
}>;
|
|
1123
|
-
startedAt: z.ZodNullable<z.ZodDate>;
|
|
1124
|
-
completedAt: z.ZodNullable<z.ZodDate>;
|
|
1125
|
-
totalRecords: z.ZodDefault<z.ZodNumber>;
|
|
1126
|
-
completedRecords: z.ZodDefault<z.ZodNumber>;
|
|
1127
|
-
id: z.ZodString;
|
|
1128
|
-
createdAt: z.ZodDate;
|
|
1129
|
-
updatedAt: z.ZodDate;
|
|
1130
|
-
}, z.core.$strip>;
|
|
1131
|
-
readonly fields: {
|
|
1132
|
-
readonly id: {
|
|
1133
|
-
readonly type: "uuid";
|
|
1134
|
-
readonly primaryKey: true;
|
|
1135
|
-
};
|
|
1136
|
-
readonly playgroundId: {
|
|
1137
|
-
readonly type: "uuid";
|
|
1138
|
-
readonly references: {
|
|
1139
|
-
readonly table: "playgrounds";
|
|
1140
|
-
readonly column: "id";
|
|
1141
|
-
};
|
|
1142
|
-
};
|
|
1143
|
-
readonly datasetId: {
|
|
1144
|
-
readonly type: "uuid";
|
|
1145
|
-
readonly nullable: true;
|
|
1146
|
-
readonly references: {
|
|
1147
|
-
readonly table: "datasets";
|
|
1148
|
-
readonly column: "id";
|
|
1149
|
-
};
|
|
1150
|
-
};
|
|
1151
|
-
readonly datasetVersionId: {
|
|
1152
|
-
readonly type: "uuid";
|
|
1153
|
-
readonly nullable: true;
|
|
1154
|
-
readonly references: {
|
|
1155
|
-
readonly table: "dataset_versions";
|
|
1156
|
-
readonly column: "id";
|
|
1157
|
-
};
|
|
1158
|
-
};
|
|
1159
|
-
readonly status: {
|
|
1160
|
-
readonly type: "text";
|
|
1161
|
-
};
|
|
1162
|
-
readonly startedAt: {
|
|
1163
|
-
readonly type: "timestamp";
|
|
1164
|
-
readonly nullable: true;
|
|
1165
|
-
};
|
|
1166
|
-
readonly completedAt: {
|
|
1167
|
-
readonly type: "timestamp";
|
|
1168
|
-
readonly nullable: true;
|
|
1169
|
-
};
|
|
1170
|
-
readonly totalRecords: {
|
|
1171
|
-
readonly type: "integer";
|
|
1172
|
-
readonly default: 0;
|
|
1173
|
-
};
|
|
1174
|
-
readonly completedRecords: {
|
|
1175
|
-
readonly type: "integer";
|
|
1176
|
-
readonly default: 0;
|
|
1177
|
-
};
|
|
1178
|
-
readonly createdAt: {
|
|
1179
|
-
readonly type: "timestamp";
|
|
1180
|
-
readonly default: "now()";
|
|
1181
|
-
};
|
|
1182
|
-
readonly updatedAt: {
|
|
1183
|
-
readonly type: "timestamp";
|
|
1184
|
-
readonly default: "now()";
|
|
1185
|
-
readonly onUpdate: "now()";
|
|
1186
|
-
};
|
|
1187
|
-
};
|
|
1188
|
-
};
|
|
1189
|
-
readonly playground_results: {
|
|
1190
|
-
readonly order: 22;
|
|
1191
|
-
readonly schema: z.ZodObject<{
|
|
1192
|
-
runId: z.ZodString;
|
|
1193
|
-
columnId: z.ZodString;
|
|
1194
|
-
datasetRecordId: z.ZodNullable<z.ZodString>;
|
|
1195
|
-
inputVariables: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1196
|
-
outputContent: z.ZodNullable<z.ZodString>;
|
|
1197
|
-
status: z.ZodEnum<{
|
|
1198
|
-
pending: "pending";
|
|
1199
|
-
running: "running";
|
|
1200
|
-
completed: "completed";
|
|
1201
|
-
failed: "failed";
|
|
1202
|
-
}>;
|
|
1203
|
-
error: z.ZodNullable<z.ZodString>;
|
|
1204
|
-
latencyMs: z.ZodNullable<z.ZodNumber>;
|
|
1205
|
-
promptTokens: z.ZodNullable<z.ZodNumber>;
|
|
1206
|
-
completionTokens: z.ZodNullable<z.ZodNumber>;
|
|
1207
|
-
totalTokens: z.ZodNullable<z.ZodNumber>;
|
|
1208
|
-
cost: z.ZodNullable<z.ZodNumber>;
|
|
1209
|
-
id: z.ZodString;
|
|
1210
|
-
createdAt: z.ZodDate;
|
|
1211
|
-
updatedAt: z.ZodDate;
|
|
1212
|
-
}, z.core.$strip>;
|
|
1213
|
-
readonly fields: {
|
|
1214
|
-
readonly id: {
|
|
1215
|
-
readonly type: "uuid";
|
|
1216
|
-
readonly primaryKey: true;
|
|
1217
|
-
};
|
|
1218
|
-
readonly runId: {
|
|
1219
|
-
readonly type: "uuid";
|
|
1220
|
-
readonly references: {
|
|
1221
|
-
readonly table: "playground_runs";
|
|
1222
|
-
readonly column: "id";
|
|
1223
|
-
};
|
|
1224
|
-
};
|
|
1225
|
-
readonly columnId: {
|
|
1226
|
-
readonly type: "uuid";
|
|
1227
|
-
};
|
|
1228
|
-
readonly datasetRecordId: {
|
|
1229
|
-
readonly type: "uuid";
|
|
1230
|
-
readonly nullable: true;
|
|
1231
|
-
readonly references: {
|
|
1232
|
-
readonly table: "dataset_records";
|
|
1233
|
-
readonly column: "id";
|
|
1234
|
-
};
|
|
1235
|
-
};
|
|
1236
|
-
readonly inputVariables: {
|
|
1237
|
-
readonly type: "jsonb";
|
|
1238
|
-
readonly default: "{}";
|
|
1239
|
-
};
|
|
1240
|
-
readonly outputContent: {
|
|
1241
|
-
readonly type: "text";
|
|
1242
|
-
readonly nullable: true;
|
|
1243
|
-
};
|
|
1244
|
-
readonly status: {
|
|
1245
|
-
readonly type: "text";
|
|
1246
|
-
};
|
|
1247
|
-
readonly error: {
|
|
1248
|
-
readonly type: "text";
|
|
1249
|
-
readonly nullable: true;
|
|
1250
|
-
};
|
|
1251
|
-
readonly latencyMs: {
|
|
1252
|
-
readonly type: "integer";
|
|
1253
|
-
readonly nullable: true;
|
|
1254
|
-
};
|
|
1255
|
-
readonly promptTokens: {
|
|
1256
|
-
readonly type: "integer";
|
|
1257
|
-
readonly nullable: true;
|
|
1258
|
-
};
|
|
1259
|
-
readonly completionTokens: {
|
|
1260
|
-
readonly type: "integer";
|
|
1261
|
-
readonly nullable: true;
|
|
1262
|
-
};
|
|
1263
|
-
readonly totalTokens: {
|
|
1264
|
-
readonly type: "integer";
|
|
1265
|
-
readonly nullable: true;
|
|
1266
|
-
};
|
|
1267
|
-
readonly cost: {
|
|
1268
|
-
readonly type: "integer";
|
|
1269
|
-
readonly nullable: true;
|
|
1270
|
-
};
|
|
1271
|
-
readonly createdAt: {
|
|
1272
|
-
readonly type: "timestamp";
|
|
1273
|
-
readonly default: "now()";
|
|
1274
|
-
};
|
|
1275
|
-
readonly updatedAt: {
|
|
1276
|
-
readonly type: "timestamp";
|
|
1277
|
-
readonly default: "now()";
|
|
1278
|
-
readonly onUpdate: "now()";
|
|
1279
|
-
};
|
|
1280
|
-
};
|
|
1281
|
-
};
|
|
1282
|
-
readonly guardrail_configs: {
|
|
1283
|
-
readonly order: 14;
|
|
1284
|
-
readonly schema: z.ZodObject<{
|
|
1285
|
-
name: z.ZodString;
|
|
1286
|
-
pluginId: z.ZodString;
|
|
1287
|
-
functionId: z.ZodString;
|
|
1288
|
-
hookType: z.ZodEnum<{
|
|
1289
|
-
beforeRequestHook: "beforeRequestHook";
|
|
1290
|
-
afterRequestHook: "afterRequestHook";
|
|
1291
|
-
}>;
|
|
1292
|
-
parameters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1293
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1294
|
-
priority: z.ZodDefault<z.ZodNumber>;
|
|
1295
|
-
onFail: z.ZodDefault<z.ZodEnum<{
|
|
1296
|
-
block: "block";
|
|
1297
|
-
log: "log";
|
|
1298
|
-
}>>;
|
|
1299
|
-
id: z.ZodString;
|
|
1300
|
-
createdAt: z.ZodDate;
|
|
1301
|
-
updatedAt: z.ZodDate;
|
|
1302
|
-
}, z.core.$strip>;
|
|
1303
|
-
readonly fields: {
|
|
1304
|
-
readonly id: {
|
|
1305
|
-
readonly type: "uuid";
|
|
1306
|
-
readonly primaryKey: true;
|
|
1307
|
-
};
|
|
1308
|
-
readonly name: {
|
|
1309
|
-
readonly type: "text";
|
|
1310
|
-
};
|
|
1311
|
-
readonly pluginId: {
|
|
1312
|
-
readonly type: "text";
|
|
1313
|
-
};
|
|
1314
|
-
readonly functionId: {
|
|
1315
|
-
readonly type: "text";
|
|
1316
|
-
};
|
|
1317
|
-
readonly hookType: {
|
|
1318
|
-
readonly type: "text";
|
|
1319
|
-
};
|
|
1320
|
-
readonly parameters: {
|
|
1321
|
-
readonly type: "jsonb";
|
|
1322
|
-
readonly default: "{}";
|
|
1323
|
-
};
|
|
1324
|
-
readonly enabled: {
|
|
1325
|
-
readonly type: "boolean";
|
|
1326
|
-
readonly default: true;
|
|
1327
|
-
};
|
|
1328
|
-
readonly priority: {
|
|
1329
|
-
readonly type: "integer";
|
|
1330
|
-
readonly default: 0;
|
|
1331
|
-
};
|
|
1332
|
-
readonly onFail: {
|
|
1333
|
-
readonly type: "text";
|
|
1334
|
-
readonly default: "block";
|
|
1335
|
-
};
|
|
1336
|
-
readonly createdAt: {
|
|
1337
|
-
readonly type: "timestamp";
|
|
1338
|
-
readonly default: "now()";
|
|
1339
|
-
};
|
|
1340
|
-
readonly updatedAt: {
|
|
1341
|
-
readonly type: "timestamp";
|
|
1342
|
-
readonly default: "now()";
|
|
1343
|
-
readonly onUpdate: "now()";
|
|
1344
|
-
};
|
|
1345
|
-
};
|
|
1346
|
-
};
|
|
1347
|
-
readonly datasets: {
|
|
1348
|
-
readonly order: 10;
|
|
1349
|
-
readonly schema: z.ZodObject<{
|
|
1350
|
-
name: z.ZodString;
|
|
1351
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1352
|
-
recordCount: z.ZodDefault<z.ZodNumber>;
|
|
1353
|
-
latestVersionNumber: z.ZodDefault<z.ZodNumber>;
|
|
1354
|
-
id: z.ZodString;
|
|
1355
|
-
createdAt: z.ZodDate;
|
|
1356
|
-
updatedAt: z.ZodDate;
|
|
1357
|
-
}, z.core.$strip>;
|
|
1358
|
-
readonly fields: {
|
|
1359
|
-
readonly id: {
|
|
1360
|
-
readonly type: "uuid";
|
|
1361
|
-
readonly primaryKey: true;
|
|
1362
|
-
};
|
|
1363
|
-
readonly name: {
|
|
1364
|
-
readonly type: "text";
|
|
1365
|
-
};
|
|
1366
|
-
readonly description: {
|
|
1367
|
-
readonly type: "text";
|
|
1368
|
-
readonly nullable: true;
|
|
1369
|
-
};
|
|
1370
|
-
readonly recordCount: {
|
|
1371
|
-
readonly type: "integer";
|
|
1372
|
-
readonly default: 0;
|
|
1373
|
-
};
|
|
1374
|
-
readonly latestVersionNumber: {
|
|
1375
|
-
readonly type: "integer";
|
|
1376
|
-
readonly default: 1;
|
|
1377
|
-
};
|
|
1378
|
-
readonly createdAt: {
|
|
1379
|
-
readonly type: "timestamp";
|
|
1380
|
-
readonly default: "now()";
|
|
1381
|
-
};
|
|
1382
|
-
readonly updatedAt: {
|
|
1383
|
-
readonly type: "timestamp";
|
|
1384
|
-
readonly default: "now()";
|
|
1385
|
-
readonly onUpdate: "now()";
|
|
1386
|
-
};
|
|
1387
|
-
};
|
|
1388
|
-
};
|
|
1389
|
-
readonly dataset_versions: {
|
|
1390
|
-
readonly order: 11;
|
|
1391
|
-
readonly schema: z.ZodObject<{
|
|
1392
|
-
datasetId: z.ZodString;
|
|
1393
|
-
versionNumber: z.ZodNumber;
|
|
1394
|
-
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1395
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1396
|
-
recordCount: z.ZodDefault<z.ZodNumber>;
|
|
1397
|
-
snapshotHash: z.ZodString;
|
|
1398
|
-
id: z.ZodString;
|
|
1399
|
-
createdAt: z.ZodDate;
|
|
1400
|
-
updatedAt: z.ZodDate;
|
|
1401
|
-
}, z.core.$strip>;
|
|
1402
|
-
readonly fields: {
|
|
1403
|
-
readonly id: {
|
|
1404
|
-
readonly type: "uuid";
|
|
1405
|
-
readonly primaryKey: true;
|
|
1406
|
-
};
|
|
1407
|
-
readonly datasetId: {
|
|
1408
|
-
readonly type: "uuid";
|
|
1409
|
-
readonly references: {
|
|
1410
|
-
readonly table: "datasets";
|
|
1411
|
-
readonly column: "id";
|
|
1412
|
-
};
|
|
1413
|
-
};
|
|
1414
|
-
readonly versionNumber: {
|
|
1415
|
-
readonly type: "integer";
|
|
1416
|
-
};
|
|
1417
|
-
readonly name: {
|
|
1418
|
-
readonly type: "text";
|
|
1419
|
-
readonly nullable: true;
|
|
1420
|
-
};
|
|
1421
|
-
readonly description: {
|
|
1422
|
-
readonly type: "text";
|
|
1423
|
-
readonly nullable: true;
|
|
1424
|
-
};
|
|
1425
|
-
readonly recordCount: {
|
|
1426
|
-
readonly type: "integer";
|
|
1427
|
-
readonly default: 0;
|
|
1428
|
-
};
|
|
1429
|
-
readonly snapshotHash: {
|
|
1430
|
-
readonly type: "text";
|
|
1431
|
-
};
|
|
1432
|
-
readonly createdAt: {
|
|
1433
|
-
readonly type: "timestamp";
|
|
1434
|
-
readonly default: "now()";
|
|
1435
|
-
};
|
|
1436
|
-
readonly updatedAt: {
|
|
1437
|
-
readonly type: "timestamp";
|
|
1438
|
-
readonly default: "now()";
|
|
1439
|
-
readonly onUpdate: "now()";
|
|
1440
|
-
};
|
|
1441
|
-
};
|
|
1442
|
-
readonly uniqueConstraints: readonly [{
|
|
1443
|
-
readonly columns: readonly ["datasetId", "versionNumber"];
|
|
1444
|
-
}];
|
|
1445
|
-
};
|
|
1446
|
-
readonly dataset_records: {
|
|
1447
|
-
readonly order: 12;
|
|
1448
|
-
readonly schema: z.ZodObject<{
|
|
1449
|
-
datasetId: z.ZodString;
|
|
1450
|
-
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1451
|
-
expected: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
1452
|
-
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1453
|
-
id: z.ZodString;
|
|
1454
|
-
createdAt: z.ZodDate;
|
|
1455
|
-
updatedAt: z.ZodDate;
|
|
1456
|
-
}, z.core.$strip>;
|
|
1457
|
-
readonly fields: {
|
|
1458
|
-
readonly id: {
|
|
1459
|
-
readonly type: "uuid";
|
|
1460
|
-
readonly primaryKey: true;
|
|
1461
|
-
};
|
|
1462
|
-
readonly datasetId: {
|
|
1463
|
-
readonly type: "uuid";
|
|
1464
|
-
readonly references: {
|
|
1465
|
-
readonly table: "datasets";
|
|
1036
|
+
readonly table: "datasets";
|
|
1466
1037
|
readonly column: "id";
|
|
1467
1038
|
};
|
|
1468
1039
|
};
|
|
@@ -1535,58 +1106,6 @@ declare const SCHEMA_METADATA: {
|
|
|
1535
1106
|
readonly columns: readonly ["datasetVersionId", "datasetRecordId"];
|
|
1536
1107
|
}];
|
|
1537
1108
|
};
|
|
1538
|
-
readonly provider_guardrail_overrides: {
|
|
1539
|
-
readonly order: 15;
|
|
1540
|
-
readonly schema: z.ZodObject<{
|
|
1541
|
-
providerConfigId: z.ZodString;
|
|
1542
|
-
guardrailConfigId: z.ZodString;
|
|
1543
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1544
|
-
parameters: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
1545
|
-
id: z.ZodString;
|
|
1546
|
-
createdAt: z.ZodDate;
|
|
1547
|
-
updatedAt: z.ZodDate;
|
|
1548
|
-
}, z.core.$strip>;
|
|
1549
|
-
readonly fields: {
|
|
1550
|
-
readonly id: {
|
|
1551
|
-
readonly type: "uuid";
|
|
1552
|
-
readonly primaryKey: true;
|
|
1553
|
-
};
|
|
1554
|
-
readonly providerConfigId: {
|
|
1555
|
-
readonly type: "uuid";
|
|
1556
|
-
readonly references: {
|
|
1557
|
-
readonly table: "provider_configs";
|
|
1558
|
-
readonly column: "id";
|
|
1559
|
-
};
|
|
1560
|
-
};
|
|
1561
|
-
readonly guardrailConfigId: {
|
|
1562
|
-
readonly type: "uuid";
|
|
1563
|
-
readonly references: {
|
|
1564
|
-
readonly table: "guardrail_configs";
|
|
1565
|
-
readonly column: "id";
|
|
1566
|
-
};
|
|
1567
|
-
};
|
|
1568
|
-
readonly enabled: {
|
|
1569
|
-
readonly type: "boolean";
|
|
1570
|
-
readonly default: true;
|
|
1571
|
-
};
|
|
1572
|
-
readonly parameters: {
|
|
1573
|
-
readonly type: "jsonb";
|
|
1574
|
-
readonly nullable: true;
|
|
1575
|
-
};
|
|
1576
|
-
readonly createdAt: {
|
|
1577
|
-
readonly type: "timestamp";
|
|
1578
|
-
readonly default: "now()";
|
|
1579
|
-
};
|
|
1580
|
-
readonly updatedAt: {
|
|
1581
|
-
readonly type: "timestamp";
|
|
1582
|
-
readonly default: "now()";
|
|
1583
|
-
readonly onUpdate: "now()";
|
|
1584
|
-
};
|
|
1585
|
-
};
|
|
1586
|
-
readonly uniqueConstraints: readonly [{
|
|
1587
|
-
readonly columns: readonly ["providerConfigId", "guardrailConfigId"];
|
|
1588
|
-
}];
|
|
1589
|
-
};
|
|
1590
1109
|
readonly llm_requests: {
|
|
1591
1110
|
readonly order: 17;
|
|
1592
1111
|
readonly schema: z.ZodObject<{
|
|
@@ -2059,65 +1578,6 @@ declare const SCHEMA_METADATA: {
|
|
|
2059
1578
|
* Export all Zod schemas for runtime validation
|
|
2060
1579
|
*/
|
|
2061
1580
|
declare const schemas: {
|
|
2062
|
-
readonly configs: z.ZodObject<{
|
|
2063
|
-
slug: z.ZodString;
|
|
2064
|
-
name: z.ZodOptional<z.ZodString>;
|
|
2065
|
-
id: z.ZodString;
|
|
2066
|
-
createdAt: z.ZodDate;
|
|
2067
|
-
updatedAt: z.ZodDate;
|
|
2068
|
-
}, z.core.$strip>;
|
|
2069
|
-
readonly variants: z.ZodObject<{
|
|
2070
|
-
name: z.ZodString;
|
|
2071
|
-
id: z.ZodString;
|
|
2072
|
-
createdAt: z.ZodDate;
|
|
2073
|
-
updatedAt: z.ZodDate;
|
|
2074
|
-
}, z.core.$strip>;
|
|
2075
|
-
readonly variant_versions: z.ZodObject<{
|
|
2076
|
-
variantId: z.ZodString;
|
|
2077
|
-
version: z.ZodNumber;
|
|
2078
|
-
provider: z.ZodString;
|
|
2079
|
-
modelName: z.ZodString;
|
|
2080
|
-
jsonData: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2081
|
-
id: z.ZodString;
|
|
2082
|
-
createdAt: z.ZodDate;
|
|
2083
|
-
updatedAt: z.ZodDate;
|
|
2084
|
-
}, z.core.$strip>;
|
|
2085
|
-
readonly environments: z.ZodObject<{
|
|
2086
|
-
name: z.ZodString;
|
|
2087
|
-
slug: z.ZodString;
|
|
2088
|
-
isProd: z.ZodDefault<z.ZodBoolean>;
|
|
2089
|
-
id: z.ZodString;
|
|
2090
|
-
createdAt: z.ZodDate;
|
|
2091
|
-
updatedAt: z.ZodDate;
|
|
2092
|
-
}, z.core.$strip>;
|
|
2093
|
-
readonly environment_secrets: z.ZodObject<{
|
|
2094
|
-
environmentId: z.ZodString;
|
|
2095
|
-
keyName: z.ZodString;
|
|
2096
|
-
keyValue: z.ZodString;
|
|
2097
|
-
id: z.ZodString;
|
|
2098
|
-
createdAt: z.ZodDate;
|
|
2099
|
-
updatedAt: z.ZodDate;
|
|
2100
|
-
}, z.core.$strip>;
|
|
2101
|
-
readonly config_variants: z.ZodObject<{
|
|
2102
|
-
configId: z.ZodString;
|
|
2103
|
-
variantId: z.ZodString;
|
|
2104
|
-
id: z.ZodString;
|
|
2105
|
-
createdAt: z.ZodDate;
|
|
2106
|
-
updatedAt: z.ZodDate;
|
|
2107
|
-
}, z.core.$strip>;
|
|
2108
|
-
readonly targeting_rules: z.ZodObject<{
|
|
2109
|
-
environmentId: z.ZodString;
|
|
2110
|
-
configId: z.ZodString;
|
|
2111
|
-
configVariantId: z.ZodString;
|
|
2112
|
-
variantVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2113
|
-
weight: z.ZodDefault<z.ZodNumber>;
|
|
2114
|
-
priority: z.ZodDefault<z.ZodNumber>;
|
|
2115
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2116
|
-
conditions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2117
|
-
id: z.ZodString;
|
|
2118
|
-
createdAt: z.ZodDate;
|
|
2119
|
-
updatedAt: z.ZodDate;
|
|
2120
|
-
}, z.core.$strip>;
|
|
2121
1581
|
readonly workspace_settings: z.ZodObject<{
|
|
2122
1582
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2123
1583
|
setupComplete: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -2126,16 +1586,6 @@ declare const schemas: {
|
|
|
2126
1586
|
createdAt: z.ZodDate;
|
|
2127
1587
|
updatedAt: z.ZodDate;
|
|
2128
1588
|
}, z.core.$strip>;
|
|
2129
|
-
readonly provider_configs: z.ZodObject<{
|
|
2130
|
-
providerId: z.ZodString;
|
|
2131
|
-
slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2132
|
-
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2133
|
-
config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2134
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2135
|
-
id: z.ZodString;
|
|
2136
|
-
createdAt: z.ZodDate;
|
|
2137
|
-
updatedAt: z.ZodDate;
|
|
2138
|
-
}, z.core.$strip>;
|
|
2139
1589
|
readonly playgrounds: z.ZodObject<{
|
|
2140
1590
|
name: z.ZodString;
|
|
2141
1591
|
datasetId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -2143,7 +1593,8 @@ declare const schemas: {
|
|
|
2143
1593
|
id: z.ZodString;
|
|
2144
1594
|
name: z.ZodString;
|
|
2145
1595
|
position: z.ZodNumber;
|
|
2146
|
-
providerConfigId: z.ZodUnion<readonly [z.ZodString, z.ZodNull]
|
|
1596
|
+
providerConfigId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1597
|
+
providerSlug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2147
1598
|
modelName: z.ZodString;
|
|
2148
1599
|
messages: z.ZodArray<z.ZodObject<{
|
|
2149
1600
|
role: z.ZodEnum<{
|
|
@@ -2158,9 +1609,6 @@ declare const schemas: {
|
|
|
2158
1609
|
topP: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2159
1610
|
frequencyPenalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2160
1611
|
presencePenalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2161
|
-
configId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2162
|
-
variantId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2163
|
-
variantVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2164
1612
|
}, z.core.$strip>>>;
|
|
2165
1613
|
id: z.ZodString;
|
|
2166
1614
|
createdAt: z.ZodDate;
|
|
@@ -2170,7 +1618,8 @@ declare const schemas: {
|
|
|
2170
1618
|
id: z.ZodString;
|
|
2171
1619
|
name: z.ZodString;
|
|
2172
1620
|
position: z.ZodNumber;
|
|
2173
|
-
providerConfigId: z.ZodUnion<readonly [z.ZodString, z.ZodNull]
|
|
1621
|
+
providerConfigId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1622
|
+
providerSlug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2174
1623
|
modelName: z.ZodString;
|
|
2175
1624
|
messages: z.ZodArray<z.ZodObject<{
|
|
2176
1625
|
role: z.ZodEnum<{
|
|
@@ -2185,9 +1634,6 @@ declare const schemas: {
|
|
|
2185
1634
|
topP: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2186
1635
|
frequencyPenalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2187
1636
|
presencePenalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2188
|
-
configId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2189
|
-
variantId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2190
|
-
variantVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2191
1637
|
}, z.core.$strip>;
|
|
2192
1638
|
readonly playground_runs: z.ZodObject<{
|
|
2193
1639
|
playgroundId: z.ZodString;
|
|
@@ -2230,34 +1676,6 @@ declare const schemas: {
|
|
|
2230
1676
|
createdAt: z.ZodDate;
|
|
2231
1677
|
updatedAt: z.ZodDate;
|
|
2232
1678
|
}, z.core.$strip>;
|
|
2233
|
-
readonly guardrail_configs: z.ZodObject<{
|
|
2234
|
-
name: z.ZodString;
|
|
2235
|
-
pluginId: z.ZodString;
|
|
2236
|
-
functionId: z.ZodString;
|
|
2237
|
-
hookType: z.ZodEnum<{
|
|
2238
|
-
beforeRequestHook: "beforeRequestHook";
|
|
2239
|
-
afterRequestHook: "afterRequestHook";
|
|
2240
|
-
}>;
|
|
2241
|
-
parameters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2242
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2243
|
-
priority: z.ZodDefault<z.ZodNumber>;
|
|
2244
|
-
onFail: z.ZodDefault<z.ZodEnum<{
|
|
2245
|
-
block: "block";
|
|
2246
|
-
log: "log";
|
|
2247
|
-
}>>;
|
|
2248
|
-
id: z.ZodString;
|
|
2249
|
-
createdAt: z.ZodDate;
|
|
2250
|
-
updatedAt: z.ZodDate;
|
|
2251
|
-
}, z.core.$strip>;
|
|
2252
|
-
readonly provider_guardrail_overrides: z.ZodObject<{
|
|
2253
|
-
providerConfigId: z.ZodString;
|
|
2254
|
-
guardrailConfigId: z.ZodString;
|
|
2255
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2256
|
-
parameters: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
2257
|
-
id: z.ZodString;
|
|
2258
|
-
createdAt: z.ZodDate;
|
|
2259
|
-
updatedAt: z.ZodDate;
|
|
2260
|
-
}, z.core.$strip>;
|
|
2261
1679
|
readonly datasets: z.ZodObject<{
|
|
2262
1680
|
name: z.ZodString;
|
|
2263
1681
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -2340,211 +1758,107 @@ declare const schemas: {
|
|
|
2340
1758
|
spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2341
1759
|
parentSpanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2342
1760
|
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2343
|
-
id: z.ZodString;
|
|
2344
|
-
createdAt: z.ZodDate;
|
|
2345
|
-
updatedAt: z.ZodDate;
|
|
2346
|
-
}, z.core.$strip>;
|
|
2347
|
-
readonly traces: z.ZodObject<{
|
|
2348
|
-
traceId: z.ZodString;
|
|
2349
|
-
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2350
|
-
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2351
|
-
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2352
|
-
status: z.ZodDefault<z.ZodString>;
|
|
2353
|
-
startTime: z.ZodDate;
|
|
2354
|
-
endTime: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
2355
|
-
durationMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2356
|
-
spanCount: z.ZodDefault<z.ZodNumber>;
|
|
2357
|
-
totalInputTokens: z.ZodDefault<z.ZodNumber>;
|
|
2358
|
-
totalOutputTokens: z.ZodDefault<z.ZodNumber>;
|
|
2359
|
-
totalTokens: z.ZodDefault<z.ZodNumber>;
|
|
2360
|
-
totalCost: z.ZodDefault<z.ZodNumber>;
|
|
2361
|
-
tags: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2362
|
-
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2363
|
-
id: z.ZodString;
|
|
2364
|
-
createdAt: z.ZodDate;
|
|
2365
|
-
updatedAt: z.ZodDate;
|
|
2366
|
-
}, z.core.$strip>;
|
|
2367
|
-
readonly spans: z.ZodObject<{
|
|
2368
|
-
traceId: z.ZodString;
|
|
2369
|
-
spanId: z.ZodString;
|
|
2370
|
-
parentSpanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2371
|
-
name: z.ZodString;
|
|
2372
|
-
kind: z.ZodDefault<z.ZodNumber>;
|
|
2373
|
-
status: z.ZodDefault<z.ZodNumber>;
|
|
2374
|
-
statusMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2375
|
-
startTime: z.ZodDate;
|
|
2376
|
-
endTime: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
2377
|
-
durationMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2378
|
-
provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2379
|
-
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2380
|
-
promptTokens: z.ZodDefault<z.ZodNumber>;
|
|
2381
|
-
completionTokens: z.ZodDefault<z.ZodNumber>;
|
|
2382
|
-
totalTokens: z.ZodDefault<z.ZodNumber>;
|
|
2383
|
-
cost: z.ZodDefault<z.ZodNumber>;
|
|
2384
|
-
configId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2385
|
-
variantId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2386
|
-
environmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2387
|
-
providerConfigId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2388
|
-
requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2389
|
-
source: z.ZodDefault<z.ZodString>;
|
|
2390
|
-
input: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
2391
|
-
output: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
2392
|
-
attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2393
|
-
id: z.ZodString;
|
|
2394
|
-
createdAt: z.ZodDate;
|
|
2395
|
-
updatedAt: z.ZodDate;
|
|
2396
|
-
}, z.core.$strip>;
|
|
2397
|
-
readonly span_events: z.ZodObject<{
|
|
2398
|
-
id: z.ZodString;
|
|
2399
|
-
traceId: z.ZodString;
|
|
2400
|
-
spanId: z.ZodString;
|
|
2401
|
-
name: z.ZodString;
|
|
2402
|
-
timestamp: z.ZodDate;
|
|
2403
|
-
attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2404
|
-
createdAt: z.ZodDate;
|
|
2405
|
-
}, z.core.$strip>;
|
|
2406
|
-
};
|
|
2407
|
-
//#endregion
|
|
2408
|
-
//#region src/db/validation.d.ts
|
|
2409
|
-
/**
|
|
2410
|
-
* Validate data against table schema
|
|
2411
|
-
* Useful for runtime validation before inserting/updating
|
|
2412
|
-
*/
|
|
2413
|
-
declare function validateTableData<T extends TableName>(table: T, data: unknown): zod0.
|
|
2414
|
-
slug: string;
|
|
2415
|
-
id: string;
|
|
2416
|
-
createdAt: Date;
|
|
2417
|
-
updatedAt: Date;
|
|
2418
|
-
name?: string | undefined;
|
|
2419
|
-
}> | zod0.ZodSafeParseError<{
|
|
2420
|
-
slug: string;
|
|
2421
|
-
id: string;
|
|
2422
|
-
createdAt: Date;
|
|
2423
|
-
updatedAt: Date;
|
|
2424
|
-
name?: string | undefined;
|
|
2425
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2426
|
-
name: string;
|
|
2427
|
-
id: string;
|
|
2428
|
-
createdAt: Date;
|
|
2429
|
-
updatedAt: Date;
|
|
2430
|
-
}> | zod0.ZodSafeParseError<{
|
|
2431
|
-
name: string;
|
|
2432
|
-
id: string;
|
|
2433
|
-
createdAt: Date;
|
|
2434
|
-
updatedAt: Date;
|
|
2435
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2436
|
-
variantId: string;
|
|
2437
|
-
version: number;
|
|
2438
|
-
provider: string;
|
|
2439
|
-
modelName: string;
|
|
2440
|
-
jsonData: Record<string, unknown>;
|
|
2441
|
-
id: string;
|
|
2442
|
-
createdAt: Date;
|
|
2443
|
-
updatedAt: Date;
|
|
2444
|
-
}> | zod0.ZodSafeParseError<{
|
|
2445
|
-
variantId: string;
|
|
2446
|
-
version: number;
|
|
2447
|
-
provider: string;
|
|
2448
|
-
modelName: string;
|
|
2449
|
-
jsonData: Record<string, unknown>;
|
|
2450
|
-
id: string;
|
|
2451
|
-
createdAt: Date;
|
|
2452
|
-
updatedAt: Date;
|
|
2453
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2454
|
-
environmentId: string;
|
|
2455
|
-
keyName: string;
|
|
2456
|
-
keyValue: string;
|
|
2457
|
-
id: string;
|
|
2458
|
-
createdAt: Date;
|
|
2459
|
-
updatedAt: Date;
|
|
2460
|
-
}> | zod0.ZodSafeParseError<{
|
|
2461
|
-
environmentId: string;
|
|
2462
|
-
keyName: string;
|
|
2463
|
-
keyValue: string;
|
|
2464
|
-
id: string;
|
|
2465
|
-
createdAt: Date;
|
|
2466
|
-
updatedAt: Date;
|
|
2467
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2468
|
-
configId: string;
|
|
2469
|
-
variantId: string;
|
|
2470
|
-
id: string;
|
|
2471
|
-
createdAt: Date;
|
|
2472
|
-
updatedAt: Date;
|
|
2473
|
-
}> | zod0.ZodSafeParseError<{
|
|
2474
|
-
configId: string;
|
|
2475
|
-
variantId: string;
|
|
2476
|
-
id: string;
|
|
2477
|
-
createdAt: Date;
|
|
2478
|
-
updatedAt: Date;
|
|
2479
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2480
|
-
environmentId: string;
|
|
2481
|
-
configId: string;
|
|
2482
|
-
configVariantId: string;
|
|
2483
|
-
weight: number;
|
|
2484
|
-
priority: number;
|
|
2485
|
-
enabled: boolean;
|
|
2486
|
-
conditions: Record<string, unknown>;
|
|
2487
|
-
id: string;
|
|
2488
|
-
createdAt: Date;
|
|
2489
|
-
updatedAt: Date;
|
|
2490
|
-
variantVersionId?: string | null | undefined;
|
|
2491
|
-
}> | zod0.ZodSafeParseError<{
|
|
2492
|
-
environmentId: string;
|
|
2493
|
-
configId: string;
|
|
2494
|
-
configVariantId: string;
|
|
2495
|
-
weight: number;
|
|
2496
|
-
priority: number;
|
|
2497
|
-
enabled: boolean;
|
|
2498
|
-
conditions: Record<string, unknown>;
|
|
2499
|
-
id: string;
|
|
2500
|
-
createdAt: Date;
|
|
2501
|
-
updatedAt: Date;
|
|
2502
|
-
variantVersionId?: string | null | undefined;
|
|
2503
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2504
|
-
setupComplete: boolean;
|
|
2505
|
-
id: string;
|
|
2506
|
-
createdAt: Date;
|
|
2507
|
-
updatedAt: Date;
|
|
2508
|
-
name?: string | null | undefined;
|
|
2509
|
-
superAdminId?: string | null | undefined;
|
|
2510
|
-
}> | zod0.ZodSafeParseError<{
|
|
1761
|
+
id: z.ZodString;
|
|
1762
|
+
createdAt: z.ZodDate;
|
|
1763
|
+
updatedAt: z.ZodDate;
|
|
1764
|
+
}, z.core.$strip>;
|
|
1765
|
+
readonly traces: z.ZodObject<{
|
|
1766
|
+
traceId: z.ZodString;
|
|
1767
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1768
|
+
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1769
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1770
|
+
status: z.ZodDefault<z.ZodString>;
|
|
1771
|
+
startTime: z.ZodDate;
|
|
1772
|
+
endTime: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
1773
|
+
durationMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1774
|
+
spanCount: z.ZodDefault<z.ZodNumber>;
|
|
1775
|
+
totalInputTokens: z.ZodDefault<z.ZodNumber>;
|
|
1776
|
+
totalOutputTokens: z.ZodDefault<z.ZodNumber>;
|
|
1777
|
+
totalTokens: z.ZodDefault<z.ZodNumber>;
|
|
1778
|
+
totalCost: z.ZodDefault<z.ZodNumber>;
|
|
1779
|
+
tags: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1780
|
+
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1781
|
+
id: z.ZodString;
|
|
1782
|
+
createdAt: z.ZodDate;
|
|
1783
|
+
updatedAt: z.ZodDate;
|
|
1784
|
+
}, z.core.$strip>;
|
|
1785
|
+
readonly spans: z.ZodObject<{
|
|
1786
|
+
traceId: z.ZodString;
|
|
1787
|
+
spanId: z.ZodString;
|
|
1788
|
+
parentSpanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1789
|
+
name: z.ZodString;
|
|
1790
|
+
kind: z.ZodDefault<z.ZodNumber>;
|
|
1791
|
+
status: z.ZodDefault<z.ZodNumber>;
|
|
1792
|
+
statusMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1793
|
+
startTime: z.ZodDate;
|
|
1794
|
+
endTime: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
1795
|
+
durationMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1796
|
+
provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1797
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1798
|
+
promptTokens: z.ZodDefault<z.ZodNumber>;
|
|
1799
|
+
completionTokens: z.ZodDefault<z.ZodNumber>;
|
|
1800
|
+
totalTokens: z.ZodDefault<z.ZodNumber>;
|
|
1801
|
+
cost: z.ZodDefault<z.ZodNumber>;
|
|
1802
|
+
configId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1803
|
+
variantId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1804
|
+
environmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1805
|
+
providerConfigId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1806
|
+
requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1807
|
+
source: z.ZodDefault<z.ZodString>;
|
|
1808
|
+
input: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
1809
|
+
output: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
1810
|
+
attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1811
|
+
id: z.ZodString;
|
|
1812
|
+
createdAt: z.ZodDate;
|
|
1813
|
+
updatedAt: z.ZodDate;
|
|
1814
|
+
}, z.core.$strip>;
|
|
1815
|
+
readonly span_events: z.ZodObject<{
|
|
1816
|
+
id: z.ZodString;
|
|
1817
|
+
traceId: z.ZodString;
|
|
1818
|
+
spanId: z.ZodString;
|
|
1819
|
+
name: z.ZodString;
|
|
1820
|
+
timestamp: z.ZodDate;
|
|
1821
|
+
attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1822
|
+
createdAt: z.ZodDate;
|
|
1823
|
+
}, z.core.$strip>;
|
|
1824
|
+
};
|
|
1825
|
+
//#endregion
|
|
1826
|
+
//#region src/db/validation.d.ts
|
|
1827
|
+
/**
|
|
1828
|
+
* Validate data against table schema
|
|
1829
|
+
* Useful for runtime validation before inserting/updating
|
|
1830
|
+
*/
|
|
1831
|
+
declare function validateTableData<T extends TableName>(table: T, data: unknown): zod0.ZodSafeParseResult<{
|
|
2511
1832
|
setupComplete: boolean;
|
|
2512
1833
|
id: string;
|
|
2513
1834
|
createdAt: Date;
|
|
2514
1835
|
updatedAt: Date;
|
|
2515
1836
|
name?: string | null | undefined;
|
|
2516
1837
|
superAdminId?: string | null | undefined;
|
|
2517
|
-
}> | zod0.
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
}
|
|
2536
|
-
playgroundId: string;
|
|
2537
|
-
datasetId: string | null;
|
|
2538
|
-
datasetVersionId: string | null;
|
|
2539
|
-
status: "pending" | "running" | "completed" | "failed" | "cancelled";
|
|
2540
|
-
startedAt: Date | null;
|
|
2541
|
-
completedAt: Date | null;
|
|
2542
|
-
totalRecords: number;
|
|
2543
|
-
completedRecords: number;
|
|
1838
|
+
}> | zod0.ZodSafeParseResult<{
|
|
1839
|
+
name: string;
|
|
1840
|
+
columns: {
|
|
1841
|
+
id: string;
|
|
1842
|
+
name: string;
|
|
1843
|
+
position: number;
|
|
1844
|
+
modelName: string;
|
|
1845
|
+
messages: {
|
|
1846
|
+
role: "system" | "user" | "assistant";
|
|
1847
|
+
content: string;
|
|
1848
|
+
}[];
|
|
1849
|
+
providerConfigId?: string | null | undefined;
|
|
1850
|
+
providerSlug?: string | null | undefined;
|
|
1851
|
+
temperature?: number | null | undefined;
|
|
1852
|
+
maxTokens?: number | null | undefined;
|
|
1853
|
+
topP?: number | null | undefined;
|
|
1854
|
+
frequencyPenalty?: number | null | undefined;
|
|
1855
|
+
presencePenalty?: number | null | undefined;
|
|
1856
|
+
}[] | null;
|
|
2544
1857
|
id: string;
|
|
2545
1858
|
createdAt: Date;
|
|
2546
1859
|
updatedAt: Date;
|
|
2547
|
-
|
|
1860
|
+
datasetId?: string | null | undefined;
|
|
1861
|
+
}> | zod0.ZodSafeParseResult<{
|
|
2548
1862
|
playgroundId: string;
|
|
2549
1863
|
datasetId: string | null;
|
|
2550
1864
|
datasetVersionId: string | null;
|
|
@@ -2556,23 +1870,7 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
2556
1870
|
id: string;
|
|
2557
1871
|
createdAt: Date;
|
|
2558
1872
|
updatedAt: Date;
|
|
2559
|
-
}> | zod0.
|
|
2560
|
-
runId: string;
|
|
2561
|
-
columnId: string;
|
|
2562
|
-
datasetRecordId: string | null;
|
|
2563
|
-
inputVariables: Record<string, unknown>;
|
|
2564
|
-
outputContent: string | null;
|
|
2565
|
-
status: "pending" | "running" | "completed" | "failed";
|
|
2566
|
-
error: string | null;
|
|
2567
|
-
latencyMs: number | null;
|
|
2568
|
-
promptTokens: number | null;
|
|
2569
|
-
completionTokens: number | null;
|
|
2570
|
-
totalTokens: number | null;
|
|
2571
|
-
cost: number | null;
|
|
2572
|
-
id: string;
|
|
2573
|
-
createdAt: Date;
|
|
2574
|
-
updatedAt: Date;
|
|
2575
|
-
}> | zod0.ZodSafeParseError<{
|
|
1873
|
+
}> | zod0.ZodSafeParseResult<{
|
|
2576
1874
|
runId: string;
|
|
2577
1875
|
columnId: string;
|
|
2578
1876
|
datasetRecordId: string | null;
|
|
@@ -2588,17 +1886,15 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
2588
1886
|
id: string;
|
|
2589
1887
|
createdAt: Date;
|
|
2590
1888
|
updatedAt: Date;
|
|
2591
|
-
}> | zod0.
|
|
2592
|
-
|
|
2593
|
-
versionNumber: number;
|
|
1889
|
+
}> | zod0.ZodSafeParseResult<{
|
|
1890
|
+
name: string;
|
|
2594
1891
|
recordCount: number;
|
|
2595
|
-
|
|
1892
|
+
latestVersionNumber: number;
|
|
2596
1893
|
id: string;
|
|
2597
1894
|
createdAt: Date;
|
|
2598
1895
|
updatedAt: Date;
|
|
2599
|
-
name?: string | null | undefined;
|
|
2600
1896
|
description?: string | null | undefined;
|
|
2601
|
-
}> | zod0.
|
|
1897
|
+
}> | zod0.ZodSafeParseResult<{
|
|
2602
1898
|
datasetId: string;
|
|
2603
1899
|
versionNumber: number;
|
|
2604
1900
|
recordCount: number;
|
|
@@ -2608,15 +1904,7 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
2608
1904
|
updatedAt: Date;
|
|
2609
1905
|
name?: string | null | undefined;
|
|
2610
1906
|
description?: string | null | undefined;
|
|
2611
|
-
}> | zod0.
|
|
2612
|
-
datasetId: string;
|
|
2613
|
-
input: Record<string, unknown>;
|
|
2614
|
-
metadata: Record<string, unknown>;
|
|
2615
|
-
id: string;
|
|
2616
|
-
createdAt: Date;
|
|
2617
|
-
updatedAt: Date;
|
|
2618
|
-
expected?: Record<string, unknown> | null | undefined;
|
|
2619
|
-
}> | zod0.ZodSafeParseError<{
|
|
1907
|
+
}> | zod0.ZodSafeParseResult<{
|
|
2620
1908
|
datasetId: string;
|
|
2621
1909
|
input: Record<string, unknown>;
|
|
2622
1910
|
metadata: Record<string, unknown>;
|
|
@@ -2624,78 +1912,14 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
2624
1912
|
createdAt: Date;
|
|
2625
1913
|
updatedAt: Date;
|
|
2626
1914
|
expected?: Record<string, unknown> | null | undefined;
|
|
2627
|
-
}> | zod0.
|
|
2628
|
-
datasetVersionId: string;
|
|
2629
|
-
datasetRecordId: string;
|
|
2630
|
-
position: number;
|
|
2631
|
-
id: string;
|
|
2632
|
-
createdAt: Date;
|
|
2633
|
-
updatedAt: Date;
|
|
2634
|
-
}> | zod0.ZodSafeParseError<{
|
|
1915
|
+
}> | zod0.ZodSafeParseResult<{
|
|
2635
1916
|
datasetVersionId: string;
|
|
2636
1917
|
datasetRecordId: string;
|
|
2637
1918
|
position: number;
|
|
2638
1919
|
id: string;
|
|
2639
1920
|
createdAt: Date;
|
|
2640
1921
|
updatedAt: Date;
|
|
2641
|
-
}> | zod0.
|
|
2642
|
-
providerConfigId: string;
|
|
2643
|
-
guardrailConfigId: string;
|
|
2644
|
-
enabled: boolean;
|
|
2645
|
-
id: string;
|
|
2646
|
-
createdAt: Date;
|
|
2647
|
-
updatedAt: Date;
|
|
2648
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2649
|
-
}> | zod0.ZodSafeParseError<{
|
|
2650
|
-
providerConfigId: string;
|
|
2651
|
-
guardrailConfigId: string;
|
|
2652
|
-
enabled: boolean;
|
|
2653
|
-
id: string;
|
|
2654
|
-
createdAt: Date;
|
|
2655
|
-
updatedAt: Date;
|
|
2656
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2657
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2658
|
-
requestId: string;
|
|
2659
|
-
provider: string;
|
|
2660
|
-
model: string;
|
|
2661
|
-
promptTokens: number;
|
|
2662
|
-
completionTokens: number;
|
|
2663
|
-
totalTokens: number;
|
|
2664
|
-
cachedTokens: number;
|
|
2665
|
-
cacheCreationTokens: number;
|
|
2666
|
-
cost: number;
|
|
2667
|
-
cacheSavings: number;
|
|
2668
|
-
inputCost: number;
|
|
2669
|
-
outputCost: number;
|
|
2670
|
-
endpoint: string;
|
|
2671
|
-
statusCode: number;
|
|
2672
|
-
latencyMs: number;
|
|
2673
|
-
isStreaming: boolean;
|
|
2674
|
-
tags: Record<string, string>;
|
|
2675
|
-
id: string;
|
|
2676
|
-
createdAt: Date;
|
|
2677
|
-
updatedAt: Date;
|
|
2678
|
-
configId?: string | null | undefined;
|
|
2679
|
-
variantId?: string | null | undefined;
|
|
2680
|
-
environmentId?: string | null | undefined;
|
|
2681
|
-
providerConfigId?: string | null | undefined;
|
|
2682
|
-
userId?: string | null | undefined;
|
|
2683
|
-
guardrailResults?: {
|
|
2684
|
-
results: {
|
|
2685
|
-
checkId: string;
|
|
2686
|
-
functionId: string;
|
|
2687
|
-
hookType: "beforeRequestHook" | "afterRequestHook";
|
|
2688
|
-
verdict: boolean;
|
|
2689
|
-
latencyMs: number;
|
|
2690
|
-
}[];
|
|
2691
|
-
action: "allowed" | "blocked" | "logged";
|
|
2692
|
-
totalLatencyMs: number;
|
|
2693
|
-
} | null | undefined;
|
|
2694
|
-
traceId?: string | null | undefined;
|
|
2695
|
-
spanId?: string | null | undefined;
|
|
2696
|
-
parentSpanId?: string | null | undefined;
|
|
2697
|
-
sessionId?: string | null | undefined;
|
|
2698
|
-
}> | zod0.ZodSafeParseError<{
|
|
1922
|
+
}> | zod0.ZodSafeParseResult<{
|
|
2699
1923
|
requestId: string;
|
|
2700
1924
|
provider: string;
|
|
2701
1925
|
model: string;
|
|
@@ -2736,7 +1960,7 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
2736
1960
|
spanId?: string | null | undefined;
|
|
2737
1961
|
parentSpanId?: string | null | undefined;
|
|
2738
1962
|
sessionId?: string | null | undefined;
|
|
2739
|
-
}> | zod0.
|
|
1963
|
+
}> | zod0.ZodSafeParseResult<{
|
|
2740
1964
|
traceId: string;
|
|
2741
1965
|
status: string;
|
|
2742
1966
|
startTime: Date;
|
|
@@ -2755,34 +1979,36 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
2755
1979
|
userId?: string | null | undefined;
|
|
2756
1980
|
endTime?: Date | null | undefined;
|
|
2757
1981
|
durationMs?: number | null | undefined;
|
|
2758
|
-
}> | zod0.
|
|
1982
|
+
}> | zod0.ZodSafeParseResult<{
|
|
2759
1983
|
traceId: string;
|
|
2760
|
-
|
|
1984
|
+
spanId: string;
|
|
1985
|
+
name: string;
|
|
1986
|
+
kind: number;
|
|
1987
|
+
status: number;
|
|
2761
1988
|
startTime: Date;
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
totalOutputTokens: number;
|
|
1989
|
+
promptTokens: number;
|
|
1990
|
+
completionTokens: number;
|
|
2765
1991
|
totalTokens: number;
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
1992
|
+
cost: number;
|
|
1993
|
+
source: string;
|
|
1994
|
+
attributes: Record<string, unknown>;
|
|
2769
1995
|
id: string;
|
|
2770
1996
|
createdAt: Date;
|
|
2771
1997
|
updatedAt: Date;
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
userId?: string | null | undefined;
|
|
1998
|
+
parentSpanId?: string | null | undefined;
|
|
1999
|
+
statusMessage?: string | null | undefined;
|
|
2775
2000
|
endTime?: Date | null | undefined;
|
|
2776
2001
|
durationMs?: number | null | undefined;
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2002
|
+
provider?: string | null | undefined;
|
|
2003
|
+
model?: string | null | undefined;
|
|
2004
|
+
configId?: string | null | undefined;
|
|
2005
|
+
variantId?: string | null | undefined;
|
|
2006
|
+
environmentId?: string | null | undefined;
|
|
2007
|
+
providerConfigId?: string | null | undefined;
|
|
2008
|
+
requestId?: string | null | undefined;
|
|
2009
|
+
input?: unknown;
|
|
2010
|
+
output?: unknown;
|
|
2011
|
+
}> | zod0.ZodSafeParseResult<{
|
|
2786
2012
|
id: string;
|
|
2787
2013
|
traceId: string;
|
|
2788
2014
|
spanId: string;
|
|
@@ -2790,133 +2016,41 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
2790
2016
|
timestamp: Date;
|
|
2791
2017
|
attributes: Record<string, unknown>;
|
|
2792
2018
|
createdAt: Date;
|
|
2793
|
-
}>;
|
|
2794
|
-
/**
|
|
2795
|
-
* Validate partial data (for updates)
|
|
2796
|
-
*/
|
|
2797
|
-
declare function validatePartialTableData<T extends TableName>(table: T, data: unknown): zod0.
|
|
2798
|
-
name?: string | undefined;
|
|
2799
|
-
id?: string | undefined;
|
|
2800
|
-
createdAt?: Date | undefined;
|
|
2801
|
-
updatedAt?: Date | undefined;
|
|
2802
|
-
}> | zod0.ZodSafeParseError<{
|
|
2803
|
-
name?: string | undefined;
|
|
2804
|
-
id?: string | undefined;
|
|
2805
|
-
createdAt?: Date | undefined;
|
|
2806
|
-
updatedAt?: Date | undefined;
|
|
2807
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2808
|
-
variantId?: string | undefined;
|
|
2809
|
-
version?: number | undefined;
|
|
2810
|
-
provider?: string | undefined;
|
|
2811
|
-
modelName?: string | undefined;
|
|
2812
|
-
jsonData?: Record<string, unknown> | undefined;
|
|
2813
|
-
id?: string | undefined;
|
|
2814
|
-
createdAt?: Date | undefined;
|
|
2815
|
-
updatedAt?: Date | undefined;
|
|
2816
|
-
}> | zod0.ZodSafeParseError<{
|
|
2817
|
-
variantId?: string | undefined;
|
|
2818
|
-
version?: number | undefined;
|
|
2819
|
-
provider?: string | undefined;
|
|
2820
|
-
modelName?: string | undefined;
|
|
2821
|
-
jsonData?: Record<string, unknown> | undefined;
|
|
2822
|
-
id?: string | undefined;
|
|
2823
|
-
createdAt?: Date | undefined;
|
|
2824
|
-
updatedAt?: Date | undefined;
|
|
2825
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2826
|
-
environmentId?: string | undefined;
|
|
2827
|
-
keyName?: string | undefined;
|
|
2828
|
-
keyValue?: string | undefined;
|
|
2829
|
-
id?: string | undefined;
|
|
2830
|
-
createdAt?: Date | undefined;
|
|
2831
|
-
updatedAt?: Date | undefined;
|
|
2832
|
-
}> | zod0.ZodSafeParseError<{
|
|
2833
|
-
environmentId?: string | undefined;
|
|
2834
|
-
keyName?: string | undefined;
|
|
2835
|
-
keyValue?: string | undefined;
|
|
2836
|
-
id?: string | undefined;
|
|
2837
|
-
createdAt?: Date | undefined;
|
|
2838
|
-
updatedAt?: Date | undefined;
|
|
2839
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2840
|
-
configId?: string | undefined;
|
|
2841
|
-
variantId?: string | undefined;
|
|
2842
|
-
id?: string | undefined;
|
|
2843
|
-
createdAt?: Date | undefined;
|
|
2844
|
-
updatedAt?: Date | undefined;
|
|
2845
|
-
}> | zod0.ZodSafeParseError<{
|
|
2846
|
-
configId?: string | undefined;
|
|
2847
|
-
variantId?: string | undefined;
|
|
2848
|
-
id?: string | undefined;
|
|
2849
|
-
createdAt?: Date | undefined;
|
|
2850
|
-
updatedAt?: Date | undefined;
|
|
2851
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2852
|
-
environmentId?: string | undefined;
|
|
2853
|
-
configId?: string | undefined;
|
|
2854
|
-
configVariantId?: string | undefined;
|
|
2855
|
-
variantVersionId?: string | null | undefined;
|
|
2856
|
-
weight?: number | undefined;
|
|
2857
|
-
priority?: number | undefined;
|
|
2858
|
-
enabled?: boolean | undefined;
|
|
2859
|
-
conditions?: Record<string, unknown> | undefined;
|
|
2860
|
-
id?: string | undefined;
|
|
2861
|
-
createdAt?: Date | undefined;
|
|
2862
|
-
updatedAt?: Date | undefined;
|
|
2863
|
-
}> | zod0.ZodSafeParseError<{
|
|
2864
|
-
environmentId?: string | undefined;
|
|
2865
|
-
configId?: string | undefined;
|
|
2866
|
-
configVariantId?: string | undefined;
|
|
2867
|
-
variantVersionId?: string | null | undefined;
|
|
2868
|
-
weight?: number | undefined;
|
|
2869
|
-
priority?: number | undefined;
|
|
2870
|
-
enabled?: boolean | undefined;
|
|
2871
|
-
conditions?: Record<string, unknown> | undefined;
|
|
2872
|
-
id?: string | undefined;
|
|
2873
|
-
createdAt?: Date | undefined;
|
|
2874
|
-
updatedAt?: Date | undefined;
|
|
2875
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2876
|
-
name?: string | null | undefined;
|
|
2877
|
-
setupComplete?: boolean | undefined;
|
|
2878
|
-
superAdminId?: string | null | undefined;
|
|
2879
|
-
id?: string | undefined;
|
|
2880
|
-
createdAt?: Date | undefined;
|
|
2881
|
-
updatedAt?: Date | undefined;
|
|
2882
|
-
}> | zod0.ZodSafeParseError<{
|
|
2883
|
-
name?: string | null | undefined;
|
|
2884
|
-
setupComplete?: boolean | undefined;
|
|
2885
|
-
superAdminId?: string | null | undefined;
|
|
2886
|
-
id?: string | undefined;
|
|
2887
|
-
createdAt?: Date | undefined;
|
|
2888
|
-
updatedAt?: Date | undefined;
|
|
2889
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2890
|
-
providerId?: string | undefined;
|
|
2891
|
-
slug?: string | null | undefined;
|
|
2892
|
-
name?: string | null | undefined;
|
|
2893
|
-
config?: Record<string, unknown> | undefined;
|
|
2894
|
-
enabled?: boolean | undefined;
|
|
2895
|
-
id?: string | undefined;
|
|
2896
|
-
createdAt?: Date | undefined;
|
|
2897
|
-
updatedAt?: Date | undefined;
|
|
2898
|
-
}> | zod0.ZodSafeParseError<{
|
|
2899
|
-
providerId?: string | undefined;
|
|
2900
|
-
slug?: string | null | undefined;
|
|
2019
|
+
}>;
|
|
2020
|
+
/**
|
|
2021
|
+
* Validate partial data (for updates)
|
|
2022
|
+
*/
|
|
2023
|
+
declare function validatePartialTableData<T extends TableName>(table: T, data: unknown): zod0.ZodSafeParseResult<{
|
|
2901
2024
|
name?: string | null | undefined;
|
|
2902
|
-
|
|
2903
|
-
|
|
2025
|
+
setupComplete?: boolean | undefined;
|
|
2026
|
+
superAdminId?: string | null | undefined;
|
|
2904
2027
|
id?: string | undefined;
|
|
2905
2028
|
createdAt?: Date | undefined;
|
|
2906
2029
|
updatedAt?: Date | undefined;
|
|
2907
|
-
}> | zod0.
|
|
2908
|
-
|
|
2030
|
+
}> | zod0.ZodSafeParseResult<{
|
|
2031
|
+
name?: string | undefined;
|
|
2909
2032
|
datasetId?: string | null | undefined;
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2033
|
+
columns?: {
|
|
2034
|
+
id: string;
|
|
2035
|
+
name: string;
|
|
2036
|
+
position: number;
|
|
2037
|
+
modelName: string;
|
|
2038
|
+
messages: {
|
|
2039
|
+
role: "system" | "user" | "assistant";
|
|
2040
|
+
content: string;
|
|
2041
|
+
}[];
|
|
2042
|
+
providerConfigId?: string | null | undefined;
|
|
2043
|
+
providerSlug?: string | null | undefined;
|
|
2044
|
+
temperature?: number | null | undefined;
|
|
2045
|
+
maxTokens?: number | null | undefined;
|
|
2046
|
+
topP?: number | null | undefined;
|
|
2047
|
+
frequencyPenalty?: number | null | undefined;
|
|
2048
|
+
presencePenalty?: number | null | undefined;
|
|
2049
|
+
}[] | null | undefined;
|
|
2916
2050
|
id?: string | undefined;
|
|
2917
2051
|
createdAt?: Date | undefined;
|
|
2918
2052
|
updatedAt?: Date | undefined;
|
|
2919
|
-
}> | zod0.
|
|
2053
|
+
}> | zod0.ZodSafeParseResult<{
|
|
2920
2054
|
playgroundId?: string | undefined;
|
|
2921
2055
|
datasetId?: string | null | undefined;
|
|
2922
2056
|
datasetVersionId?: string | null | undefined;
|
|
@@ -2928,23 +2062,7 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
2928
2062
|
id?: string | undefined;
|
|
2929
2063
|
createdAt?: Date | undefined;
|
|
2930
2064
|
updatedAt?: Date | undefined;
|
|
2931
|
-
}> | zod0.
|
|
2932
|
-
runId?: string | undefined;
|
|
2933
|
-
columnId?: string | undefined;
|
|
2934
|
-
datasetRecordId?: string | null | undefined;
|
|
2935
|
-
inputVariables?: Record<string, unknown> | undefined;
|
|
2936
|
-
outputContent?: string | null | undefined;
|
|
2937
|
-
status?: "pending" | "running" | "completed" | "failed" | undefined;
|
|
2938
|
-
error?: string | null | undefined;
|
|
2939
|
-
latencyMs?: number | null | undefined;
|
|
2940
|
-
promptTokens?: number | null | undefined;
|
|
2941
|
-
completionTokens?: number | null | undefined;
|
|
2942
|
-
totalTokens?: number | null | undefined;
|
|
2943
|
-
cost?: number | null | undefined;
|
|
2944
|
-
id?: string | undefined;
|
|
2945
|
-
createdAt?: Date | undefined;
|
|
2946
|
-
updatedAt?: Date | undefined;
|
|
2947
|
-
}> | zod0.ZodSafeParseError<{
|
|
2065
|
+
}> | zod0.ZodSafeParseResult<{
|
|
2948
2066
|
runId?: string | undefined;
|
|
2949
2067
|
columnId?: string | undefined;
|
|
2950
2068
|
datasetRecordId?: string | null | undefined;
|
|
@@ -2960,17 +2078,15 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
2960
2078
|
id?: string | undefined;
|
|
2961
2079
|
createdAt?: Date | undefined;
|
|
2962
2080
|
updatedAt?: Date | undefined;
|
|
2963
|
-
}> | zod0.
|
|
2964
|
-
|
|
2965
|
-
versionNumber?: number | undefined;
|
|
2966
|
-
name?: string | null | undefined;
|
|
2081
|
+
}> | zod0.ZodSafeParseResult<{
|
|
2082
|
+
name?: string | undefined;
|
|
2967
2083
|
description?: string | null | undefined;
|
|
2968
2084
|
recordCount?: number | undefined;
|
|
2969
|
-
|
|
2085
|
+
latestVersionNumber?: number | undefined;
|
|
2970
2086
|
id?: string | undefined;
|
|
2971
2087
|
createdAt?: Date | undefined;
|
|
2972
2088
|
updatedAt?: Date | undefined;
|
|
2973
|
-
}> | zod0.
|
|
2089
|
+
}> | zod0.ZodSafeParseResult<{
|
|
2974
2090
|
datasetId?: string | undefined;
|
|
2975
2091
|
versionNumber?: number | undefined;
|
|
2976
2092
|
name?: string | null | undefined;
|
|
@@ -2980,15 +2096,7 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
2980
2096
|
id?: string | undefined;
|
|
2981
2097
|
createdAt?: Date | undefined;
|
|
2982
2098
|
updatedAt?: Date | undefined;
|
|
2983
|
-
}> | zod0.
|
|
2984
|
-
datasetId?: string | undefined;
|
|
2985
|
-
input?: Record<string, unknown> | undefined;
|
|
2986
|
-
expected?: Record<string, unknown> | null | undefined;
|
|
2987
|
-
metadata?: Record<string, unknown> | undefined;
|
|
2988
|
-
id?: string | undefined;
|
|
2989
|
-
createdAt?: Date | undefined;
|
|
2990
|
-
updatedAt?: Date | undefined;
|
|
2991
|
-
}> | zod0.ZodSafeParseError<{
|
|
2099
|
+
}> | zod0.ZodSafeParseResult<{
|
|
2992
2100
|
datasetId?: string | undefined;
|
|
2993
2101
|
input?: Record<string, unknown> | undefined;
|
|
2994
2102
|
expected?: Record<string, unknown> | null | undefined;
|
|
@@ -2996,78 +2104,14 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
2996
2104
|
id?: string | undefined;
|
|
2997
2105
|
createdAt?: Date | undefined;
|
|
2998
2106
|
updatedAt?: Date | undefined;
|
|
2999
|
-
}> | zod0.
|
|
3000
|
-
datasetVersionId?: string | undefined;
|
|
3001
|
-
datasetRecordId?: string | undefined;
|
|
3002
|
-
position?: number | undefined;
|
|
3003
|
-
id?: string | undefined;
|
|
3004
|
-
createdAt?: Date | undefined;
|
|
3005
|
-
updatedAt?: Date | undefined;
|
|
3006
|
-
}> | zod0.ZodSafeParseError<{
|
|
2107
|
+
}> | zod0.ZodSafeParseResult<{
|
|
3007
2108
|
datasetVersionId?: string | undefined;
|
|
3008
2109
|
datasetRecordId?: string | undefined;
|
|
3009
2110
|
position?: number | undefined;
|
|
3010
2111
|
id?: string | undefined;
|
|
3011
2112
|
createdAt?: Date | undefined;
|
|
3012
2113
|
updatedAt?: Date | undefined;
|
|
3013
|
-
}> | zod0.
|
|
3014
|
-
providerConfigId?: string | undefined;
|
|
3015
|
-
guardrailConfigId?: string | undefined;
|
|
3016
|
-
enabled?: boolean | undefined;
|
|
3017
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
3018
|
-
id?: string | undefined;
|
|
3019
|
-
createdAt?: Date | undefined;
|
|
3020
|
-
updatedAt?: Date | undefined;
|
|
3021
|
-
}> | zod0.ZodSafeParseError<{
|
|
3022
|
-
providerConfigId?: string | undefined;
|
|
3023
|
-
guardrailConfigId?: string | undefined;
|
|
3024
|
-
enabled?: boolean | undefined;
|
|
3025
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
3026
|
-
id?: string | undefined;
|
|
3027
|
-
createdAt?: Date | undefined;
|
|
3028
|
-
updatedAt?: Date | undefined;
|
|
3029
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
3030
|
-
requestId?: string | undefined;
|
|
3031
|
-
configId?: string | null | undefined;
|
|
3032
|
-
variantId?: string | null | undefined;
|
|
3033
|
-
environmentId?: string | null | undefined;
|
|
3034
|
-
providerConfigId?: string | null | undefined;
|
|
3035
|
-
provider?: string | undefined;
|
|
3036
|
-
model?: string | undefined;
|
|
3037
|
-
promptTokens?: number | undefined;
|
|
3038
|
-
completionTokens?: number | undefined;
|
|
3039
|
-
totalTokens?: number | undefined;
|
|
3040
|
-
cachedTokens?: number | undefined;
|
|
3041
|
-
cacheCreationTokens?: number | undefined;
|
|
3042
|
-
cost?: number | undefined;
|
|
3043
|
-
cacheSavings?: number | undefined;
|
|
3044
|
-
inputCost?: number | undefined;
|
|
3045
|
-
outputCost?: number | undefined;
|
|
3046
|
-
endpoint?: string | undefined;
|
|
3047
|
-
statusCode?: number | undefined;
|
|
3048
|
-
latencyMs?: number | undefined;
|
|
3049
|
-
isStreaming?: boolean | undefined;
|
|
3050
|
-
userId?: string | null | undefined;
|
|
3051
|
-
tags?: Record<string, string> | undefined;
|
|
3052
|
-
guardrailResults?: {
|
|
3053
|
-
results: {
|
|
3054
|
-
checkId: string;
|
|
3055
|
-
functionId: string;
|
|
3056
|
-
hookType: "beforeRequestHook" | "afterRequestHook";
|
|
3057
|
-
verdict: boolean;
|
|
3058
|
-
latencyMs: number;
|
|
3059
|
-
}[];
|
|
3060
|
-
action: "allowed" | "blocked" | "logged";
|
|
3061
|
-
totalLatencyMs: number;
|
|
3062
|
-
} | null | undefined;
|
|
3063
|
-
traceId?: string | null | undefined;
|
|
3064
|
-
spanId?: string | null | undefined;
|
|
3065
|
-
parentSpanId?: string | null | undefined;
|
|
3066
|
-
sessionId?: string | null | undefined;
|
|
3067
|
-
id?: string | undefined;
|
|
3068
|
-
createdAt?: Date | undefined;
|
|
3069
|
-
updatedAt?: Date | undefined;
|
|
3070
|
-
}> | zod0.ZodSafeParseError<{
|
|
2114
|
+
}> | zod0.ZodSafeParseResult<{
|
|
3071
2115
|
requestId?: string | undefined;
|
|
3072
2116
|
configId?: string | null | undefined;
|
|
3073
2117
|
variantId?: string | null | undefined;
|
|
@@ -3108,7 +2152,7 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
3108
2152
|
id?: string | undefined;
|
|
3109
2153
|
createdAt?: Date | undefined;
|
|
3110
2154
|
updatedAt?: Date | undefined;
|
|
3111
|
-
}> | zod0.
|
|
2155
|
+
}> | zod0.ZodSafeParseResult<{
|
|
3112
2156
|
traceId?: string | undefined;
|
|
3113
2157
|
name?: string | null | undefined;
|
|
3114
2158
|
sessionId?: string | null | undefined;
|
|
@@ -3127,34 +2171,36 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
3127
2171
|
id?: string | undefined;
|
|
3128
2172
|
createdAt?: Date | undefined;
|
|
3129
2173
|
updatedAt?: Date | undefined;
|
|
3130
|
-
}> | zod0.
|
|
2174
|
+
}> | zod0.ZodSafeParseResult<{
|
|
3131
2175
|
traceId?: string | undefined;
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
2176
|
+
spanId?: string | undefined;
|
|
2177
|
+
parentSpanId?: string | null | undefined;
|
|
2178
|
+
name?: string | undefined;
|
|
2179
|
+
kind?: number | undefined;
|
|
2180
|
+
status?: number | undefined;
|
|
2181
|
+
statusMessage?: string | null | undefined;
|
|
3136
2182
|
startTime?: Date | undefined;
|
|
3137
2183
|
endTime?: Date | null | undefined;
|
|
3138
2184
|
durationMs?: number | null | undefined;
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
2185
|
+
provider?: string | null | undefined;
|
|
2186
|
+
model?: string | null | undefined;
|
|
2187
|
+
promptTokens?: number | undefined;
|
|
2188
|
+
completionTokens?: number | undefined;
|
|
3142
2189
|
totalTokens?: number | undefined;
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
2190
|
+
cost?: number | undefined;
|
|
2191
|
+
configId?: string | null | undefined;
|
|
2192
|
+
variantId?: string | null | undefined;
|
|
2193
|
+
environmentId?: string | null | undefined;
|
|
2194
|
+
providerConfigId?: string | null | undefined;
|
|
2195
|
+
requestId?: string | null | undefined;
|
|
2196
|
+
source?: string | undefined;
|
|
2197
|
+
input?: unknown;
|
|
2198
|
+
output?: unknown;
|
|
2199
|
+
attributes?: Record<string, unknown> | undefined;
|
|
3146
2200
|
id?: string | undefined;
|
|
3147
2201
|
createdAt?: Date | undefined;
|
|
3148
2202
|
updatedAt?: Date | undefined;
|
|
3149
|
-
}> | zod0.
|
|
3150
|
-
id?: string | undefined;
|
|
3151
|
-
traceId?: string | undefined;
|
|
3152
|
-
spanId?: string | undefined;
|
|
3153
|
-
name?: string | undefined;
|
|
3154
|
-
timestamp?: Date | undefined;
|
|
3155
|
-
attributes?: Record<string, unknown> | undefined;
|
|
3156
|
-
createdAt?: Date | undefined;
|
|
3157
|
-
}> | zod0.ZodSafeParseError<{
|
|
2203
|
+
}> | zod0.ZodSafeParseResult<{
|
|
3158
2204
|
id?: string | undefined;
|
|
3159
2205
|
traceId?: string | undefined;
|
|
3160
2206
|
spanId?: string | undefined;
|
|
@@ -3167,51 +2213,6 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
3167
2213
|
* Parse and validate data, throws on error
|
|
3168
2214
|
*/
|
|
3169
2215
|
declare function parseTableData<T extends TableName>(table: T, data: unknown): {
|
|
3170
|
-
slug: string;
|
|
3171
|
-
id: string;
|
|
3172
|
-
createdAt: Date;
|
|
3173
|
-
updatedAt: Date;
|
|
3174
|
-
name?: string | undefined;
|
|
3175
|
-
} | {
|
|
3176
|
-
name: string;
|
|
3177
|
-
id: string;
|
|
3178
|
-
createdAt: Date;
|
|
3179
|
-
updatedAt: Date;
|
|
3180
|
-
} | {
|
|
3181
|
-
variantId: string;
|
|
3182
|
-
version: number;
|
|
3183
|
-
provider: string;
|
|
3184
|
-
modelName: string;
|
|
3185
|
-
jsonData: Record<string, unknown>;
|
|
3186
|
-
id: string;
|
|
3187
|
-
createdAt: Date;
|
|
3188
|
-
updatedAt: Date;
|
|
3189
|
-
} | {
|
|
3190
|
-
environmentId: string;
|
|
3191
|
-
keyName: string;
|
|
3192
|
-
keyValue: string;
|
|
3193
|
-
id: string;
|
|
3194
|
-
createdAt: Date;
|
|
3195
|
-
updatedAt: Date;
|
|
3196
|
-
} | {
|
|
3197
|
-
configId: string;
|
|
3198
|
-
variantId: string;
|
|
3199
|
-
id: string;
|
|
3200
|
-
createdAt: Date;
|
|
3201
|
-
updatedAt: Date;
|
|
3202
|
-
} | {
|
|
3203
|
-
environmentId: string;
|
|
3204
|
-
configId: string;
|
|
3205
|
-
configVariantId: string;
|
|
3206
|
-
weight: number;
|
|
3207
|
-
priority: number;
|
|
3208
|
-
enabled: boolean;
|
|
3209
|
-
conditions: Record<string, unknown>;
|
|
3210
|
-
id: string;
|
|
3211
|
-
createdAt: Date;
|
|
3212
|
-
updatedAt: Date;
|
|
3213
|
-
variantVersionId?: string | null | undefined;
|
|
3214
|
-
} | {
|
|
3215
2216
|
setupComplete: boolean;
|
|
3216
2217
|
id: string;
|
|
3217
2218
|
createdAt: Date;
|
|
@@ -3219,14 +2220,28 @@ declare function parseTableData<T extends TableName>(table: T, data: unknown): {
|
|
|
3219
2220
|
name?: string | null | undefined;
|
|
3220
2221
|
superAdminId?: string | null | undefined;
|
|
3221
2222
|
} | {
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
2223
|
+
name: string;
|
|
2224
|
+
columns: {
|
|
2225
|
+
id: string;
|
|
2226
|
+
name: string;
|
|
2227
|
+
position: number;
|
|
2228
|
+
modelName: string;
|
|
2229
|
+
messages: {
|
|
2230
|
+
role: "system" | "user" | "assistant";
|
|
2231
|
+
content: string;
|
|
2232
|
+
}[];
|
|
2233
|
+
providerConfigId?: string | null | undefined;
|
|
2234
|
+
providerSlug?: string | null | undefined;
|
|
2235
|
+
temperature?: number | null | undefined;
|
|
2236
|
+
maxTokens?: number | null | undefined;
|
|
2237
|
+
topP?: number | null | undefined;
|
|
2238
|
+
frequencyPenalty?: number | null | undefined;
|
|
2239
|
+
presencePenalty?: number | null | undefined;
|
|
2240
|
+
}[] | null;
|
|
3225
2241
|
id: string;
|
|
3226
2242
|
createdAt: Date;
|
|
3227
2243
|
updatedAt: Date;
|
|
3228
|
-
|
|
3229
|
-
name?: string | null | undefined;
|
|
2244
|
+
datasetId?: string | null | undefined;
|
|
3230
2245
|
} | {
|
|
3231
2246
|
playgroundId: string;
|
|
3232
2247
|
datasetId: string | null;
|
|
@@ -3255,6 +2270,14 @@ declare function parseTableData<T extends TableName>(table: T, data: unknown): {
|
|
|
3255
2270
|
id: string;
|
|
3256
2271
|
createdAt: Date;
|
|
3257
2272
|
updatedAt: Date;
|
|
2273
|
+
} | {
|
|
2274
|
+
name: string;
|
|
2275
|
+
recordCount: number;
|
|
2276
|
+
latestVersionNumber: number;
|
|
2277
|
+
id: string;
|
|
2278
|
+
createdAt: Date;
|
|
2279
|
+
updatedAt: Date;
|
|
2280
|
+
description?: string | null | undefined;
|
|
3258
2281
|
} | {
|
|
3259
2282
|
datasetId: string;
|
|
3260
2283
|
versionNumber: number;
|
|
@@ -3280,14 +2303,6 @@ declare function parseTableData<T extends TableName>(table: T, data: unknown): {
|
|
|
3280
2303
|
id: string;
|
|
3281
2304
|
createdAt: Date;
|
|
3282
2305
|
updatedAt: Date;
|
|
3283
|
-
} | {
|
|
3284
|
-
providerConfigId: string;
|
|
3285
|
-
guardrailConfigId: string;
|
|
3286
|
-
enabled: boolean;
|
|
3287
|
-
id: string;
|
|
3288
|
-
createdAt: Date;
|
|
3289
|
-
updatedAt: Date;
|
|
3290
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
3291
2306
|
} | {
|
|
3292
2307
|
requestId: string;
|
|
3293
2308
|
provider: string;
|
|
@@ -3348,6 +2363,35 @@ declare function parseTableData<T extends TableName>(table: T, data: unknown): {
|
|
|
3348
2363
|
userId?: string | null | undefined;
|
|
3349
2364
|
endTime?: Date | null | undefined;
|
|
3350
2365
|
durationMs?: number | null | undefined;
|
|
2366
|
+
} | {
|
|
2367
|
+
traceId: string;
|
|
2368
|
+
spanId: string;
|
|
2369
|
+
name: string;
|
|
2370
|
+
kind: number;
|
|
2371
|
+
status: number;
|
|
2372
|
+
startTime: Date;
|
|
2373
|
+
promptTokens: number;
|
|
2374
|
+
completionTokens: number;
|
|
2375
|
+
totalTokens: number;
|
|
2376
|
+
cost: number;
|
|
2377
|
+
source: string;
|
|
2378
|
+
attributes: Record<string, unknown>;
|
|
2379
|
+
id: string;
|
|
2380
|
+
createdAt: Date;
|
|
2381
|
+
updatedAt: Date;
|
|
2382
|
+
parentSpanId?: string | null | undefined;
|
|
2383
|
+
statusMessage?: string | null | undefined;
|
|
2384
|
+
endTime?: Date | null | undefined;
|
|
2385
|
+
durationMs?: number | null | undefined;
|
|
2386
|
+
provider?: string | null | undefined;
|
|
2387
|
+
model?: string | null | undefined;
|
|
2388
|
+
configId?: string | null | undefined;
|
|
2389
|
+
variantId?: string | null | undefined;
|
|
2390
|
+
environmentId?: string | null | undefined;
|
|
2391
|
+
providerConfigId?: string | null | undefined;
|
|
2392
|
+
requestId?: string | null | undefined;
|
|
2393
|
+
input?: unknown;
|
|
2394
|
+
output?: unknown;
|
|
3351
2395
|
} | {
|
|
3352
2396
|
id: string;
|
|
3353
2397
|
traceId: string;
|
|
@@ -3361,45 +2405,6 @@ declare function parseTableData<T extends TableName>(table: T, data: unknown): {
|
|
|
3361
2405
|
* Parse partial data, throws on error
|
|
3362
2406
|
*/
|
|
3363
2407
|
declare function parsePartialTableData<T extends TableName>(table: T, data: unknown): {
|
|
3364
|
-
name?: string | undefined;
|
|
3365
|
-
id?: string | undefined;
|
|
3366
|
-
createdAt?: Date | undefined;
|
|
3367
|
-
updatedAt?: Date | undefined;
|
|
3368
|
-
} | {
|
|
3369
|
-
variantId?: string | undefined;
|
|
3370
|
-
version?: number | undefined;
|
|
3371
|
-
provider?: string | undefined;
|
|
3372
|
-
modelName?: string | undefined;
|
|
3373
|
-
jsonData?: Record<string, unknown> | undefined;
|
|
3374
|
-
id?: string | undefined;
|
|
3375
|
-
createdAt?: Date | undefined;
|
|
3376
|
-
updatedAt?: Date | undefined;
|
|
3377
|
-
} | {
|
|
3378
|
-
environmentId?: string | undefined;
|
|
3379
|
-
keyName?: string | undefined;
|
|
3380
|
-
keyValue?: string | undefined;
|
|
3381
|
-
id?: string | undefined;
|
|
3382
|
-
createdAt?: Date | undefined;
|
|
3383
|
-
updatedAt?: Date | undefined;
|
|
3384
|
-
} | {
|
|
3385
|
-
configId?: string | undefined;
|
|
3386
|
-
variantId?: string | undefined;
|
|
3387
|
-
id?: string | undefined;
|
|
3388
|
-
createdAt?: Date | undefined;
|
|
3389
|
-
updatedAt?: Date | undefined;
|
|
3390
|
-
} | {
|
|
3391
|
-
environmentId?: string | undefined;
|
|
3392
|
-
configId?: string | undefined;
|
|
3393
|
-
configVariantId?: string | undefined;
|
|
3394
|
-
variantVersionId?: string | null | undefined;
|
|
3395
|
-
weight?: number | undefined;
|
|
3396
|
-
priority?: number | undefined;
|
|
3397
|
-
enabled?: boolean | undefined;
|
|
3398
|
-
conditions?: Record<string, unknown> | undefined;
|
|
3399
|
-
id?: string | undefined;
|
|
3400
|
-
createdAt?: Date | undefined;
|
|
3401
|
-
updatedAt?: Date | undefined;
|
|
3402
|
-
} | {
|
|
3403
2408
|
name?: string | null | undefined;
|
|
3404
2409
|
setupComplete?: boolean | undefined;
|
|
3405
2410
|
superAdminId?: string | null | undefined;
|
|
@@ -3407,11 +2412,25 @@ declare function parsePartialTableData<T extends TableName>(table: T, data: unkn
|
|
|
3407
2412
|
createdAt?: Date | undefined;
|
|
3408
2413
|
updatedAt?: Date | undefined;
|
|
3409
2414
|
} | {
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
2415
|
+
name?: string | undefined;
|
|
2416
|
+
datasetId?: string | null | undefined;
|
|
2417
|
+
columns?: {
|
|
2418
|
+
id: string;
|
|
2419
|
+
name: string;
|
|
2420
|
+
position: number;
|
|
2421
|
+
modelName: string;
|
|
2422
|
+
messages: {
|
|
2423
|
+
role: "system" | "user" | "assistant";
|
|
2424
|
+
content: string;
|
|
2425
|
+
}[];
|
|
2426
|
+
providerConfigId?: string | null | undefined;
|
|
2427
|
+
providerSlug?: string | null | undefined;
|
|
2428
|
+
temperature?: number | null | undefined;
|
|
2429
|
+
maxTokens?: number | null | undefined;
|
|
2430
|
+
topP?: number | null | undefined;
|
|
2431
|
+
frequencyPenalty?: number | null | undefined;
|
|
2432
|
+
presencePenalty?: number | null | undefined;
|
|
2433
|
+
}[] | null | undefined;
|
|
3415
2434
|
id?: string | undefined;
|
|
3416
2435
|
createdAt?: Date | undefined;
|
|
3417
2436
|
updatedAt?: Date | undefined;
|
|
@@ -3443,6 +2462,14 @@ declare function parsePartialTableData<T extends TableName>(table: T, data: unkn
|
|
|
3443
2462
|
id?: string | undefined;
|
|
3444
2463
|
createdAt?: Date | undefined;
|
|
3445
2464
|
updatedAt?: Date | undefined;
|
|
2465
|
+
} | {
|
|
2466
|
+
name?: string | undefined;
|
|
2467
|
+
description?: string | null | undefined;
|
|
2468
|
+
recordCount?: number | undefined;
|
|
2469
|
+
latestVersionNumber?: number | undefined;
|
|
2470
|
+
id?: string | undefined;
|
|
2471
|
+
createdAt?: Date | undefined;
|
|
2472
|
+
updatedAt?: Date | undefined;
|
|
3446
2473
|
} | {
|
|
3447
2474
|
datasetId?: string | undefined;
|
|
3448
2475
|
versionNumber?: number | undefined;
|
|
@@ -3468,14 +2495,6 @@ declare function parsePartialTableData<T extends TableName>(table: T, data: unkn
|
|
|
3468
2495
|
id?: string | undefined;
|
|
3469
2496
|
createdAt?: Date | undefined;
|
|
3470
2497
|
updatedAt?: Date | undefined;
|
|
3471
|
-
} | {
|
|
3472
|
-
providerConfigId?: string | undefined;
|
|
3473
|
-
guardrailConfigId?: string | undefined;
|
|
3474
|
-
enabled?: boolean | undefined;
|
|
3475
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
3476
|
-
id?: string | undefined;
|
|
3477
|
-
createdAt?: Date | undefined;
|
|
3478
|
-
updatedAt?: Date | undefined;
|
|
3479
2498
|
} | {
|
|
3480
2499
|
requestId?: string | undefined;
|
|
3481
2500
|
configId?: string | null | undefined;
|
|
@@ -3536,6 +2555,35 @@ declare function parsePartialTableData<T extends TableName>(table: T, data: unkn
|
|
|
3536
2555
|
id?: string | undefined;
|
|
3537
2556
|
createdAt?: Date | undefined;
|
|
3538
2557
|
updatedAt?: Date | undefined;
|
|
2558
|
+
} | {
|
|
2559
|
+
traceId?: string | undefined;
|
|
2560
|
+
spanId?: string | undefined;
|
|
2561
|
+
parentSpanId?: string | null | undefined;
|
|
2562
|
+
name?: string | undefined;
|
|
2563
|
+
kind?: number | undefined;
|
|
2564
|
+
status?: number | undefined;
|
|
2565
|
+
statusMessage?: string | null | undefined;
|
|
2566
|
+
startTime?: Date | undefined;
|
|
2567
|
+
endTime?: Date | null | undefined;
|
|
2568
|
+
durationMs?: number | null | undefined;
|
|
2569
|
+
provider?: string | null | undefined;
|
|
2570
|
+
model?: string | null | undefined;
|
|
2571
|
+
promptTokens?: number | undefined;
|
|
2572
|
+
completionTokens?: number | undefined;
|
|
2573
|
+
totalTokens?: number | undefined;
|
|
2574
|
+
cost?: number | undefined;
|
|
2575
|
+
configId?: string | null | undefined;
|
|
2576
|
+
variantId?: string | null | undefined;
|
|
2577
|
+
environmentId?: string | null | undefined;
|
|
2578
|
+
providerConfigId?: string | null | undefined;
|
|
2579
|
+
requestId?: string | null | undefined;
|
|
2580
|
+
source?: string | undefined;
|
|
2581
|
+
input?: unknown;
|
|
2582
|
+
output?: unknown;
|
|
2583
|
+
attributes?: Record<string, unknown> | undefined;
|
|
2584
|
+
id?: string | undefined;
|
|
2585
|
+
createdAt?: Date | undefined;
|
|
2586
|
+
updatedAt?: Date | undefined;
|
|
3539
2587
|
} | {
|
|
3540
2588
|
id?: string | undefined;
|
|
3541
2589
|
traceId?: string | undefined;
|