import * as _alepha_core0 from "alepha";
import { Alepha, HookDescriptor } from "alepha";

//#region src/providers/ServerHelmetProvider.d.ts
type CspDirective = string | string[];
interface CspOptions {
  directives: {
    "default-src"?: CspDirective;
    "script-src"?: CspDirective;
    "style-src"?: CspDirective;
    "img-src"?: CspDirective;
    "connect-src"?: CspDirective;
    "font-src"?: CspDirective;
    "object-src"?: CspDirective;
    "media-src"?: CspDirective;
    "frame-src"?: CspDirective;
    sandbox?: CspDirective | boolean;
    "report-uri"?: string;
    "child-src"?: CspDirective;
    "form-action"?: CspDirective;
    "frame-ancestors"?: CspDirective;
    "plugin-types"?: CspDirective;
    "base-uri"?: CspDirective;
    [key: string]: CspDirective | undefined | boolean;
  };
}
interface HstsOptions {
  maxAge?: number;
  includeSubDomains?: boolean;
  preload?: boolean;
}
interface HelmetOptions {
  isSecure?: boolean;
  strictTransportSecurity?: HstsOptions | false;
  xContentTypeOptions?: false;
  xFrameOptions?: "DENY" | "SAMEORIGIN" | false;
  xXssProtection?: false;
  contentSecurityPolicy?: CspOptions | false;
  referrerPolicy?: "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url" | false;
}
/**
 * Provides a configurable way to apply essential HTTP security headers
 * to every server response, without external dependencies.
 */
declare class ServerHelmetProvider {
  protected readonly alepha: Alepha;
  /**
   * The configuration options. These can be overridden during
   * the application's configuration phase using `alepha.configure()`.
   */
  options: HelmetOptions;
  private buildHeaders;
  protected readonly onResponse: HookDescriptor<"server:onResponse">;
}
//#endregion
//#region src/index.d.ts
/**
 * Automatically adds important HTTP security headers to every response
 * to help protect your application from common web vulnerabilities.
 *
 * @see {@link ServerHelmetProvider}
 * @module alepha.server.helmet
 */
declare const AlephaServerHelmet: _alepha_core0.Service<_alepha_core0.Module>;
//# sourceMappingURL=index.d.ts.map

//#endregion
export { AlephaServerHelmet, CspOptions, HelmetOptions, HstsOptions, ServerHelmetProvider };
//# sourceMappingURL=index.d.ts.map