import { BetterAuthOptions } from "better-auth";

//#region src/application/logging/Logger.d.ts
interface Logger {
  info(message: string, exception?: Error): void;
  warn(message: string, exception?: Error): void;
  error(message: string, exception?: Error): void;
  debug(message: string, exception?: Error): void;
}
interface LoggerFactory {
  create(scope: string): Logger;
}
//#endregion
//#region src/presentation/config/CodemationAuthConfig.d.ts
/**
 * Consumer-declared authentication profile for the hosted UI + HTTP API.
 * Social provider ids intentionally match Better Auth's provider ids so config stays 1:1 with the auth runtime.
 */
type CodemationAuthKind = "local" | "oauth" | "oidc" | "managed";
type CodemationAuthOAuthProviderId = Extract<keyof NonNullable<BetterAuthOptions["socialProviders"]>, "github" | "google" | "microsoft">;
interface CodemationAuthOAuthProviderConfig {
  readonly provider: CodemationAuthOAuthProviderId;
  readonly clientIdEnv: string;
  readonly clientSecretEnv: string;
  /** Microsoft tenant; environment variable name whose value is the tenant ID. */
  readonly tenantIdEnv?: string;
}
interface CodemationAuthOidcProviderConfig {
  readonly id: string;
  readonly issuer: string;
  readonly clientIdEnv: string;
  readonly clientSecretEnv: string;
}
interface CodemationAuthConfig {
  readonly kind: CodemationAuthKind;
  /**
   * When true and NODE_ENV is not production, the API accepts requests without a real session
   * (synthetic principal only — never honored in production).
   */
  readonly allowUnauthenticatedInDevelopment?: boolean;
  readonly oauth?: ReadonlyArray<CodemationAuthOAuthProviderConfig>;
  readonly oidc?: ReadonlyArray<CodemationAuthOidcProviderConfig>;
}
//#endregion
//#region src/presentation/config/CodemationLogConfig.d.ts
/**
 * Minimum level for namespaces matched by {@link CodemationLogRule.filter}.
 * `silent` suppresses all log lines for matching namespaces.
 */
type CodemationLogLevelName = "debug" | "info" | "warn" | "error" | "silent";
/**
 * One rule: {@link filter} is one glob or several (`*` = any substring; a lone `*` matches all namespaces).
 * If multiple patterns are given, **any** match applies this rule’s level.
 * Rules are evaluated in order; the **first** rule whose filter set matches wins.
 */
type CodemationLogRule = Readonly<{
  filter: string | ReadonlyArray<string>;
  level: CodemationLogLevelName;
}>;
/**
 * Either a single rule (`{ filter, level }`) or multiple `{ rules: [...] }`.
 * Put broader patterns last, e.g. `{ filter: "codemation.webhooks.*", level: "info" }` then `{ filter: "*", level: "warn" }`.
 * Use an array for `filter` to match several namespaces with the same level, e.g. `filter: ["codemation.webhooks.*", "codemation.engine.triggers"]`.
 */
type CodemationLogConfig = Readonly<{
  rules: ReadonlyArray<CodemationLogRule>;
}> | CodemationLogRule;
//#endregion
//#region src/presentation/config/CodemationWhitelabelConfig.d.ts
/**
 * Optional host shell whitelabeling (sidebar, login, document title).
 * `logoPath` is resolved relative to the consumer project root.
 */
interface CodemationWhitelabelConfig {
  readonly productName?: string;
  /** Relative to consumer project root, e.g. `branding/logo.svg`. */
  readonly logoPath?: string;
}
//#endregion
export { CodemationAuthConfig as a, CodemationAuthOidcProviderConfig as c, CodemationLogRule as i, Logger as l, CodemationLogConfig as n, CodemationAuthKind as o, CodemationLogLevelName as r, CodemationAuthOAuthProviderConfig as s, CodemationWhitelabelConfig as t, LoggerFactory as u };
//# sourceMappingURL=CodemationWhitelabelConfig-Ca2mCUeC.d.ts.map