intlayer-editor
Version:
Integrate the Intlayer visual editor into your Intlayer projects, enabling CMS-like content management with multilingual support.
1 lines • 17.5 kB
Source Map (JSON)
{"version":3,"file":"httpStatusCodes.cjs","names":[],"sources":["../../src/utils/httpStatusCodes.ts"],"sourcesContent":["/**\n * Enum for HTTP response status codes.\n * Contains all the possible HTTP response codes according to the standard.\n *\n *\n * 1xx: Informational responses\n *\n *\n * 100 - CONTINUE - The server has received the request headers and the client should proceed to send the request body.\n *\n * 101 - SWITCHING_PROTOCOLS - The requester has asked the server to switch protocols and the server has agreed to do so.\n *\n * 102 - PROCESSING - Used to return some response headers before final HTTP message.\n *\n * 103 - EARLY_HINTS - Early hints - part of optimization to improve page load time.\n *\n *\n * 2xx: Successful responses\n *\n *\n * 200 - OK - The request has succeeded.\n *\n * 201 - CREATED - The request has been fulfilled and has resulted in one or more new resources being created.\n *\n * 202 - ACCEPTED - The request has been accepted for processing, but the processing has not been completed.\n *\n * 203 - NON_AUTHORITATIVE_INFORMATION - The server successfully processed the request, but is returning information that may be from another source.\n *\n * 204 - NO_CONTENT - The server successfully processed the request and is not returning any content.\n *\n * 205 - RESET_CONTENT - The server successfully processed the request, but is not returning any content and requires that the requester reset the document view.\n *\n * 206 - PARTIAL_CONTENT - The server is delivering only part of the resource due to a range header sent by the client.\n *\n * 207 - MULTI_STATUS - Multi-status response providing status for multiple independent operations.\n *\n * 208 - ALREADY_REPORTED - The members of a DAV binding have already been enumerated in a preceding part of the request.\n *\n * 226 - IM_USED - The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance manipulations applied to the current instance.\n *\n *\n * 3xx: Redirection messages\n *\n *\n * 300 - MULTIPLE_CHOICES - The request has more than one possible response. The user-agent or user should choose one of them.\n *\n * 301 - MOVED_PERMANENTLY - The URL of the requested resource has been changed permanently.\n *\n * 302 - FOUND - The requested resource is available at a different URI.\n *\n * 303 - SEE_OTHER - The response to the request can be found under another URI using a GET method.\n *\n * 304 - NOT_MODIFIED - Indicates that the resource has not been modified since the version specified by the request headers.\n *\n * 305 - USE_PROXY - The requested resource must be accessed through the proxy given by the Location field.\n *\n * 306 - SWITCH_PROXY - No longer used. Originally meant to direct the client to switch to a different proxy.\n *\n * 307 - TEMPORARY_REDIRECT - The requested resource resides temporarily under a different URI.\n *\n * 308 - PERMANENT_REDIRECT - The request should be repeated with another URI, but future requests should still use the original URI.\n *\n *\n * 4xx: Client error responses\n *\n *\n * 400 - BAD_REQUEST - The server cannot or will not process the request due to something perceived to be a client error.\n *\n * 401 - UNAUTHORIZED - The client must authenticate itself to get the requested response.\n *\n * 403 - FORBIDDEN - The client does not have access rights to the content.\n *\n * 404 - NOT_FOUND - The server can not find the requested resource.\n *\n * 405 - METHOD_NOT_ALLOWED - The request method is known by the server but is not supported by the target resource.\n *\n * 406 - NOT_ACCEPTABLE - This response is sent when the requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.\n *\n * 407 - PROXY_AUTHENTICATION_REQUIRED - This is similar to 401 but authentication is needed to be done by a proxy.\n *\n * 408 - REQUEST_TIMEOUT - This response is sent on an idle connection by some servers, even without any previous request by the client.\n *\n * 409 - CONFLICT - This response is sent when a request conflicts with the current state of the server.\n *\n * 410 - GONE - This response is sent when the requested resource is no longer available and will not be available again.\n *\n * 411 - LENGTH_REQUIRED - The request did not specify the length of its content, which is required by the requested resource.\n *\n * 412 - PRECONDITION_FAILED - The server does not meet one of the preconditions that the requester put on the request.\n *\n * 413 - PAYLOAD_TOO_LARGE - The request is larger than the server is willing or able to process.\n *\n * 414 - URI_TOO_LONG - The URI requested by the client is longer than the server is willing to interpret.\n *\n * 415 - UNSUPPORTED_MEDIA_TYPE - The media format of the requested data is not supported by the server.\n *\n * 416 - RANGE_NOT_SATISFIABLE - The range specified by the Range header field in the request can't be fulfilled.\n *\n * 417 - EXPECTATION_FAILED - The expectation indicated by the Expect request header field can't be met by the server.\n *\n * 418 - IM_A_TEAPOT - The server refuses the attempt to brew coffee with a teapot.\n *\n * 421 - MISDIRECTED_REQUEST - The request was directed at a server that is not able to produce a response.\n *\n * 422 - UNPROCESSABLE_ENTITY - The request was well-formed but was unable to be followed due to semantic errors.\n *\n * 423 - LOCKED - The resource that is being accessed is locked.\n *\n * 424 - FAILED_DEPENDENCY - The request failed due to failure of a previous request.\n *\n * 425 - TOO_EARLY - Indicates that the server is unwilling to risk processing a request that might be replayed.\n *\n * 426 - UPGRADE_REQUIRED - The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.\n *\n * 428 - PRECONDITION_REQUIRED - The origin server requires the request to be conditional.\n *\n * 429 - TOO_MANY_REQUESTS - The user has sent too many requests in a given amount of time.\n *\n * 431 - REQUEST_HEADER_FIELDS_TOO_LARGE - The server is unwilling to process the request because its header fields are too large.\n *\n * 451 - UNAVAILABLE_FOR_LEGAL_REASONS - The user-agent requested a resource that cannot legally be provided, such as a censored resource.\n *\n *\n * 5xx: Server error responses\n *\n *\n * 500 - INTERNAL_SERVER_ERROR - The server encountered an unexpected condition that prevented it from fulfilling the request.\n *\n * 501 - NOT_IMPLEMENTED - The server does not support the functionality required to fulfill the request.\n *\n * 502 - BAD_GATEWAY - The server, while acting as a gateway or proxy, received an invalid response from the upstream server.\n *\n * 503 - SERVICE_UNAVAILABLE - The server is currently unavailable (because it is overloaded or down for maintenance).\n *\n * 504 - GATEWAY_TIMEOUT - The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.\n *\n * 505 - HTTP_VERSION_NOT_SUPPORTED - The server does not support the HTTP protocol version used in the request.\n *\n * 506 - VARIANT_ALSO_NEGOTIATES - The server has an internal configuration error, such as a misconfigured gateway.\n *\n * 507 - INSUFFICIENT_STORAGE - The server is unable to store the representation needed to complete the request.\n *\n * 508 - LOOP_DETECTED - The server detected an infinite loop while processing a request.\n */\nexport enum HttpStatusCodes {\n //* ********************************\n // 1xx: Informational responses\n //* ********************************\n\n /**\n * The server has received the request headers and the client should proceed to send the request body.\n */\n CONTINUE_100 = 100,\n\n /**\n * The requester has asked the server to switch protocols and the server has agreed to do so.\n */\n SWITCHING_PROTOCOLS_101 = 101,\n\n /**\n * Used to return some response headers before final HTTP message.\n */\n PROCESSING_102 = 102, // WebDAV\n\n /**\n * Early hints - part of optimization to improve page load time.\n */\n EARLY_HINTS_103 = 103,\n\n //* ********************************\n // 2xx: Successful responses\n //* ********************************\n\n /**\n * The request has succeeded.\n */\n OK_200 = 200,\n\n /**\n * The request has been fulfilled and has resulted in one or more new resources being created.\n */\n CREATED_201 = 201,\n\n /**\n * The request has been accepted for processing, but the processing has not been completed.\n */\n ACCEPTED_202 = 202,\n\n /**\n * The server successfully processed the request, but is returning information that may be from another source.\n */\n NON_AUTHORITATIVE_INFORMATION_203 = 203,\n\n /**\n * The server successfully processed the request and is not returning any content.\n */\n NO_CONTENT_204 = 204,\n\n /**\n * The server successfully processed the request, but is not returning any content and requires that the requester reset the document view.\n */\n RESET_CONTENT_205 = 205,\n\n /**\n * The server is delivering only part of the resource due to a range header sent by the client.\n */\n PARTIAL_CONTENT_206 = 206,\n\n /**\n * Multi-status response providing status for multiple independent operations.\n */\n MULTI_STATUS_207 = 207, // WebDAV\n\n /**\n * The members of a DAV binding have already been enumerated in a preceding part of the request.\n */\n ALREADY_REPORTED_208 = 208, // WebDAV\n\n /**\n * The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance manipulations applied to the current instance.\n */\n IM_USED_226 = 226,\n\n //* ********************************\n // 3xx: Redirection messages\n //* ********************************\n\n /**\n * The request has more than one possible response. The user-agent or user should choose one of them.\n */\n MULTIPLE_CHOICES_300 = 300,\n\n /**\n * The URL of the requested resource has been changed permanently.\n */\n MOVED_PERMANENTLY_301 = 301,\n\n /**\n * The requested resource is available at a different URI.\n */\n FOUND_302 = 302,\n\n /**\n * The response to the request can be found under another URI using a GET method.\n */\n SEE_OTHER_303 = 303,\n\n /**\n * Indicates that the resource has not been modified since the version specified by the request headers.\n */\n NOT_MODIFIED_304 = 304,\n\n /**\n * The requested resource must be accessed through the proxy given by the Location field.\n */\n USE_PROXY_305 = 305,\n\n /**\n * No longer used. Originally meant to direct the client to switch to a different proxy.\n */\n SWITCH_PROXY_306 = 306,\n\n /**\n * The requested resource resides temporarily under a different URI.\n */\n TEMPORARY_REDIRECT_307 = 307,\n\n /**\n * The request should be repeated with another URI, but future requests should still use the original URI.\n */\n PERMANENT_REDIRECT_308 = 308,\n\n //* ********************************\n // 4xx: Client error responses\n //* ********************************\n\n /**\n * The server cannot or will not process the request due to something perceived to be a client error.\n */\n BAD_REQUEST_400 = 400,\n\n /**\n * The client must authenticate itself to get the requested response.\n */\n UNAUTHORIZED_401 = 401,\n\n /**\n * The client does not have access rights to the content.\n */\n FORBIDDEN_403 = 403,\n\n /**\n * The server can not find the requested resource.\n */\n NOT_FOUND_404 = 404,\n\n /**\n * The request method is known by the server but is not supported by the target resource.\n */\n METHOD_NOT_ALLOWED_405 = 405,\n\n /**\n * This response is sent when the requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.\n */\n NOT_ACCEPTABLE_406 = 406,\n\n /**\n * This is similar to 401 but authentication is needed to be done by a proxy.\n */\n PROXY_AUTHENTICATION_REQUIRED_407 = 407,\n\n /**\n * This response is sent on an idle connection by some servers, even without any previous request by the client.\n */\n REQUEST_TIMEOUT_408 = 408,\n\n /**\n * This response is sent when a request conflicts with the current state of the server.\n */\n CONFLICT_409 = 409,\n\n /**\n * This response is sent when the requested resource is no longer available and will not be available again.\n */\n GONE_410 = 410,\n\n /**\n * The request did not specify the length of its content, which is required by the requested resource.\n */\n LENGTH_REQUIRED_411 = 411,\n\n /**\n * The server does not meet one of the preconditions that the requester put on the request.\n */\n PRECONDITION_FAILED_412 = 412,\n\n /**\n * The request is larger than the server is willing or able to process.\n */\n PAYLOAD_TOO_LARGE_413 = 413,\n\n /**\n * The URI requested by the client is longer than the server is willing to interpret.\n */\n URI_TOO_LONG_414 = 414,\n\n /**\n * The media format of the requested data is not supported by the server.\n */\n UNSUPPORTED_MEDIA_TYPE_415 = 415,\n\n /**\n * The range specified by the Range header field in the request can't be fulfilled.\n */\n RANGE_NOT_SATISFIABLE_416 = 416,\n\n /**\n * The expectation indicated by the Expect request header field can't be met by the server.\n */\n EXPECTATION_FAILED_417 = 417,\n\n /**\n * The server refuses the attempt to brew coffee with a teapot.\n */\n IM_A_TEAPOT_418 = 418, // Easter egg from the HTCPCP/1.0 protocol.\n\n /**\n * The request was directed at a server that is not able to produce a response.\n */\n MISDIRECTED_REQUEST_421 = 421,\n\n /**\n * The request was well-formed but was unable to be followed due to semantic errors.\n */\n UNPROCESSABLE_ENTITY_422 = 422, // WebDAV\n\n /**\n * The resource that is being accessed is locked.\n */\n LOCKED_423 = 423, // WebDAV\n\n /**\n * The request failed due to failure of a previous request.\n */\n FAILED_DEPENDENCY_424 = 424, // WebDAV\n\n /**\n * Indicates that the server is unwilling to risk processing a request that might be replayed.\n */\n TOO_EARLY_425 = 425,\n\n /**\n * The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.\n */\n UPGRADE_REQUIRED_426 = 426,\n\n /**\n * The origin server requires the request to be conditional.\n */\n PRECONDITION_REQUIRED_428 = 428,\n\n /**\n * The user has sent too many requests in a given amount of time.\n */\n TOO_MANY_REQUESTS_429 = 429,\n\n /**\n * The server is unwilling to process the request because its header fields are too large.\n */\n REQUEST_HEADER_FIELDS_TOO_LARGE_431 = 431,\n\n /**\n * The user-agent requested a resource that cannot legally be provided, such as a censored resource.\n */\n UNAVAILABLE_FOR_LEGAL_REASONS_451 = 451,\n\n //* ********************************\n // 5xx: Server error responses\n //* ********************************\n\n /**\n * The server encountered an unexpected condition that prevented it from fulfilling the request.\n */\n INTERNAL_SERVER_ERROR_500 = 500,\n\n /**\n * The server does not support the functionality required to fulfill the request.\n */\n NOT_IMPLEMENTED_501 = 501,\n\n /**\n * The server, while acting as a gateway or proxy, received an invalid response from the upstream server.\n */\n BAD_GATEWAY_502 = 502,\n\n /**\n * The server is currently unavailable (because it is overloaded or down for maintenance).\n */\n SERVICE_UNAVAILABLE_503 = 503,\n\n /**\n * The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.\n */\n GATEWAY_TIMEOUT_504 = 504,\n\n /**\n * The server does not support the HTTP protocol version used in the request.\n */\n HTTP_VERSION_NOT_SUPPORTED_505 = 505,\n\n /**\n * The server has an internal configuration error, such as a misconfigured gateway.\n */\n VARIANT_ALSO_NEGOTIATES_506 = 506,\n\n /**\n * The server is unable to store the representation needed to complete the request.\n */\n INSUFFICIENT_STORAGE_507 = 507, // WebDAV\n\n /**\n * The server detected an infinite loop while processing a request.\n */\n LOOP_DETECTED_508 = 508, // WebDAV\n\n /**\n * Further extensions to the request are required for the server to fulfill it.\n */\n NOT_EXTENDED_510 = 510,\n\n /**\n * The client needs to authenticate to gain network access.\n */\n NETWORK_AUTHENTICATION_REQUIRED_511 = 511,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgJA,IAAY,8DAAL;;;;AAQL;;;;AAKA;;;;AAKA;;;;AAKA;;;;AASA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AASA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AASA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AASA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA"}