import { Querier } from "@platform-modules/db";
//#region src/settings-schema.d.ts
declare const settingsKv: import("drizzle-orm/pg-core").PgTableWithColumns<{
  name: "settings_kv";
  schema: undefined;
  columns: {
    key: import("drizzle-orm/pg-core").PgColumn<{
      name: "key";
      tableName: "settings_kv";
      dataType: "string";
      columnType: "PgText";
      data: string;
      driverParam: string;
      notNull: true;
      hasDefault: false;
      isPrimaryKey: true;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: [string, ...string[]];
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {}>;
    value: import("drizzle-orm/pg-core").PgColumn<{
      name: "value";
      tableName: "settings_kv";
      dataType: "json";
      columnType: "PgJsonb";
      data: unknown;
      driverParam: unknown;
      notNull: true;
      hasDefault: false;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: undefined;
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {}>;
    updatedAt: import("drizzle-orm/pg-core").PgColumn<{
      name: "updated_at";
      tableName: "settings_kv";
      dataType: "date";
      columnType: "PgTimestamp";
      data: Date;
      driverParam: string;
      notNull: true;
      hasDefault: true;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: undefined;
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {}>;
  };
  dialect: "pg";
}>;
declare const settingsSchema: {
  settingsKv: import("drizzle-orm/pg-core").PgTableWithColumns<{
    name: "settings_kv";
    schema: undefined;
    columns: {
      key: import("drizzle-orm/pg-core").PgColumn<{
        name: "key";
        tableName: "settings_kv";
        dataType: "string";
        columnType: "PgText";
        data: string;
        driverParam: string;
        notNull: true;
        hasDefault: false;
        isPrimaryKey: true;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: [string, ...string[]];
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {}>;
      value: import("drizzle-orm/pg-core").PgColumn<{
        name: "value";
        tableName: "settings_kv";
        dataType: "json";
        columnType: "PgJsonb";
        data: unknown;
        driverParam: unknown;
        notNull: true;
        hasDefault: false;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: undefined;
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {}>;
      updatedAt: import("drizzle-orm/pg-core").PgColumn<{
        name: "updated_at";
        tableName: "settings_kv";
        dataType: "date";
        columnType: "PgTimestamp";
        data: Date;
        driverParam: string;
        notNull: true;
        hasDefault: true;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: undefined;
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {}>;
    };
    dialect: "pg";
  }>;
};
type SettingsSchema = typeof settingsSchema;
//#endregion
//#region src/settings.d.ts
interface SettingsStore {
  get<T = unknown>(key: string): Promise<T | null>;
  getMany(keys: string[]): Promise<Record<string, unknown>>;
  set(key: string, value: unknown): Promise<void>;
  all(): Promise<Record<string, unknown>>;
  remove(key: string): Promise<void>;
}
declare class SettingsValidationError extends Error {
  readonly field: string;
  readonly detail: string;
  readonly name = "SettingsValidationError";
  constructor(field: string, detail: string);
}
declare const SETTINGS_KEYS: {
  readonly siteName: "site.name";
  readonly siteUrl: "site.url";
  readonly logo: "site.logo";
  readonly homepage: "site.homepage";
  readonly maintenance: "site.maintenance";
};
declare function settingsTableSql(table?: string): string;
declare function createDbSettingsStore(db: Querier<SettingsSchema>, _opts?: {
  table?: string;
}): SettingsStore;
//#endregion
export { SETTINGS_KEYS, type SettingsSchema, SettingsStore, SettingsValidationError, createDbSettingsStore, settingsKv, settingsSchema, settingsTableSql };