/**
 * Core Utilities
 *
 * Shared utility functions used across the BFF.
 */

// Array utilities
export { chunkArray, groupBy, uniqueBy } from "./array.util.js";

// Error utilities
export { extractErrorMessage } from "./error.util.js";
export { withErrorHandling, withErrorSuppression, withErrorLogging } from "./error-handler.util.js";

// Retry utilities
export {
  withRetry,
  withRetrySafe,
  sleep,
  calculateBackoffDelay,
  getRateLimitDelay,
  RetryableErrors,
  type RetryOptions,
  type RetryResult,
} from "./retry.util.js";

// Validation utilities
export { parseUuidOrThrow } from "./validation.util.js";

// SSO utilities
export { sanitizeWhmcsRedirectPath } from "./sso.util.js";
