@llmops/core 0.1.1-beta.1 → 0.1.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { ColumnType, Generated, Kysely, MssqlDialect, MysqlDialect, PostgresDialect, SqliteDialect } from "kysely";
2
- import * as zod0 from "zod";
2
+ import * as zod302 from "zod";
3
3
  import { z } from "zod";
4
4
 
5
5
  //#region src/db/schema.d.ts
@@ -62,6 +62,12 @@ declare const targetingRulesSchema: z.ZodObject<{
62
62
  createdAt: z.ZodDate;
63
63
  updatedAt: z.ZodDate;
64
64
  }, z.core.$strip>;
65
+ declare const workspaceSettingsSchema: z.ZodObject<{
66
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
67
+ id: z.ZodString;
68
+ createdAt: z.ZodDate;
69
+ updatedAt: z.ZodDate;
70
+ }, z.core.$strip>;
65
71
  /**
66
72
  * Zod inferred types (for runtime validation)
67
73
  */
@@ -72,6 +78,7 @@ type Environment = z.infer<typeof environmentsSchema>;
72
78
  type EnvironmentSecret = z.infer<typeof environmentSecretsSchema>;
73
79
  type ConfigVariant = z.infer<typeof configVariantsSchema>;
74
80
  type TargetingRule = z.infer<typeof targetingRulesSchema>;
81
+ type WorkspaceSettings = z.infer<typeof workspaceSettingsSchema>;
75
82
  /**
76
83
  * Kysely Table Interfaces
77
84
  * Derived from Zod schemas with proper column types
@@ -119,6 +126,9 @@ interface TargetingRulesTable extends BaseTable {
119
126
  enabled: ColumnType<boolean, boolean | undefined, boolean | undefined>;
120
127
  conditions: ColumnType<Record<string, unknown>, string, string>;
121
128
  }
129
+ interface WorkspaceSettingsTable extends BaseTable {
130
+ name: string | null;
131
+ }
122
132
  /**
123
133
  * Main Kysely Database interface
124
134
  */
@@ -130,6 +140,7 @@ interface Database {
130
140
  environment_secrets: EnvironmentSecretsTable;
131
141
  config_variants: ConfigVariantsTable;
132
142
  targeting_rules: TargetingRulesTable;
143
+ workspace_settings: WorkspaceSettingsTable;
133
144
  }
134
145
  /**
135
146
  * Table names as a union type
@@ -448,6 +459,34 @@ declare const SCHEMA_METADATA: {
448
459
  };
449
460
  };
450
461
  };
462
+ readonly workspace_settings: {
463
+ readonly order: 8;
464
+ readonly schema: z.ZodObject<{
465
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
466
+ id: z.ZodString;
467
+ createdAt: z.ZodDate;
468
+ updatedAt: z.ZodDate;
469
+ }, z.core.$strip>;
470
+ readonly fields: {
471
+ readonly id: {
472
+ readonly type: "uuid";
473
+ readonly primaryKey: true;
474
+ };
475
+ readonly name: {
476
+ readonly type: "text";
477
+ readonly nullable: true;
478
+ };
479
+ readonly createdAt: {
480
+ readonly type: "timestamp";
481
+ readonly default: "now()";
482
+ };
483
+ readonly updatedAt: {
484
+ readonly type: "timestamp";
485
+ readonly default: "now()";
486
+ readonly onUpdate: "now()";
487
+ };
488
+ };
489
+ };
451
490
  };
452
491
  };
453
492
  /**
@@ -513,6 +552,12 @@ declare const schemas: {
513
552
  createdAt: z.ZodDate;
514
553
  updatedAt: z.ZodDate;
515
554
  }, z.core.$strip>;
555
+ readonly workspace_settings: z.ZodObject<{
556
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
557
+ id: z.ZodString;
558
+ createdAt: z.ZodDate;
559
+ updatedAt: z.ZodDate;
560
+ }, z.core.$strip>;
516
561
  };
517
562
  //#endregion
518
563
  //#region src/db/validation.d.ts
@@ -520,29 +565,7 @@ declare const schemas: {
520
565
  * Validate data against table schema
521
566
  * Useful for runtime validation before inserting/updating
522
567
  */
523
- declare function validateTableData<T extends TableName>(table: T, data: unknown): zod0.ZodSafeParseSuccess<{
524
- slug: string;
525
- id: string;
526
- createdAt: Date;
527
- updatedAt: Date;
528
- name?: string | undefined;
529
- }> | zod0.ZodSafeParseError<{
530
- slug: string;
531
- id: string;
532
- createdAt: Date;
533
- updatedAt: Date;
534
- name?: string | undefined;
535
- }> | zod0.ZodSafeParseSuccess<{
536
- name: string;
537
- id: string;
538
- createdAt: Date;
539
- updatedAt: Date;
540
- }> | zod0.ZodSafeParseError<{
541
- name: string;
542
- id: string;
543
- createdAt: Date;
544
- updatedAt: Date;
545
- }> | zod0.ZodSafeParseSuccess<{
568
+ declare function validateTableData<T extends TableName>(table: T, data: unknown): zod302.ZodSafeParseSuccess<{
546
569
  variantId: string;
547
570
  version: number;
548
571
  provider: string;
@@ -551,7 +574,7 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
551
574
  id: string;
552
575
  createdAt: Date;
553
576
  updatedAt: Date;
554
- }> | zod0.ZodSafeParseError<{
577
+ }> | zod302.ZodSafeParseError<{
555
578
  variantId: string;
556
579
  version: number;
557
580
  provider: string;
@@ -560,33 +583,33 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
560
583
  id: string;
561
584
  createdAt: Date;
562
585
  updatedAt: Date;
563
- }> | zod0.ZodSafeParseSuccess<{
586
+ }> | zod302.ZodSafeParseSuccess<{
564
587
  environmentId: string;
565
588
  keyName: string;
566
589
  keyValue: string;
567
590
  id: string;
568
591
  createdAt: Date;
569
592
  updatedAt: Date;
570
- }> | zod0.ZodSafeParseError<{
593
+ }> | zod302.ZodSafeParseError<{
571
594
  environmentId: string;
572
595
  keyName: string;
573
596
  keyValue: string;
574
597
  id: string;
575
598
  createdAt: Date;
576
599
  updatedAt: Date;
577
- }> | zod0.ZodSafeParseSuccess<{
600
+ }> | zod302.ZodSafeParseSuccess<{
578
601
  configId: string;
579
602
  variantId: string;
580
603
  id: string;
581
604
  createdAt: Date;
582
605
  updatedAt: Date;
583
- }> | zod0.ZodSafeParseError<{
606
+ }> | zod302.ZodSafeParseError<{
584
607
  configId: string;
585
608
  variantId: string;
586
609
  id: string;
587
610
  createdAt: Date;
588
611
  updatedAt: Date;
589
- }> | zod0.ZodSafeParseSuccess<{
612
+ }> | zod302.ZodSafeParseSuccess<{
590
613
  environmentId: string;
591
614
  configId: string;
592
615
  configVariantId: string;
@@ -598,7 +621,7 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
598
621
  createdAt: Date;
599
622
  updatedAt: Date;
600
623
  variantVersionId?: string | null | undefined;
601
- }> | zod0.ZodSafeParseError<{
624
+ }> | zod302.ZodSafeParseError<{
602
625
  environmentId: string;
603
626
  configId: string;
604
627
  configVariantId: string;
@@ -610,21 +633,21 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
610
633
  createdAt: Date;
611
634
  updatedAt: Date;
612
635
  variantVersionId?: string | null | undefined;
636
+ }> | zod302.ZodSafeParseSuccess<{
637
+ id: string;
638
+ createdAt: Date;
639
+ updatedAt: Date;
640
+ name?: string | null | undefined;
641
+ }> | zod302.ZodSafeParseError<{
642
+ id: string;
643
+ createdAt: Date;
644
+ updatedAt: Date;
645
+ name?: string | null | undefined;
613
646
  }>;
614
647
  /**
615
648
  * Validate partial data (for updates)
616
649
  */
617
- declare function validatePartialTableData<T extends TableName>(table: T, data: unknown): zod0.ZodSafeParseSuccess<{
618
- name?: string | undefined;
619
- id?: string | undefined;
620
- createdAt?: Date | undefined;
621
- updatedAt?: Date | undefined;
622
- }> | zod0.ZodSafeParseError<{
623
- name?: string | undefined;
624
- id?: string | undefined;
625
- createdAt?: Date | undefined;
626
- updatedAt?: Date | undefined;
627
- }> | zod0.ZodSafeParseSuccess<{
650
+ declare function validatePartialTableData<T extends TableName>(table: T, data: unknown): zod302.ZodSafeParseSuccess<{
628
651
  variantId?: string | undefined;
629
652
  version?: number | undefined;
630
653
  provider?: string | undefined;
@@ -633,7 +656,7 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
633
656
  id?: string | undefined;
634
657
  createdAt?: Date | undefined;
635
658
  updatedAt?: Date | undefined;
636
- }> | zod0.ZodSafeParseError<{
659
+ }> | zod302.ZodSafeParseError<{
637
660
  variantId?: string | undefined;
638
661
  version?: number | undefined;
639
662
  provider?: string | undefined;
@@ -642,33 +665,33 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
642
665
  id?: string | undefined;
643
666
  createdAt?: Date | undefined;
644
667
  updatedAt?: Date | undefined;
645
- }> | zod0.ZodSafeParseSuccess<{
668
+ }> | zod302.ZodSafeParseSuccess<{
646
669
  environmentId?: string | undefined;
647
670
  keyName?: string | undefined;
648
671
  keyValue?: string | undefined;
649
672
  id?: string | undefined;
650
673
  createdAt?: Date | undefined;
651
674
  updatedAt?: Date | undefined;
652
- }> | zod0.ZodSafeParseError<{
675
+ }> | zod302.ZodSafeParseError<{
653
676
  environmentId?: string | undefined;
654
677
  keyName?: string | undefined;
655
678
  keyValue?: string | undefined;
656
679
  id?: string | undefined;
657
680
  createdAt?: Date | undefined;
658
681
  updatedAt?: Date | undefined;
659
- }> | zod0.ZodSafeParseSuccess<{
682
+ }> | zod302.ZodSafeParseSuccess<{
660
683
  configId?: string | undefined;
661
684
  variantId?: string | undefined;
662
685
  id?: string | undefined;
663
686
  createdAt?: Date | undefined;
664
687
  updatedAt?: Date | undefined;
665
- }> | zod0.ZodSafeParseError<{
688
+ }> | zod302.ZodSafeParseError<{
666
689
  configId?: string | undefined;
667
690
  variantId?: string | undefined;
668
691
  id?: string | undefined;
669
692
  createdAt?: Date | undefined;
670
693
  updatedAt?: Date | undefined;
671
- }> | zod0.ZodSafeParseSuccess<{
694
+ }> | zod302.ZodSafeParseSuccess<{
672
695
  environmentId?: string | undefined;
673
696
  configId?: string | undefined;
674
697
  configVariantId?: string | undefined;
@@ -680,7 +703,7 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
680
703
  id?: string | undefined;
681
704
  createdAt?: Date | undefined;
682
705
  updatedAt?: Date | undefined;
683
- }> | zod0.ZodSafeParseError<{
706
+ }> | zod302.ZodSafeParseError<{
684
707
  environmentId?: string | undefined;
685
708
  configId?: string | undefined;
686
709
  configVariantId?: string | undefined;
@@ -692,22 +715,21 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
692
715
  id?: string | undefined;
693
716
  createdAt?: Date | undefined;
694
717
  updatedAt?: Date | undefined;
718
+ }> | zod302.ZodSafeParseSuccess<{
719
+ name?: string | null | undefined;
720
+ id?: string | undefined;
721
+ createdAt?: Date | undefined;
722
+ updatedAt?: Date | undefined;
723
+ }> | zod302.ZodSafeParseError<{
724
+ name?: string | null | undefined;
725
+ id?: string | undefined;
726
+ createdAt?: Date | undefined;
727
+ updatedAt?: Date | undefined;
695
728
  }>;
696
729
  /**
697
730
  * Parse and validate data, throws on error
698
731
  */
699
732
  declare function parseTableData<T extends TableName>(table: T, data: unknown): {
700
- slug: string;
701
- id: string;
702
- createdAt: Date;
703
- updatedAt: Date;
704
- name?: string | undefined;
705
- } | {
706
- name: string;
707
- id: string;
708
- createdAt: Date;
709
- updatedAt: Date;
710
- } | {
711
733
  variantId: string;
712
734
  version: number;
713
735
  provider: string;
@@ -741,16 +763,16 @@ declare function parseTableData<T extends TableName>(table: T, data: unknown): {
741
763
  createdAt: Date;
742
764
  updatedAt: Date;
743
765
  variantVersionId?: string | null | undefined;
766
+ } | {
767
+ id: string;
768
+ createdAt: Date;
769
+ updatedAt: Date;
770
+ name?: string | null | undefined;
744
771
  };
745
772
  /**
746
773
  * Parse partial data, throws on error
747
774
  */
748
775
  declare function parsePartialTableData<T extends TableName>(table: T, data: unknown): {
749
- name?: string | undefined;
750
- id?: string | undefined;
751
- createdAt?: Date | undefined;
752
- updatedAt?: Date | undefined;
753
- } | {
754
776
  variantId?: string | undefined;
755
777
  version?: number | undefined;
756
778
  provider?: string | undefined;
@@ -784,6 +806,11 @@ declare function parsePartialTableData<T extends TableName>(table: T, data: unkn
784
806
  id?: string | undefined;
785
807
  createdAt?: Date | undefined;
786
808
  updatedAt?: Date | undefined;
809
+ } | {
810
+ name?: string | null | undefined;
811
+ id?: string | undefined;
812
+ createdAt?: Date | undefined;
813
+ updatedAt?: Date | undefined;
787
814
  };
788
815
  //#endregion
789
816
  //#region src/db/migrations.d.ts
@@ -880,4 +907,4 @@ declare function detectDatabaseType(db: unknown): DatabaseType | null;
880
907
  */
881
908
  declare function createDatabaseFromConnection(rawConnection: any, options?: DatabaseOptions): Promise<Kysely<Database> | null>;
882
909
  //#endregion
883
- export { TargetingRulesTable as A, schemas as B, EnvironmentSecretsTable as C, Selectable as D, SCHEMA_METADATA as E, VariantsTable as F, variantVersionsSchema as H, configVariantsSchema as I, configsSchema as L, Variant as M, VariantVersion as N, TableName as O, VariantVersionsTable as P, environmentSecretsSchema as R, EnvironmentSecret as S, Insertable as T, variantsSchema as U, targetingRulesSchema as V, ConfigVariant as _, createDatabaseFromConnection as a, Database as b, MigrationResult as c, runAutoMigrations as d, parsePartialTableData as f, Config as g, validateTableData as h, createDatabase as i, Updateable as j, TargetingRule as k, getMigrations as l, validatePartialTableData as m, DatabaseOptions as n, detectDatabaseType as o, parseTableData as p, DatabaseType as r, MigrationOptions as s, DatabaseConnection as t, matchType as u, ConfigVariantsTable as v, EnvironmentsTable as w, Environment as x, ConfigsTable as y, environmentsSchema as z };
910
+ export { TargetingRulesTable as A, environmentSecretsSchema as B, EnvironmentSecretsTable as C, Selectable as D, SCHEMA_METADATA as E, VariantsTable as F, variantsSchema as G, schemas as H, WorkspaceSettings as I, workspaceSettingsSchema as K, WorkspaceSettingsTable as L, Variant as M, VariantVersion as N, TableName as O, VariantVersionsTable as P, configVariantsSchema as R, EnvironmentSecret as S, Insertable as T, targetingRulesSchema as U, environmentsSchema as V, variantVersionsSchema as W, ConfigVariant as _, createDatabaseFromConnection as a, Database as b, MigrationResult as c, runAutoMigrations as d, parsePartialTableData as f, Config as g, validateTableData as h, createDatabase as i, Updateable as j, TargetingRule as k, getMigrations as l, validatePartialTableData as m, DatabaseOptions as n, detectDatabaseType as o, parseTableData as p, DatabaseType as r, MigrationOptions as s, DatabaseConnection as t, matchType as u, ConfigVariantsTable as v, EnvironmentsTable as w, Environment as x, ConfigsTable as y, configsSchema as z };
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_db = require('./db-gMDwCuHR.cjs');
1
+ const require_db = require('./db-C9-M-kdS.cjs');
2
2
  let __llmops_gateway = require("@llmops/gateway");
3
3
  __llmops_gateway = require_db.__toESM(__llmops_gateway);
4
4
  let __better_auth_utils_random = require("@better-auth/utils/random");
@@ -1381,4 +1381,5 @@ exports.validatePartialTableData = require_db.validatePartialTableData;
1381
1381
  exports.validateTableData = require_db.validateTableData;
1382
1382
  exports.variantJsonDataSchema = variantJsonDataSchema;
1383
1383
  exports.variantVersionsSchema = require_db.variantVersionsSchema;
1384
- exports.variantsSchema = require_db.variantsSchema;
1384
+ exports.variantsSchema = require_db.variantsSchema;
1385
+ exports.workspaceSettingsSchema = require_db.workspaceSettingsSchema;