export { InvalidEnvValueError, MissingEnvValueError } from "@platform/env"
// Re-export drizzle-orm helpers to ensure consistent type instances
export { and, asc, desc, eq, inArray, max } from "drizzle-orm"
export type { Operator, PostgresClient, PostgresConfig, PostgresDb } from "./client.ts"
export {
  closePostgres,
  createPostgresClient,
  createPostgresPool,
} from "./client.ts"
export {
  type BetterAuthConfig,
  createBetterAuth,
  type Session,
  type StripePlanConfig,
  type User,
} from "./create-better-auth.ts"
export { healthcheckPostgres } from "./health.ts"
// Outbox consumer for reliable event publishing
export {
  createPollingOutboxConsumer,
  type OutboxConsumer,
  OutboxConsumerError,
  type OutboxEventRow,
  type PollingOutboxConsumerConfig,
} from "./outbox-consumer.ts"
export { createOutboxWriter, OutboxEventWriterLive } from "./outbox-writer.ts"
export { AdminFeatureFlagRepositoryLive } from "./repositories/admin-feature-flag-repository.ts"
export { AdminOrganizationRepositoryLive } from "./repositories/admin-organization-repository.ts"
export { AdminProjectRepositoryLive } from "./repositories/admin-project-repository.ts"
export { AdminUserRepositoryLive } from "./repositories/admin-user-repository.ts"
export { AlertIncidentRepositoryLive } from "./repositories/alert-incident-repository.ts"
export { AnnotationQueueItemRepositoryLive } from "./repositories/annotation-queue-item-repository.ts"
export { AnnotationQueueRepositoryLive } from "./repositories/annotation-queue-repository.ts"
export { ApiKeyRepositoryLive } from "./repositories/api-key-repository.ts"
export { BillingOverrideRepositoryLive } from "./repositories/billing-override-repository.ts"
export { BillingUsageEventRepositoryLive } from "./repositories/billing-usage-event-repository.ts"
export { BillingUsagePeriodRepositoryLive } from "./repositories/billing-usage-period-repository.ts"
export { DatasetRepositoryLive } from "./repositories/dataset-repository.ts"
// Repository implementations
export { EvaluationAlignmentExamplesRepositoryLive } from "./repositories/evaluation-alignment-examples-repository.ts"
export { EvaluationRepositoryLive } from "./repositories/evaluation-repository.ts"
export { FeatureFlagRepositoryLive } from "./repositories/feature-flag-repository.ts"
export { FlaggerRepositoryLive } from "./repositories/flagger-repository.ts"
export { InvitationRepositoryLive } from "./repositories/invitation-repository.ts"
export { IssueRepositoryLive } from "./repositories/issue-repository.ts"
export { MembershipRepositoryLive } from "./repositories/membership-repository.ts"
export { NotificationRepositoryLive } from "./repositories/notification-repository.ts"
export { OAuthKeyRepositoryLive } from "./repositories/oauth-key-repository.ts"
export { OrganizationRepositoryLive } from "./repositories/organization-repository.ts"
export { ProjectRepositoryLive } from "./repositories/project-repository.ts"
export { SavedSearchRepositoryLive } from "./repositories/saved-search-repository.ts"
export { ScoreRepositoryLive } from "./repositories/score-repository.ts"
export { SettingsReaderLive } from "./repositories/settings-reader-repository.ts"
export { StripeBillingProviderLive } from "./repositories/stripe-billing-provider.ts"
export { StripeSubscriptionLookupLive } from "./repositories/stripe-subscription-lookup.ts"
export { UserRepositoryLive } from "./repositories/user-repository.ts"
export { WrappedReportRepositoryLive } from "./repositories/wrapped-report-repository.ts"
export { invalidateEffectivePlanCache, resolveEffectivePlanCached } from "./resolve-effective-plan-cached.ts"
export { seedDemoProjectPostgres } from "./seeds/seed-demo-project.ts"
// SqlClient implementation
export { SqlClientLive } from "./sql-client.ts"
export { withPostgres } from "./with-postgres.ts"
