/**
 *  @module     Code
 *  @overview   Defines the `Code` enum that encapsulates HTTP status codes used throughout
 *              the application.
 * 
 *  @author     Animesh Mishra <hello@animesh.ltd>
 *  @copyright  © 2018 Animesh Ltd. All Rights Reserved.
 */

/**
 *  HTTP status codes used throughout the application to report exceptions to the
 *  client.
 *  @exports Code
 */
export enum Code {
    // Informational
    Continue             = 100,
    SwitchingProtocols   = 101,
    Processing           = 102,

    // Success
    OK                   = 200,
    Created              = 201,
    Accepted             = 202,
    NonAuthInformation   = 203,
    NoContent            = 204,
    ResetContent         = 205,
    PartialContent       = 206,
    MultiStatus          = 207,
    AlreadyReported      = 208,
    IMUsed               = 226,

    // Redirection
    MultipleChoices      = 300,
    MovedPermanently     = 301,
    Found                = 302,
    SeeOther             = 303,
    NotModified          = 304,
    UseProxy             = 305,
    TemporaryRedirect    = 307,
    PermanentRedirect    = 308,

    // Client Error
    BadRequest           = 400,
    Unauthorised         = 401,
    PaymentRequired      = 402,
    Forbidden            = 403,
    NotFound             = 404,
    MethodNotAllowed     = 405,
    NotAcceptable        = 406,
    ProxyAuthRequired    = 407,
    RequestTimeout       = 408,
    Conflict             = 409,
    Gone                 = 410,
    LengthRequired       = 411,
    PreconditionFailed   = 412,
    PayloadTooLarge      = 413,
    RequestURITooLong    = 414,
    UnsupportedMedia     = 415,
    RangeNotSatisfiable  = 416,
    ExpectationFailed    = 417,
    Teapot               = 418,
    Misdirected          = 421,
    Unprocessable        = 422,
    Locked               = 423,
    FailedDependency     = 424,
    UpgradeRequired      = 426,
    PreconditionRequired = 428,
    TooManyRequests      = 429,
    HeadersTooLarge      = 431,
    NoResponse           = 444,
    LegalLock            = 451,
    ClientClosedRequest  = 499,

    // Server Error
    Internal             = 500,
    NotImplemented       = 501,
    BadGateway           = 502,
    ServiceUnavailable   = 503,
    GatewayTimeout       = 504,
    UnsupportedVersion   = 505,
    VariantNegotiates    = 506,
    InsufficientStorage  = 507,
    LoopDetected         = 508,
    NotExtended          = 510,
    NetworkAuthRequired  = 511,
    ConnectTimeout       = 599
}