// SPDX-License-Identifier: AGPL-3.0-or-later

export const HttpStatus = {
	OK: 200,
	CREATED: 201,
	ACCEPTED: 202,
	NO_CONTENT: 204,
	PARTIAL_CONTENT: 206,
	MOVED_PERMANENTLY: 301,
	FOUND: 302,
	SEE_OTHER: 303,
	NOT_MODIFIED: 304,
	TEMPORARY_REDIRECT: 307,
	PERMANENT_REDIRECT: 308,
	BAD_REQUEST: 400,
	UNAUTHORIZED: 401,
	FORBIDDEN: 403,
	NOT_FOUND: 404,
	METHOD_NOT_ALLOWED: 405,
	NOT_ACCEPTABLE: 406,
	REQUEST_TIMEOUT: 408,
	CONFLICT: 409,
	GONE: 410,
	LENGTH_REQUIRED: 411,
	PRECONDITION_FAILED: 412,
	PAYLOAD_TOO_LARGE: 413,
	URI_TOO_LONG: 414,
	UNSUPPORTED_MEDIA_TYPE: 415,
	RANGE_NOT_SATISFIABLE: 416,
	TOO_MANY_REQUESTS: 429,
	INTERNAL_SERVER_ERROR: 500,
	NOT_IMPLEMENTED: 501,
	BAD_GATEWAY: 502,
	SERVICE_UNAVAILABLE: 503,
	GATEWAY_TIMEOUT: 504,
} as const;

export const MimeType = {
	JSON: 'application/json',
	XML: 'application/xml',
	FORM_URLENCODED: 'application/x-www-form-urlencoded',
	OCTET_STREAM: 'application/octet-stream',
	PDF: 'application/pdf',
	PLAIN: 'text/plain',
	HTML: 'text/html',
	CSS: 'text/css',
	JAVASCRIPT: 'text/javascript',
	CSV: 'text/csv',
	PNG: 'image/png',
	JPEG: 'image/jpeg',
	GIF: 'image/gif',
	WEBP: 'image/webp',
	SVG: 'image/svg+xml',
	ICO: 'image/x-icon',
	MP3: 'audio/mpeg',
	WAV: 'audio/wav',
	OGG_AUDIO: 'audio/ogg',
	MP4: 'video/mp4',
	WEBM: 'video/webm',
	OGG_VIDEO: 'video/ogg',
	MULTIPART_FORM_DATA: 'multipart/form-data',
} as const;

export const REDIRECT_STATUS_CODES = [
	HttpStatus.MOVED_PERMANENTLY,
	HttpStatus.FOUND,
	HttpStatus.SEE_OTHER,
	HttpStatus.TEMPORARY_REDIRECT,
	HttpStatus.PERMANENT_REDIRECT,
] as const;
