/**
 * @djangocfg/api — package entry point.
 *
 * Per-group API singletons + API classes + shared utilities.
 *
 * Usage:
 *   import { cfgAccountsApi, AccountsTypes } from '@djangocfg/api';
 *   await cfgAccountsApi.accounts.cfgAccountsLogin({ body });
 */

export * from './_api/generated';

// Hey API SDK classes (one per OpenAPI tag) — direct callable static methods.
export {
  CfgAccountsApiKey,
  CfgAccountsOauth,
  CfgAccounts,
  CfgAccountsProfile,
  CfgAccountsAuth,
  CfgCentrifugo,
  CfgTotpBackupCodes,
  CfgTotp,
  CfgTotpSetup,
  CfgTotpVerify,
} from './_api/generated/sdk.gen';

// Type namespaces (one per group) for code that needs `AccountsTypes.User`.
export type * as AccountsTypes from './_api/generated/_cfg_accounts/types.gen';
export type * as TotpTypes from './_api/generated/_cfg_totp/types.gen';
export type * as CentrifugoTypes from './_api/generated/_cfg_centrifugo/types.gen';

// Convenience top-level type re-exports.
export type { User } from './_api/generated/_cfg_accounts/types.gen';

// Legacy alias for code that still imports `api` (= cfg_accounts singleton).
export { CfgAccountsApi as api } from './_api/generated';

// Global runtime log-level control (role-aware verbosity).
export {
  getLogLevel,
  setLogLevel,
  onLogLevelChange,
  applyRoleLogPolicy,
  type ConsolaLevel,
} from './log-control';

// Env flags — single source of truth (api is the lowest shared package).
export { isDev, isProd, isBrowser, isStaticBuild, dpopEnabled } from './auth/utils/env';
