@catbee/utils 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/README.md +303 -107
  2. package/build/esm/config.d.ts +13 -1
  3. package/build/esm/config.js +16 -4
  4. package/build/esm/config.js.map +1 -1
  5. package/build/esm/index.d.ts +20 -18
  6. package/build/esm/index.js +20 -18
  7. package/build/esm/index.js.map +1 -1
  8. package/build/esm/types/api-response.d.ts +83 -1
  9. package/build/esm/types/api-response.js.map +1 -1
  10. package/build/esm/utils/array.utils.d.ts +65 -2
  11. package/build/esm/utils/array.utils.js +147 -20
  12. package/build/esm/utils/array.utils.js.map +1 -1
  13. package/build/esm/utils/async.utils.d.ts +56 -1
  14. package/build/esm/utils/async.utils.js +166 -11
  15. package/build/esm/utils/async.utils.js.map +1 -1
  16. package/build/esm/utils/cache.utils.d.ts +67 -4
  17. package/build/esm/utils/cache.utils.js +210 -28
  18. package/build/esm/utils/cache.utils.js.map +1 -1
  19. package/build/esm/utils/context-store.utils.d.ts +102 -1
  20. package/build/esm/utils/context-store.utils.js +185 -3
  21. package/build/esm/utils/context-store.utils.js.map +1 -1
  22. package/build/esm/utils/crypto.utils.d.ts +110 -8
  23. package/build/esm/utils/crypto.utils.js +298 -23
  24. package/build/esm/utils/crypto.utils.js.map +1 -1
  25. package/build/esm/utils/decorators.utils.d.ts +40 -0
  26. package/build/esm/utils/decorators.utils.js +312 -0
  27. package/build/esm/utils/decorators.utils.js.map +1 -0
  28. package/build/esm/utils/dir.utils.d.ts +122 -1
  29. package/build/esm/utils/dir.utils.js +578 -3
  30. package/build/esm/utils/dir.utils.js.map +1 -1
  31. package/build/esm/utils/env.utils.d.ts +83 -0
  32. package/build/esm/utils/env.utils.js +235 -6
  33. package/build/esm/utils/env.utils.js.map +1 -1
  34. package/build/esm/utils/exception.utils.d.ts +117 -1
  35. package/build/esm/utils/exception.utils.js +331 -12
  36. package/build/esm/utils/exception.utils.js.map +1 -1
  37. package/build/esm/utils/fs.utils.d.ts +132 -0
  38. package/build/esm/utils/fs.utils.js +421 -4
  39. package/build/esm/utils/fs.utils.js.map +1 -1
  40. package/build/esm/utils/http-status-codes.d.ts +87 -178
  41. package/build/esm/utils/http-status-codes.js +92 -178
  42. package/build/esm/utils/http-status-codes.js.map +1 -1
  43. package/build/esm/utils/id.utils.d.ts +11 -10
  44. package/build/esm/utils/id.utils.js +30 -21
  45. package/build/esm/utils/id.utils.js.map +1 -1
  46. package/build/esm/utils/logger.utils.d.ts +35 -2
  47. package/build/esm/utils/logger.utils.js +68 -14
  48. package/build/esm/utils/logger.utils.js.map +1 -1
  49. package/build/esm/utils/middleware.utils.d.ts +73 -0
  50. package/build/esm/utils/middleware.utils.js +158 -0
  51. package/build/esm/utils/middleware.utils.js.map +1 -0
  52. package/build/esm/utils/obj.utils.d.ts +65 -3
  53. package/build/esm/utils/obj.utils.js +206 -18
  54. package/build/esm/utils/obj.utils.js.map +1 -1
  55. package/build/esm/utils/response.utils.d.ts +103 -2
  56. package/build/esm/utils/response.utils.js +156 -3
  57. package/build/esm/utils/response.utils.js.map +1 -1
  58. package/build/esm/utils/string.utils.d.ts +61 -5
  59. package/build/esm/utils/string.utils.js +109 -19
  60. package/build/esm/utils/string.utils.js.map +1 -1
  61. package/build/esm/utils/url.utils.d.ts +117 -0
  62. package/build/esm/utils/url.utils.js +287 -2
  63. package/build/esm/utils/url.utils.js.map +1 -1
  64. package/build/esm/utils/validate.utils.d.ts +110 -0
  65. package/build/esm/utils/validate.utils.js +190 -8
  66. package/build/esm/utils/validate.utils.js.map +1 -1
  67. package/build/esnext/config.d.ts +13 -1
  68. package/build/esnext/config.js +16 -4
  69. package/build/esnext/config.js.map +1 -1
  70. package/build/esnext/index.d.ts +20 -18
  71. package/build/esnext/index.js +20 -18
  72. package/build/esnext/index.js.map +1 -1
  73. package/build/esnext/types/api-response.d.ts +83 -1
  74. package/build/esnext/types/api-response.js.map +1 -1
  75. package/build/esnext/utils/array.utils.d.ts +65 -2
  76. package/build/esnext/utils/array.utils.js +140 -21
  77. package/build/esnext/utils/array.utils.js.map +1 -1
  78. package/build/esnext/utils/async.utils.d.ts +56 -1
  79. package/build/esnext/utils/async.utils.js +130 -14
  80. package/build/esnext/utils/async.utils.js.map +1 -1
  81. package/build/esnext/utils/cache.utils.d.ts +67 -4
  82. package/build/esnext/utils/cache.utils.js +137 -9
  83. package/build/esnext/utils/cache.utils.js.map +1 -1
  84. package/build/esnext/utils/context-store.utils.d.ts +102 -1
  85. package/build/esnext/utils/context-store.utils.js +171 -3
  86. package/build/esnext/utils/context-store.utils.js.map +1 -1
  87. package/build/esnext/utils/crypto.utils.d.ts +110 -8
  88. package/build/esnext/utils/crypto.utils.js +199 -19
  89. package/build/esnext/utils/crypto.utils.js.map +1 -1
  90. package/build/esnext/utils/decorators.utils.d.ts +40 -0
  91. package/build/esnext/utils/decorators.utils.js +155 -0
  92. package/build/esnext/utils/decorators.utils.js.map +1 -0
  93. package/build/esnext/utils/dir.utils.d.ts +122 -1
  94. package/build/esnext/utils/dir.utils.js +307 -3
  95. package/build/esnext/utils/dir.utils.js.map +1 -1
  96. package/build/esnext/utils/env.utils.d.ts +83 -0
  97. package/build/esnext/utils/env.utils.js +191 -8
  98. package/build/esnext/utils/env.utils.js.map +1 -1
  99. package/build/esnext/utils/exception.utils.d.ts +117 -1
  100. package/build/esnext/utils/exception.utils.js +222 -12
  101. package/build/esnext/utils/exception.utils.js.map +1 -1
  102. package/build/esnext/utils/fs.utils.d.ts +132 -0
  103. package/build/esnext/utils/fs.utils.js +268 -4
  104. package/build/esnext/utils/fs.utils.js.map +1 -1
  105. package/build/esnext/utils/http-status-codes.d.ts +87 -178
  106. package/build/esnext/utils/http-status-codes.js +92 -178
  107. package/build/esnext/utils/http-status-codes.js.map +1 -1
  108. package/build/esnext/utils/id.utils.d.ts +11 -10
  109. package/build/esnext/utils/id.utils.js +28 -20
  110. package/build/esnext/utils/id.utils.js.map +1 -1
  111. package/build/esnext/utils/logger.utils.d.ts +35 -2
  112. package/build/esnext/utils/logger.utils.js +56 -14
  113. package/build/esnext/utils/logger.utils.js.map +1 -1
  114. package/build/esnext/utils/middleware.utils.d.ts +73 -0
  115. package/build/esnext/utils/middleware.utils.js +157 -0
  116. package/build/esnext/utils/middleware.utils.js.map +1 -0
  117. package/build/esnext/utils/obj.utils.d.ts +65 -3
  118. package/build/esnext/utils/obj.utils.js +169 -14
  119. package/build/esnext/utils/obj.utils.js.map +1 -1
  120. package/build/esnext/utils/response.utils.d.ts +103 -2
  121. package/build/esnext/utils/response.utils.js +141 -3
  122. package/build/esnext/utils/response.utils.js.map +1 -1
  123. package/build/esnext/utils/string.utils.d.ts +61 -5
  124. package/build/esnext/utils/string.utils.js +110 -14
  125. package/build/esnext/utils/string.utils.js.map +1 -1
  126. package/build/esnext/utils/url.utils.d.ts +117 -0
  127. package/build/esnext/utils/url.utils.js +248 -2
  128. package/build/esnext/utils/url.utils.js.map +1 -1
  129. package/build/esnext/utils/validate.utils.d.ts +110 -0
  130. package/build/esnext/utils/validate.utils.js +190 -8
  131. package/build/esnext/utils/validate.utils.js.map +1 -1
  132. package/build/src/config.d.ts +13 -1
  133. package/build/src/config.js +15 -3
  134. package/build/src/config.js.map +1 -1
  135. package/build/src/index.d.ts +20 -18
  136. package/build/src/index.js +2 -0
  137. package/build/src/index.js.map +1 -1
  138. package/build/src/types/api-response.d.ts +83 -1
  139. package/build/src/types/api-response.js.map +1 -1
  140. package/build/src/utils/array.utils.d.ts +65 -2
  141. package/build/src/utils/array.utils.js +147 -22
  142. package/build/src/utils/array.utils.js.map +1 -1
  143. package/build/src/utils/async.utils.d.ts +56 -1
  144. package/build/src/utils/async.utils.js +137 -17
  145. package/build/src/utils/async.utils.js.map +1 -1
  146. package/build/src/utils/cache.utils.d.ts +67 -4
  147. package/build/src/utils/cache.utils.js +137 -9
  148. package/build/src/utils/cache.utils.js.map +1 -1
  149. package/build/src/utils/context-store.utils.d.ts +102 -1
  150. package/build/src/utils/context-store.utils.js +173 -3
  151. package/build/src/utils/context-store.utils.js.map +1 -1
  152. package/build/src/utils/crypto.utils.d.ts +110 -8
  153. package/build/src/utils/crypto.utils.js +214 -27
  154. package/build/src/utils/crypto.utils.js.map +1 -1
  155. package/build/src/utils/decorators.utils.d.ts +40 -0
  156. package/build/src/utils/decorators.utils.js +165 -0
  157. package/build/src/utils/decorators.utils.js.map +1 -0
  158. package/build/src/utils/dir.utils.d.ts +122 -1
  159. package/build/src/utils/dir.utils.js +314 -0
  160. package/build/src/utils/dir.utils.js.map +1 -1
  161. package/build/src/utils/env.utils.d.ts +83 -0
  162. package/build/src/utils/env.utils.js +192 -9
  163. package/build/src/utils/env.utils.js.map +1 -1
  164. package/build/src/utils/exception.utils.d.ts +117 -1
  165. package/build/src/utils/exception.utils.js +233 -11
  166. package/build/src/utils/exception.utils.js.map +1 -1
  167. package/build/src/utils/fs.utils.d.ts +132 -0
  168. package/build/src/utils/fs.utils.js +281 -3
  169. package/build/src/utils/fs.utils.js.map +1 -1
  170. package/build/src/utils/http-status-codes.d.ts +87 -178
  171. package/build/src/utils/http-status-codes.js +92 -178
  172. package/build/src/utils/http-status-codes.js.map +1 -1
  173. package/build/src/utils/id.utils.d.ts +11 -10
  174. package/build/src/utils/id.utils.js +28 -20
  175. package/build/src/utils/id.utils.js.map +1 -1
  176. package/build/src/utils/logger.utils.d.ts +35 -2
  177. package/build/src/utils/logger.utils.js +56 -11
  178. package/build/src/utils/logger.utils.js.map +1 -1
  179. package/build/src/utils/middleware.utils.d.ts +73 -0
  180. package/build/src/utils/middleware.utils.js +163 -0
  181. package/build/src/utils/middleware.utils.js.map +1 -0
  182. package/build/src/utils/obj.utils.d.ts +65 -3
  183. package/build/src/utils/obj.utils.js +179 -18
  184. package/build/src/utils/obj.utils.js.map +1 -1
  185. package/build/src/utils/response.utils.d.ts +103 -2
  186. package/build/src/utils/response.utils.js +147 -2
  187. package/build/src/utils/response.utils.js.map +1 -1
  188. package/build/src/utils/string.utils.d.ts +61 -5
  189. package/build/src/utils/string.utils.js +122 -20
  190. package/build/src/utils/string.utils.js.map +1 -1
  191. package/build/src/utils/url.utils.d.ts +117 -0
  192. package/build/src/utils/url.utils.js +256 -1
  193. package/build/src/utils/url.utils.js.map +1 -1
  194. package/build/src/utils/validate.utils.d.ts +110 -0
  195. package/build/src/utils/validate.utils.js +204 -8
  196. package/build/src/utils/validate.utils.js.map +1 -1
  197. package/package.json +20 -12
@@ -1,360 +1,274 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HttpStatusCodes = void 0;
4
+ /**
5
+ * Complete HTTP status codes enum with descriptions.
6
+ * For use with API responses and error handling.
7
+ */
4
8
  var HttpStatusCodes;
5
9
  (function (HttpStatusCodes) {
10
+ // 1xx Informational
6
11
  /**
7
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.2.1
8
- *
9
- * This interim response indicates that everything so far is OK and that the client should continue with the request or ignore it if it is already finished.
12
+ * The server has received the request headers and the client should proceed to send the request body.
10
13
  */
11
14
  HttpStatusCodes[HttpStatusCodes["CONTINUE"] = 100] = "CONTINUE";
12
15
  /**
13
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.2.2
14
- *
15
- * This code is sent in response to an Upgrade request header by the client, and indicates the protocol the server is switching too.
16
+ * The server is switching protocols according to the client's request.
16
17
  */
17
18
  HttpStatusCodes[HttpStatusCodes["SWITCHING_PROTOCOLS"] = 101] = "SWITCHING_PROTOCOLS";
18
19
  /**
19
- * Official Documentation @ https://tools.ietf.org/html/rfc2518#section-10.1
20
- *
21
- * This code indicates that the server has received and is processing the request, but no response is available yet.
20
+ * Server has received the request and is still processing it.
22
21
  */
23
22
  HttpStatusCodes[HttpStatusCodes["PROCESSING"] = 102] = "PROCESSING";
24
23
  /**
25
- * Official Documentation @ https://www.rfc-editor.org/rfc/rfc8297#page-3
26
- *
27
- * This code indicates to the client that the server is likely to send a final response with the header fields included in the informational response.
24
+ * The server is sending preliminary headers while preparing the final response.
28
25
  */
29
26
  HttpStatusCodes[HttpStatusCodes["EARLY_HINTS"] = 103] = "EARLY_HINTS";
27
+ // 2xx Success
30
28
  /**
31
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.3.1
32
- *
33
- * The request has succeeded. The meaning of a success varies depending on the HTTP method:
34
- * GET: The resource has been fetched and is transmitted in the message body.
35
- * HEAD: The entity headers are in the message body.
36
- * POST: The resource describing the result of the action is transmitted in the message body.
37
- * TRACE: The message body contains the request message as received by the server
29
+ * The request succeeded. The result meaning depends on the HTTP method used.
38
30
  */
39
31
  HttpStatusCodes[HttpStatusCodes["OK"] = 200] = "OK";
40
32
  /**
41
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.3.2
42
- *
43
- * The request has succeeded and a new resource has been created as a result of it. This is typically the response sent after a PUT request.
33
+ * The request succeeded and a new resource was created as a result.
44
34
  */
45
35
  HttpStatusCodes[HttpStatusCodes["CREATED"] = 201] = "CREATED";
46
36
  /**
47
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.3.3
48
- *
49
- * The request has been received but not yet acted upon. It is non-committal, meaning that there is no way in HTTP to later send an asynchronous response indicating the outcome of processing the request. It is intended for cases where another process or server handles the request, or for batch processing.
37
+ * The request has been received but not yet acted upon.
50
38
  */
51
39
  HttpStatusCodes[HttpStatusCodes["ACCEPTED"] = 202] = "ACCEPTED";
52
40
  /**
53
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.3.4
54
- *
55
- * This response code means returned meta-information set is not exact set as available from the origin server, but collected from a local or a third party copy. Except this condition, 200 OK response should be preferred instead of this response.
41
+ * The returned information is from a third-party source, not the origin server.
56
42
  */
57
43
  HttpStatusCodes[HttpStatusCodes["NON_AUTHORITATIVE_INFORMATION"] = 203] = "NON_AUTHORITATIVE_INFORMATION";
58
44
  /**
59
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.3.5
60
- *
61
- * There is no content to send for this request, but the headers may be useful. The user-agent may update its cached headers for this resource with the new ones.
45
+ * The request succeeded but there's no content to send in the response.
62
46
  */
63
47
  HttpStatusCodes[HttpStatusCodes["NO_CONTENT"] = 204] = "NO_CONTENT";
64
48
  /**
65
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.3.6
66
- *
67
- * This response code is sent after accomplishing request to tell user agent reset document view which sent this request.
49
+ * The client should reset the document view that caused this request.
68
50
  */
69
51
  HttpStatusCodes[HttpStatusCodes["RESET_CONTENT"] = 205] = "RESET_CONTENT";
70
52
  /**
71
- * Official Documentation @ https://tools.ietf.org/html/rfc7233#section-4.1
72
- *
73
- * This response code is used because of range header sent by the client to separate download into multiple streams.
53
+ * The server is delivering only part of the resource due to a range header sent by the client.
74
54
  */
75
55
  HttpStatusCodes[HttpStatusCodes["PARTIAL_CONTENT"] = 206] = "PARTIAL_CONTENT";
76
56
  /**
77
- * Official Documentation @ https://tools.ietf.org/html/rfc2518#section-10.2
78
- *
79
- * A Multi-Status response conveys information about multiple resources in situations where multiple status codes might be appropriate.
57
+ * Conveys information about multiple resources, for complex operations.
80
58
  */
81
59
  HttpStatusCodes[HttpStatusCodes["MULTI_STATUS"] = 207] = "MULTI_STATUS";
82
60
  /**
83
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.4.1
84
- *
85
- * The request has more than one possible responses. User-agent or user should choose one of them. There is no standardized way to choose one of the responses.
61
+ * The members of a DAV binding have already been enumerated and are not included in the response.
62
+ */
63
+ HttpStatusCodes[HttpStatusCodes["ALREADY_REPORTED"] = 208] = "ALREADY_REPORTED";
64
+ /**
65
+ * The server has fulfilled a request for the resource, and the response represents the result of one or more instance-manipulations.
66
+ */
67
+ HttpStatusCodes[HttpStatusCodes["IM_USED"] = 226] = "IM_USED";
68
+ // 3xx Redirection
69
+ /**
70
+ * The request has more than one possible response and the client should choose one.
86
71
  */
87
72
  HttpStatusCodes[HttpStatusCodes["MULTIPLE_CHOICES"] = 300] = "MULTIPLE_CHOICES";
88
73
  /**
89
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.4.2
90
- *
91
- * This response code means that URI of requested resource has been changed. Probably, new URI would be given in the response.
74
+ * The resource has been permanently moved to a new URL.
92
75
  */
93
76
  HttpStatusCodes[HttpStatusCodes["MOVED_PERMANENTLY"] = 301] = "MOVED_PERMANENTLY";
94
77
  /**
95
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.4.3
96
- *
97
- * This response code means that URI of requested resource has been changed temporarily. New changes in the URI might be made in the future. Therefore, this same URI should be used by the client in future requests.
78
+ * The resource has been temporarily moved to another URL.
98
79
  */
99
80
  HttpStatusCodes[HttpStatusCodes["MOVED_TEMPORARILY"] = 302] = "MOVED_TEMPORARILY";
100
81
  /**
101
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.4.4
102
- *
103
- * Server sent this response to directing client to get requested resource to another URI with an GET request.
82
+ * The response to the request can be found under another URI using the GET method.
104
83
  */
105
84
  HttpStatusCodes[HttpStatusCodes["SEE_OTHER"] = 303] = "SEE_OTHER";
106
85
  /**
107
- * Official Documentation @ https://tools.ietf.org/html/rfc7232#section-4.1
108
- *
109
- * This is used for caching purposes. It is telling to client that response has not been modified. So, client can continue to use same cached version of response.
86
+ * The resource hasn't been modified since the last request.
110
87
  */
111
88
  HttpStatusCodes[HttpStatusCodes["NOT_MODIFIED"] = 304] = "NOT_MODIFIED";
112
89
  /**
113
90
  * @deprecated
114
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.4.6
115
- *
116
- * Was defined in a previous version of the HTTP specification to indicate that a requested response must be accessed by a proxy. It has been deprecated due to security concerns regarding in-band configuration of a proxy.
91
+ * Response must be accessed through a proxy.
117
92
  */
118
93
  HttpStatusCodes[HttpStatusCodes["USE_PROXY"] = 305] = "USE_PROXY";
119
94
  /**
120
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.4.7
121
- *
122
- * Server sent this response to directing client to get requested resource to another URI with same method that used prior request. This has the same semantic than the 302 Found HTTP response code, with the exception that the user agent must not change the HTTP method used: if a POST was used in the first request, a POST must be used in the second request.
95
+ * The resource is temporarily available at a different URI, using the same HTTP method.
123
96
  */
124
97
  HttpStatusCodes[HttpStatusCodes["TEMPORARY_REDIRECT"] = 307] = "TEMPORARY_REDIRECT";
125
98
  /**
126
- * Official Documentation @ https://tools.ietf.org/html/rfc7538#section-3
127
- *
128
- * This means that the resource is now permanently located at another URI, specified by the Location: HTTP Response header. This has the same semantics as the 301 Moved Permanently HTTP response code, with the exception that the user agent must not change the HTTP method used: if a POST was used in the first request, a POST must be used in the second request.
99
+ * The resource has been permanently moved to another URL, using the same HTTP method.
129
100
  */
130
101
  HttpStatusCodes[HttpStatusCodes["PERMANENT_REDIRECT"] = 308] = "PERMANENT_REDIRECT";
102
+ // 4xx Client Error
131
103
  /**
132
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.1
133
- *
134
- * This response means that server could not understand the request due to invalid syntax.
104
+ * The server cannot process the request due to a client error (malformed request).
135
105
  */
136
106
  HttpStatusCodes[HttpStatusCodes["BAD_REQUEST"] = 400] = "BAD_REQUEST";
137
107
  /**
138
- * Official Documentation @ https://tools.ietf.org/html/rfc7235#section-3.1
139
- *
140
- * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.
108
+ * Authentication is required and has failed or not been provided.
141
109
  */
142
110
  HttpStatusCodes[HttpStatusCodes["UNAUTHORIZED"] = 401] = "UNAUTHORIZED";
143
111
  /**
144
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.2
145
- *
146
- * This response code is reserved for future use. Initial aim for creating this code was using it for digital payment systems however this is not used currently.
112
+ * Reserved for future use, originally intended for digital payment systems.
147
113
  */
148
114
  HttpStatusCodes[HttpStatusCodes["PAYMENT_REQUIRED"] = 402] = "PAYMENT_REQUIRED";
149
115
  /**
150
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.3
151
- *
152
- * The client does not have access rights to the content, i.e. they are unauthorized, so server is rejecting to give proper response. Unlike 401, the client's identity is known to the server.
116
+ * The client doesn't have permission to access the requested resource.
153
117
  */
154
118
  HttpStatusCodes[HttpStatusCodes["FORBIDDEN"] = 403] = "FORBIDDEN";
155
119
  /**
156
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.4
157
- *
158
- * The server can not find requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 to hide the existence of a resource from an unauthorized client. This response code is probably the most famous one due to its frequent occurence on the web.
120
+ * The requested resource could not be found on the server.
159
121
  */
160
122
  HttpStatusCodes[HttpStatusCodes["NOT_FOUND"] = 404] = "NOT_FOUND";
161
123
  /**
162
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.5
163
- *
164
- * The request method is known by the server but has been disabled and cannot be used. For example, an API may forbid DELETE-ing a resource. The two mandatory methods, GET and HEAD, must never be disabled and should not return this error code.
124
+ * The request method is not supported for the requested resource.
165
125
  */
166
126
  HttpStatusCodes[HttpStatusCodes["METHOD_NOT_ALLOWED"] = 405] = "METHOD_NOT_ALLOWED";
167
127
  /**
168
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.6
169
- *
170
- * This response is sent when the web server, after performing server-driven content negotiation, doesn't find any content following the criteria given by the user agent.
128
+ * The server can't provide a response matching the list of acceptable values in the client's headers.
171
129
  */
172
130
  HttpStatusCodes[HttpStatusCodes["NOT_ACCEPTABLE"] = 406] = "NOT_ACCEPTABLE";
173
131
  /**
174
- * Official Documentation @ https://tools.ietf.org/html/rfc7235#section-3.2
175
- *
176
- * This is similar to 401 but authentication is needed to be done by a proxy.
132
+ * Authentication by a proxy is required.
177
133
  */
178
134
  HttpStatusCodes[HttpStatusCodes["PROXY_AUTHENTICATION_REQUIRED"] = 407] = "PROXY_AUTHENTICATION_REQUIRED";
179
135
  /**
180
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.7
181
- *
182
- * This response is sent on an idle connection by some servers, even without any previous request by the client. It means that the server would like to shut down this unused connection. This response is used much more since some browsers, like Chrome, Firefox 27+, or IE9, use HTTP pre-connection mechanisms to speed up surfing. Also note that some servers merely shut down the connection without sending this message.
136
+ * The server timed out waiting for the request.
183
137
  */
184
138
  HttpStatusCodes[HttpStatusCodes["REQUEST_TIMEOUT"] = 408] = "REQUEST_TIMEOUT";
185
139
  /**
186
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.8
187
- *
188
- * This response is sent when a request conflicts with the current state of the server.
140
+ * The request conflicts with the current state of the server.
189
141
  */
190
142
  HttpStatusCodes[HttpStatusCodes["CONFLICT"] = 409] = "CONFLICT";
191
143
  /**
192
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.9
193
- *
194
- * This response would be sent when the requested content has been permenantly deleted from server, with no forwarding address. Clients are expected to remove their caches and links to the resource. The HTTP specification intends this status code to be used for "limited-time, promotional services". APIs should not feel compelled to indicate resources that have been deleted with this status code.
144
+ * The resource has been permanently deleted with no forwarding address.
195
145
  */
196
146
  HttpStatusCodes[HttpStatusCodes["GONE"] = 410] = "GONE";
197
147
  /**
198
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.10
199
- *
200
- * The server rejected the request because the Content-Length header field is not defined and the server requires it.
148
+ * The server requires a Content-Length header field.
201
149
  */
202
150
  HttpStatusCodes[HttpStatusCodes["LENGTH_REQUIRED"] = 411] = "LENGTH_REQUIRED";
203
151
  /**
204
- * Official Documentation @ https://tools.ietf.org/html/rfc7232#section-4.2
205
- *
206
- * The client has indicated preconditions in its headers which the server does not meet.
152
+ * Preconditions in the client's headers failed.
207
153
  */
208
154
  HttpStatusCodes[HttpStatusCodes["PRECONDITION_FAILED"] = 412] = "PRECONDITION_FAILED";
209
155
  /**
210
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.11
211
- *
212
- * Request entity is larger than limits defined by server; the server might close the connection or return an Retry-After header field.
156
+ * Request entity is larger than limits defined by server.
213
157
  */
214
158
  HttpStatusCodes[HttpStatusCodes["REQUEST_TOO_LONG"] = 413] = "REQUEST_TOO_LONG";
215
159
  /**
216
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.12
217
- *
218
- * The URI requested by the client is longer than the server is willing to interpret.
160
+ * The request payload exceeds server size limits.
161
+ * Modern equivalent of REQUEST_TOO_LONG.
162
+ */
163
+ HttpStatusCodes[HttpStatusCodes["PAYLOAD_TOO_LARGE"] = 413] = "PAYLOAD_TOO_LARGE";
164
+ /**
165
+ * The URI requested is too long for the server to interpret.
219
166
  */
220
167
  HttpStatusCodes[HttpStatusCodes["REQUEST_URI_TOO_LONG"] = 414] = "REQUEST_URI_TOO_LONG";
221
168
  /**
222
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.13
223
- *
224
- * The media format of the requested data is not supported by the server, so the server is rejecting the request.
169
+ * The server does not support the media type requested by the client.
225
170
  */
226
171
  HttpStatusCodes[HttpStatusCodes["UNSUPPORTED_MEDIA_TYPE"] = 415] = "UNSUPPORTED_MEDIA_TYPE";
227
172
  /**
228
- * Official Documentation @ https://tools.ietf.org/html/rfc7233#section-4.4
229
- *
230
- * The range specified by the Range header field in the request can't be fulfilled; it's possible that the range is outside the size of the target URI's data.
173
+ * The range specified by the Range header cannot be fulfilled.
231
174
  */
232
175
  HttpStatusCodes[HttpStatusCodes["REQUESTED_RANGE_NOT_SATISFIABLE"] = 416] = "REQUESTED_RANGE_NOT_SATISFIABLE";
233
176
  /**
234
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.14
235
- *
236
- * This response code means the expectation indicated by the Expect request header field can't be met by the server.
177
+ * The server cannot meet the expectations given in the Expect header.
237
178
  */
238
179
  HttpStatusCodes[HttpStatusCodes["EXPECTATION_FAILED"] = 417] = "EXPECTATION_FAILED";
239
180
  /**
240
- * Official Documentation @ https://tools.ietf.org/html/rfc2324#section-2.3.2
241
- *
242
- * Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout.
181
+ * The server refuses to brew coffee because it is a teapot. (April Fools' joke)
243
182
  */
244
183
  HttpStatusCodes[HttpStatusCodes["IM_A_TEAPOT"] = 418] = "IM_A_TEAPOT";
245
184
  /**
246
- * Official Documentation @ https://tools.ietf.org/html/rfc2518#section-10.6
247
- *
248
- * The 507 (Insufficient Storage) status code means the method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request. This condition is considered to be temporary. If the request which received this status code was the result of a user action, the request MUST NOT be repeated until it is requested by a separate user action.
185
+ * The server cannot store the representation needed to complete the request.
249
186
  */
250
187
  HttpStatusCodes[HttpStatusCodes["INSUFFICIENT_SPACE_ON_RESOURCE"] = 419] = "INSUFFICIENT_SPACE_ON_RESOURCE";
251
188
  /**
252
189
  * @deprecated
253
- * Official Documentation @ https://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-webdav-protocol-06.txt
254
- *
255
- * A deprecated response used by the Spring Framework when a method has failed.
190
+ * A method has failed - specific to Spring Framework.
256
191
  */
257
192
  HttpStatusCodes[HttpStatusCodes["METHOD_FAILURE"] = 420] = "METHOD_FAILURE";
258
193
  /**
259
- * Official Documentation @ https://datatracker.ietf.org/doc/html/rfc7540#section-9.1.2
260
- *
261
- * Defined in the specification of HTTP/2 to indicate that a server is not able to produce a response for the combination of scheme and authority that are included in the request URI.
194
+ * The server cannot produce a response for the requested URI scheme and authority.
262
195
  */
263
196
  HttpStatusCodes[HttpStatusCodes["MISDIRECTED_REQUEST"] = 421] = "MISDIRECTED_REQUEST";
264
197
  /**
265
- * Official Documentation @ https://tools.ietf.org/html/rfc2518#section-10.3
266
- *
267
- * The request was well-formed but was unable to be followed due to semantic errors.
198
+ * The request was well-formed but has semantic errors preventing processing.
268
199
  */
269
200
  HttpStatusCodes[HttpStatusCodes["UNPROCESSABLE_ENTITY"] = 422] = "UNPROCESSABLE_ENTITY";
270
201
  /**
271
- * Official Documentation @ https://tools.ietf.org/html/rfc2518#section-10.4
272
- *
273
- * The resource that is being accessed is locked.
202
+ * The requested resource is locked against access.
274
203
  */
275
204
  HttpStatusCodes[HttpStatusCodes["LOCKED"] = 423] = "LOCKED";
276
205
  /**
277
- * Official Documentation @ https://tools.ietf.org/html/rfc2518#section-10.5
278
- *
279
- * The request failed due to failure of a previous request.
206
+ * The request failed due to the failure of a previous request.
280
207
  */
281
208
  HttpStatusCodes[HttpStatusCodes["FAILED_DEPENDENCY"] = 424] = "FAILED_DEPENDENCY";
282
209
  /**
283
- * Official Documentation @ https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.15
284
- *
285
- * 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.
210
+ * The client should switch to a different protocol.
286
211
  */
287
212
  HttpStatusCodes[HttpStatusCodes["UPGRADE_REQUIRED"] = 426] = "UPGRADE_REQUIRED";
288
213
  /**
289
- * Official Documentation @ https://tools.ietf.org/html/rfc6585#section-3
290
- *
291
- * The origin server requires the request to be conditional. Intended to prevent the 'lost update' problem, where a client GETs a resource's state, modifies it, and PUTs it back to the server, when meanwhile a third party has modified the state on the server, leading to a conflict.
214
+ * The server requires conditional requests to prevent lost updates.
292
215
  */
293
216
  HttpStatusCodes[HttpStatusCodes["PRECONDITION_REQUIRED"] = 428] = "PRECONDITION_REQUIRED";
294
217
  /**
295
- * Official Documentation @ https://tools.ietf.org/html/rfc6585#section-4
296
- *
297
- * The user has sent too many requests in a given amount of time ("rate limiting").
218
+ * The client has sent too many requests in a given time period (rate limiting).
298
219
  */
299
220
  HttpStatusCodes[HttpStatusCodes["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
300
221
  /**
301
- * Official Documentation @ https://tools.ietf.org/html/rfc6585#section-5
302
- *
303
- * The server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields.
222
+ * Request headers are too large for the server to process.
304
223
  */
305
224
  HttpStatusCodes[HttpStatusCodes["REQUEST_HEADER_FIELDS_TOO_LARGE"] = 431] = "REQUEST_HEADER_FIELDS_TOO_LARGE";
306
225
  /**
307
- * Official Documentation @ https://tools.ietf.org/html/rfc7725
308
- *
309
- * The user-agent requested a resource that cannot legally be provided, such as a web page censored by a government.
226
+ * Resource cannot be legally provided (e.g., censored by government).
310
227
  */
311
228
  HttpStatusCodes[HttpStatusCodes["UNAVAILABLE_FOR_LEGAL_REASONS"] = 451] = "UNAVAILABLE_FOR_LEGAL_REASONS";
229
+ // 5xx Server Error
312
230
  /**
313
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.6.1
314
- *
315
- * The server encountered an unexpected condition that prevented it from fulfilling the request.
231
+ * The server encountered an unexpected error preventing it from fulfilling the request.
316
232
  */
317
233
  HttpStatusCodes[HttpStatusCodes["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
318
234
  /**
319
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.6.2
320
- *
321
- * The request method is not supported by the server and cannot be handled. The only methods that servers are required to support (and therefore that must not return this code) are GET and HEAD.
235
+ * The server does not support the functionality required to fulfill the request.
322
236
  */
323
237
  HttpStatusCodes[HttpStatusCodes["NOT_IMPLEMENTED"] = 501] = "NOT_IMPLEMENTED";
324
238
  /**
325
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.6.3
326
- *
327
- * This error response means that the server, while working as a gateway to get a response needed to handle the request, got an invalid response.
239
+ * The server, acting as a gateway, received an invalid response from an upstream server.
328
240
  */
329
241
  HttpStatusCodes[HttpStatusCodes["BAD_GATEWAY"] = 502] = "BAD_GATEWAY";
330
242
  /**
331
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.6.4
332
- *
333
- * The server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded. Note that together with this response, a user-friendly page explaining the problem should be sent. This responses should be used for temporary conditions and the Retry-After: HTTP header should, if possible, contain the estimated time before the recovery of the service. The webmaster must also take care about the caching-related headers that are sent along with this response, as these temporary condition responses should usually not be cached.
243
+ * The server is currently unable to handle the request due to temporary overload or maintenance.
334
244
  */
335
245
  HttpStatusCodes[HttpStatusCodes["SERVICE_UNAVAILABLE"] = 503] = "SERVICE_UNAVAILABLE";
336
246
  /**
337
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.6.5
338
- *
339
- * This error response is given when the server is acting as a gateway and cannot get a response in time.
247
+ * The server, acting as a gateway, did not receive a timely response from an upstream server.
340
248
  */
341
249
  HttpStatusCodes[HttpStatusCodes["GATEWAY_TIMEOUT"] = 504] = "GATEWAY_TIMEOUT";
342
250
  /**
343
- * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.6.6
344
- *
345
- * The HTTP version used in the request is not supported by the server.
251
+ * The server does not support the HTTP protocol version used in the request.
346
252
  */
347
253
  HttpStatusCodes[HttpStatusCodes["HTTP_VERSION_NOT_SUPPORTED"] = 505] = "HTTP_VERSION_NOT_SUPPORTED";
348
254
  /**
349
- * Official Documentation @ https://tools.ietf.org/html/rfc2518#section-10.6
350
- *
351
- * The server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process.
255
+ * Transparent content negotiation for the request resulted in circular reference.
256
+ */
257
+ HttpStatusCodes[HttpStatusCodes["VARIANT_ALSO_NEGOTIATES"] = 506] = "VARIANT_ALSO_NEGOTIATES";
258
+ /**
259
+ * The server cannot store the representation needed to complete the request.
352
260
  */
353
261
  HttpStatusCodes[HttpStatusCodes["INSUFFICIENT_STORAGE"] = 507] = "INSUFFICIENT_STORAGE";
354
262
  /**
355
- * Official Documentation @ https://tools.ietf.org/html/rfc6585#section-6
356
- *
357
- * The 511 status code indicates that the client needs to authenticate to gain network access.
263
+ * The server detected an infinite loop while processing the request.
264
+ */
265
+ HttpStatusCodes[HttpStatusCodes["LOOP_DETECTED"] = 508] = "LOOP_DETECTED";
266
+ /**
267
+ * Further extensions to the request are required for the server to fulfill it.
268
+ */
269
+ HttpStatusCodes[HttpStatusCodes["NOT_EXTENDED"] = 510] = "NOT_EXTENDED";
270
+ /**
271
+ * The client needs to authenticate to gain network access.
358
272
  */
359
273
  HttpStatusCodes[HttpStatusCodes["NETWORK_AUTHENTICATION_REQUIRED"] = 511] = "NETWORK_AUTHENTICATION_REQUIRED";
360
274
  })(HttpStatusCodes || (exports.HttpStatusCodes = HttpStatusCodes = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"http-status-codes.js","sourceRoot":"","sources":["../../../src/utils/http-status-codes.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAmWX;AAnWD,WAAY,eAAe;IACzB;;;;OAIG;IACH,+DAAc,CAAA;IACd;;;;OAIG;IACH,qFAAyB,CAAA;IACzB;;;;OAIG;IACH,mEAAgB,CAAA;IAChB;;;;OAIG;IACH,qEAAiB,CAAA;IACjB;;;;;;;;OAQG;IACH,mDAAQ,CAAA;IACR;;;;OAIG;IACH,6DAAa,CAAA;IACb;;;;OAIG;IACH,+DAAc,CAAA;IACd;;;;OAIG;IACH,yGAAmC,CAAA;IACnC;;;;OAIG;IACH,mEAAgB,CAAA;IAChB;;;;OAIG;IACH,yEAAmB,CAAA;IACnB;;;;OAIG;IACH,6EAAqB,CAAA;IACrB;;;;OAIG;IACH,uEAAkB,CAAA;IAClB;;;;OAIG;IACH,+EAAsB,CAAA;IACtB;;;;OAIG;IACH,iFAAuB,CAAA;IACvB;;;;OAIG;IACH,iFAAuB,CAAA;IACvB;;;;OAIG;IACH,iEAAe,CAAA;IACf;;;;OAIG;IACH,uEAAkB,CAAA;IAClB;;;;;OAKG;IACH,iEAAe,CAAA;IACf;;;;OAIG;IACH,mFAAwB,CAAA;IACxB;;;;OAIG;IACH,mFAAwB,CAAA;IACxB;;;;OAIG;IACH,qEAAiB,CAAA;IACjB;;;;OAIG;IACH,uEAAkB,CAAA;IAClB;;;;OAIG;IACH,+EAAsB,CAAA;IACtB;;;;OAIG;IACH,iEAAe,CAAA;IACf;;;;OAIG;IACH,iEAAe,CAAA;IACf;;;;OAIG;IACH,mFAAwB,CAAA;IACxB;;;;OAIG;IACH,2EAAoB,CAAA;IACpB;;;;OAIG;IACH,yGAAmC,CAAA;IACnC;;;;OAIG;IACH,6EAAqB,CAAA;IACrB;;;;OAIG;IACH,+DAAc,CAAA;IACd;;;;OAIG;IACH,uDAAU,CAAA;IACV;;;;OAIG;IACH,6EAAqB,CAAA;IACrB;;;;OAIG;IACH,qFAAyB,CAAA;IACzB;;;;OAIG;IACH,+EAAsB,CAAA;IACtB;;;;OAIG;IACH,uFAA0B,CAAA;IAC1B;;;;OAIG;IACH,2FAA4B,CAAA;IAC5B;;;;OAIG;IACH,6GAAqC,CAAA;IACrC;;;;OAIG;IACH,mFAAwB,CAAA;IACxB;;;;OAIG;IACH,qEAAiB,CAAA;IACjB;;;;OAIG;IACH,2GAAoC,CAAA;IACpC;;;;;OAKG;IACH,2EAAoB,CAAA;IACpB;;;;OAIG;IACH,qFAAyB,CAAA;IACzB;;;;OAIG;IACH,uFAA0B,CAAA;IAC1B;;;;OAIG;IACH,2DAAY,CAAA;IACZ;;;;OAIG;IACH,iFAAuB,CAAA;IACvB;;;;OAIG;IACH,+EAAsB,CAAA;IACtB;;;;OAIG;IACH,yFAA2B,CAAA;IAC3B;;;;OAIG;IACH,iFAAuB,CAAA;IACvB;;;;OAIG;IACH,6GAAqC,CAAA;IACrC;;;;OAIG;IACH,yGAAmC,CAAA;IACnC;;;;OAIG;IACH,yFAA2B,CAAA;IAC3B;;;;OAIG;IACH,6EAAqB,CAAA;IACrB;;;;OAIG;IACH,qEAAiB,CAAA;IACjB;;;;OAIG;IACH,qFAAyB,CAAA;IACzB;;;;OAIG;IACH,6EAAqB,CAAA;IACrB;;;;OAIG;IACH,mGAAgC,CAAA;IAChC;;;;OAIG;IACH,uFAA0B,CAAA;IAC1B;;;;OAIG;IACH,6GAAqC,CAAA;AACvC,CAAC,EAnWW,eAAe,+BAAf,eAAe,QAmW1B","sourcesContent":["export enum HttpStatusCodes {\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.2.1\n *\n * This interim response indicates that everything so far is OK and that the client should continue with the request or ignore it if it is already finished.\n */\n CONTINUE = 100,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.2.2\n *\n * This code is sent in response to an Upgrade request header by the client, and indicates the protocol the server is switching too.\n */\n SWITCHING_PROTOCOLS = 101,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc2518#section-10.1\n *\n * This code indicates that the server has received and is processing the request, but no response is available yet.\n */\n PROCESSING = 102,\n /**\n * Official Documentation @ https://www.rfc-editor.org/rfc/rfc8297#page-3\n *\n * This code indicates to the client that the server is likely to send a final response with the header fields included in the informational response.\n */\n EARLY_HINTS = 103,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.3.1\n *\n * The request has succeeded. The meaning of a success varies depending on the HTTP method:\n * GET: The resource has been fetched and is transmitted in the message body.\n * HEAD: The entity headers are in the message body.\n * POST: The resource describing the result of the action is transmitted in the message body.\n * TRACE: The message body contains the request message as received by the server\n */\n OK = 200,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.3.2\n *\n * The request has succeeded and a new resource has been created as a result of it. This is typically the response sent after a PUT request.\n */\n CREATED = 201,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.3.3\n *\n * The request has been received but not yet acted upon. It is non-committal, meaning that there is no way in HTTP to later send an asynchronous response indicating the outcome of processing the request. It is intended for cases where another process or server handles the request, or for batch processing.\n */\n ACCEPTED = 202,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.3.4\n *\n * This response code means returned meta-information set is not exact set as available from the origin server, but collected from a local or a third party copy. Except this condition, 200 OK response should be preferred instead of this response.\n */\n NON_AUTHORITATIVE_INFORMATION = 203,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.3.5\n *\n * There is no content to send for this request, but the headers may be useful. The user-agent may update its cached headers for this resource with the new ones.\n */\n NO_CONTENT = 204,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.3.6\n *\n * This response code is sent after accomplishing request to tell user agent reset document view which sent this request.\n */\n RESET_CONTENT = 205,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7233#section-4.1\n *\n * This response code is used because of range header sent by the client to separate download into multiple streams.\n */\n PARTIAL_CONTENT = 206,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc2518#section-10.2\n *\n * A Multi-Status response conveys information about multiple resources in situations where multiple status codes might be appropriate.\n */\n MULTI_STATUS = 207,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.4.1\n *\n * The request has more than one possible responses. User-agent or user should choose one of them. There is no standardized way to choose one of the responses.\n */\n MULTIPLE_CHOICES = 300,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.4.2\n *\n * This response code means that URI of requested resource has been changed. Probably, new URI would be given in the response.\n */\n MOVED_PERMANENTLY = 301,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.4.3\n *\n * This response code means that URI of requested resource has been changed temporarily. New changes in the URI might be made in the future. Therefore, this same URI should be used by the client in future requests.\n */\n MOVED_TEMPORARILY = 302,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.4.4\n *\n * Server sent this response to directing client to get requested resource to another URI with an GET request.\n */\n SEE_OTHER = 303,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7232#section-4.1\n *\n * This is used for caching purposes. It is telling to client that response has not been modified. So, client can continue to use same cached version of response.\n */\n NOT_MODIFIED = 304,\n /**\n * @deprecated\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.4.6\n *\n * Was defined in a previous version of the HTTP specification to indicate that a requested response must be accessed by a proxy. It has been deprecated due to security concerns regarding in-band configuration of a proxy.\n */\n USE_PROXY = 305,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.4.7\n *\n * Server sent this response to directing client to get requested resource to another URI with same method that used prior request. This has the same semantic than the 302 Found HTTP response code, with the exception that the user agent must not change the HTTP method used: if a POST was used in the first request, a POST must be used in the second request.\n */\n TEMPORARY_REDIRECT = 307,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7538#section-3\n *\n * This means that the resource is now permanently located at another URI, specified by the Location: HTTP Response header. This has the same semantics as the 301 Moved Permanently HTTP response code, with the exception that the user agent must not change the HTTP method used: if a POST was used in the first request, a POST must be used in the second request.\n */\n PERMANENT_REDIRECT = 308,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.1\n *\n * This response means that server could not understand the request due to invalid syntax.\n */\n BAD_REQUEST = 400,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7235#section-3.1\n *\n * Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.\n */\n UNAUTHORIZED = 401,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.2\n *\n * This response code is reserved for future use. Initial aim for creating this code was using it for digital payment systems however this is not used currently.\n */\n PAYMENT_REQUIRED = 402,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.3\n *\n * The client does not have access rights to the content, i.e. they are unauthorized, so server is rejecting to give proper response. Unlike 401, the client's identity is known to the server.\n */\n FORBIDDEN = 403,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.4\n *\n * The server can not find requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 to hide the existence of a resource from an unauthorized client. This response code is probably the most famous one due to its frequent occurence on the web.\n */\n NOT_FOUND = 404,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.5\n *\n * The request method is known by the server but has been disabled and cannot be used. For example, an API may forbid DELETE-ing a resource. The two mandatory methods, GET and HEAD, must never be disabled and should not return this error code.\n */\n METHOD_NOT_ALLOWED = 405,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.6\n *\n * This response is sent when the web server, after performing server-driven content negotiation, doesn't find any content following the criteria given by the user agent.\n */\n NOT_ACCEPTABLE = 406,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7235#section-3.2\n *\n * This is similar to 401 but authentication is needed to be done by a proxy.\n */\n PROXY_AUTHENTICATION_REQUIRED = 407,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.7\n *\n * This response is sent on an idle connection by some servers, even without any previous request by the client. It means that the server would like to shut down this unused connection. This response is used much more since some browsers, like Chrome, Firefox 27+, or IE9, use HTTP pre-connection mechanisms to speed up surfing. Also note that some servers merely shut down the connection without sending this message.\n */\n REQUEST_TIMEOUT = 408,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.8\n *\n * This response is sent when a request conflicts with the current state of the server.\n */\n CONFLICT = 409,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.9\n *\n * This response would be sent when the requested content has been permenantly deleted from server, with no forwarding address. Clients are expected to remove their caches and links to the resource. The HTTP specification intends this status code to be used for \"limited-time, promotional services\". APIs should not feel compelled to indicate resources that have been deleted with this status code.\n */\n GONE = 410,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.10\n *\n * The server rejected the request because the Content-Length header field is not defined and the server requires it.\n */\n LENGTH_REQUIRED = 411,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7232#section-4.2\n *\n * The client has indicated preconditions in its headers which the server does not meet.\n */\n PRECONDITION_FAILED = 412,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.11\n *\n * Request entity is larger than limits defined by server; the server might close the connection or return an Retry-After header field.\n */\n REQUEST_TOO_LONG = 413,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.12\n *\n * The URI requested by the client is longer than the server is willing to interpret.\n */\n REQUEST_URI_TOO_LONG = 414,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.13\n *\n * The media format of the requested data is not supported by the server, so the server is rejecting the request.\n */\n UNSUPPORTED_MEDIA_TYPE = 415,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7233#section-4.4\n *\n * The range specified by the Range header field in the request can't be fulfilled; it's possible that the range is outside the size of the target URI's data.\n */\n REQUESTED_RANGE_NOT_SATISFIABLE = 416,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.14\n *\n * This response code means the expectation indicated by the Expect request header field can't be met by the server.\n */\n EXPECTATION_FAILED = 417,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc2324#section-2.3.2\n *\n * Any attempt to brew coffee with a teapot should result in the error code \"418 I'm a teapot\". The resulting entity body MAY be short and stout.\n */\n IM_A_TEAPOT = 418,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc2518#section-10.6\n *\n * The 507 (Insufficient Storage) status code means the method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request. This condition is considered to be temporary. If the request which received this status code was the result of a user action, the request MUST NOT be repeated until it is requested by a separate user action.\n */\n INSUFFICIENT_SPACE_ON_RESOURCE = 419,\n /**\n * @deprecated\n * Official Documentation @ https://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-webdav-protocol-06.txt\n *\n * A deprecated response used by the Spring Framework when a method has failed.\n */\n METHOD_FAILURE = 420,\n /**\n * Official Documentation @ https://datatracker.ietf.org/doc/html/rfc7540#section-9.1.2\n *\n * Defined in the specification of HTTP/2 to indicate that a server is not able to produce a response for the combination of scheme and authority that are included in the request URI.\n */\n MISDIRECTED_REQUEST = 421,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc2518#section-10.3\n *\n * The request was well-formed but was unable to be followed due to semantic errors.\n */\n UNPROCESSABLE_ENTITY = 422,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc2518#section-10.4\n *\n * The resource that is being accessed is locked.\n */\n LOCKED = 423,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc2518#section-10.5\n *\n * The request failed due to failure of a previous request.\n */\n FAILED_DEPENDENCY = 424,\n /**\n * Official Documentation @ https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.15\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,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc6585#section-3\n *\n * The origin server requires the request to be conditional. Intended to prevent the 'lost update' problem, where a client GETs a resource's state, modifies it, and PUTs it back to the server, when meanwhile a third party has modified the state on the server, leading to a conflict.\n */\n PRECONDITION_REQUIRED = 428,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc6585#section-4\n *\n * The user has sent too many requests in a given amount of time (\"rate limiting\").\n */\n TOO_MANY_REQUESTS = 429,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc6585#section-5\n *\n * The server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields.\n */\n REQUEST_HEADER_FIELDS_TOO_LARGE = 431,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7725\n *\n * The user-agent requested a resource that cannot legally be provided, such as a web page censored by a government.\n */\n UNAVAILABLE_FOR_LEGAL_REASONS = 451,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.6.1\n *\n * The server encountered an unexpected condition that prevented it from fulfilling the request.\n */\n INTERNAL_SERVER_ERROR = 500,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.6.2\n *\n * The request method is not supported by the server and cannot be handled. The only methods that servers are required to support (and therefore that must not return this code) are GET and HEAD.\n */\n NOT_IMPLEMENTED = 501,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.6.3\n *\n * This error response means that the server, while working as a gateway to get a response needed to handle the request, got an invalid response.\n */\n BAD_GATEWAY = 502,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.6.4\n *\n * The server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded. Note that together with this response, a user-friendly page explaining the problem should be sent. This responses should be used for temporary conditions and the Retry-After: HTTP header should, if possible, contain the estimated time before the recovery of the service. The webmaster must also take care about the caching-related headers that are sent along with this response, as these temporary condition responses should usually not be cached.\n */\n SERVICE_UNAVAILABLE = 503,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.6.5\n *\n * This error response is given when the server is acting as a gateway and cannot get a response in time.\n */\n GATEWAY_TIMEOUT = 504,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.6.6\n *\n * The HTTP version used in the request is not supported by the server.\n */\n HTTP_VERSION_NOT_SUPPORTED = 505,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc2518#section-10.6\n *\n * The server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process.\n */\n INSUFFICIENT_STORAGE = 507,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc6585#section-6\n *\n * The 511 status code indicates that the client needs to authenticate to gain network access.\n */\n NETWORK_AUTHENTICATION_REQUIRED = 511,\n}\n"]}
1
+ {"version":3,"file":"http-status-codes.js","sourceRoot":"","sources":["../../../src/utils/http-status-codes.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,IAAY,eAwUX;AAxUD,WAAY,eAAe;IACzB,oBAAoB;IACpB;;OAEG;IACH,+DAAc,CAAA;IAEd;;OAEG;IACH,qFAAyB,CAAA;IAEzB;;OAEG;IACH,mEAAgB,CAAA;IAEhB;;OAEG;IACH,qEAAiB,CAAA;IAEjB,cAAc;IACd;;OAEG;IACH,mDAAQ,CAAA;IAER;;OAEG;IACH,6DAAa,CAAA;IAEb;;OAEG;IACH,+DAAc,CAAA;IAEd;;OAEG;IACH,yGAAmC,CAAA;IAEnC;;OAEG;IACH,mEAAgB,CAAA;IAEhB;;OAEG;IACH,yEAAmB,CAAA;IAEnB;;OAEG;IACH,6EAAqB,CAAA;IAErB;;OAEG;IACH,uEAAkB,CAAA;IAElB;;OAEG;IACH,+EAAsB,CAAA;IAEtB;;OAEG;IACH,6DAAa,CAAA;IAEb,kBAAkB;IAClB;;OAEG;IACH,+EAAsB,CAAA;IAEtB;;OAEG;IACH,iFAAuB,CAAA;IAEvB;;OAEG;IACH,iFAAuB,CAAA;IAEvB;;OAEG;IACH,iEAAe,CAAA;IAEf;;OAEG;IACH,uEAAkB,CAAA;IAElB;;;OAGG;IACH,iEAAe,CAAA;IAEf;;OAEG;IACH,mFAAwB,CAAA;IAExB;;OAEG;IACH,mFAAwB,CAAA;IAExB,mBAAmB;IACnB;;OAEG;IACH,qEAAiB,CAAA;IAEjB;;OAEG;IACH,uEAAkB,CAAA;IAElB;;OAEG;IACH,+EAAsB,CAAA;IAEtB;;OAEG;IACH,iEAAe,CAAA;IAEf;;OAEG;IACH,iEAAe,CAAA;IAEf;;OAEG;IACH,mFAAwB,CAAA;IAExB;;OAEG;IACH,2EAAoB,CAAA;IAEpB;;OAEG;IACH,yGAAmC,CAAA;IAEnC;;OAEG;IACH,6EAAqB,CAAA;IAErB;;OAEG;IACH,+DAAc,CAAA;IAEd;;OAEG;IACH,uDAAU,CAAA;IAEV;;OAEG;IACH,6EAAqB,CAAA;IAErB;;OAEG;IACH,qFAAyB,CAAA;IAEzB;;OAEG;IACH,+EAAsB,CAAA;IAEtB;;;OAGG;IACH,iFAAuB,CAAA;IAEvB;;OAEG;IACH,uFAA0B,CAAA;IAE1B;;OAEG;IACH,2FAA4B,CAAA;IAE5B;;OAEG;IACH,6GAAqC,CAAA;IAErC;;OAEG;IACH,mFAAwB,CAAA;IAExB;;OAEG;IACH,qEAAiB,CAAA;IAEjB;;OAEG;IACH,2GAAoC,CAAA;IAEpC;;;OAGG;IACH,2EAAoB,CAAA;IAEpB;;OAEG;IACH,qFAAyB,CAAA;IAEzB;;OAEG;IACH,uFAA0B,CAAA;IAE1B;;OAEG;IACH,2DAAY,CAAA;IAEZ;;OAEG;IACH,iFAAuB,CAAA;IAEvB;;OAEG;IACH,+EAAsB,CAAA;IAEtB;;OAEG;IACH,yFAA2B,CAAA;IAE3B;;OAEG;IACH,iFAAuB,CAAA;IAEvB;;OAEG;IACH,6GAAqC,CAAA;IAErC;;OAEG;IACH,yGAAmC,CAAA;IAEnC,mBAAmB;IACnB;;OAEG;IACH,yFAA2B,CAAA;IAE3B;;OAEG;IACH,6EAAqB,CAAA;IAErB;;OAEG;IACH,qEAAiB,CAAA;IAEjB;;OAEG;IACH,qFAAyB,CAAA;IAEzB;;OAEG;IACH,6EAAqB,CAAA;IAErB;;OAEG;IACH,mGAAgC,CAAA;IAEhC;;OAEG;IACH,6FAA6B,CAAA;IAE7B;;OAEG;IACH,uFAA0B,CAAA;IAE1B;;OAEG;IACH,yEAAmB,CAAA;IAEnB;;OAEG;IACH,uEAAkB,CAAA;IAElB;;OAEG;IACH,6GAAqC,CAAA;AACvC,CAAC,EAxUW,eAAe,+BAAf,eAAe,QAwU1B","sourcesContent":["/**\n * Complete HTTP status codes enum with descriptions.\n * For use with API responses and error handling.\n */\nexport enum HttpStatusCodes {\n // 1xx Informational\n /**\n * The server has received the request headers and the client should proceed to send the request body.\n */\n CONTINUE = 100,\n\n /**\n * The server is switching protocols according to the client's request.\n */\n SWITCHING_PROTOCOLS = 101,\n\n /**\n * Server has received the request and is still processing it.\n */\n PROCESSING = 102,\n\n /**\n * The server is sending preliminary headers while preparing the final response.\n */\n EARLY_HINTS = 103,\n\n // 2xx Success\n /**\n * The request succeeded. The result meaning depends on the HTTP method used.\n */\n OK = 200,\n\n /**\n * The request succeeded and a new resource was created as a result.\n */\n CREATED = 201,\n\n /**\n * The request has been received but not yet acted upon.\n */\n ACCEPTED = 202,\n\n /**\n * The returned information is from a third-party source, not the origin server.\n */\n NON_AUTHORITATIVE_INFORMATION = 203,\n\n /**\n * The request succeeded but there's no content to send in the response.\n */\n NO_CONTENT = 204,\n\n /**\n * The client should reset the document view that caused this request.\n */\n RESET_CONTENT = 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,\n\n /**\n * Conveys information about multiple resources, for complex operations.\n */\n MULTI_STATUS = 207,\n\n /**\n * The members of a DAV binding have already been enumerated and are not included in the response.\n */\n ALREADY_REPORTED = 208,\n\n /**\n * The server has fulfilled a request for the resource, and the response represents the result of one or more instance-manipulations.\n */\n IM_USED = 226,\n\n // 3xx Redirection\n /**\n * The request has more than one possible response and the client should choose one.\n */\n MULTIPLE_CHOICES = 300,\n\n /**\n * The resource has been permanently moved to a new URL.\n */\n MOVED_PERMANENTLY = 301,\n\n /**\n * The resource has been temporarily moved to another URL.\n */\n MOVED_TEMPORARILY = 302,\n\n /**\n * The response to the request can be found under another URI using the GET method.\n */\n SEE_OTHER = 303,\n\n /**\n * The resource hasn't been modified since the last request.\n */\n NOT_MODIFIED = 304,\n\n /**\n * @deprecated\n * Response must be accessed through a proxy.\n */\n USE_PROXY = 305,\n\n /**\n * The resource is temporarily available at a different URI, using the same HTTP method.\n */\n TEMPORARY_REDIRECT = 307,\n\n /**\n * The resource has been permanently moved to another URL, using the same HTTP method.\n */\n PERMANENT_REDIRECT = 308,\n\n // 4xx Client Error\n /**\n * The server cannot process the request due to a client error (malformed request).\n */\n BAD_REQUEST = 400,\n\n /**\n * Authentication is required and has failed or not been provided.\n */\n UNAUTHORIZED = 401,\n\n /**\n * Reserved for future use, originally intended for digital payment systems.\n */\n PAYMENT_REQUIRED = 402,\n\n /**\n * The client doesn't have permission to access the requested resource.\n */\n FORBIDDEN = 403,\n\n /**\n * The requested resource could not be found on the server.\n */\n NOT_FOUND = 404,\n\n /**\n * The request method is not supported for the requested resource.\n */\n METHOD_NOT_ALLOWED = 405,\n\n /**\n * The server can't provide a response matching the list of acceptable values in the client's headers.\n */\n NOT_ACCEPTABLE = 406,\n\n /**\n * Authentication by a proxy is required.\n */\n PROXY_AUTHENTICATION_REQUIRED = 407,\n\n /**\n * The server timed out waiting for the request.\n */\n REQUEST_TIMEOUT = 408,\n\n /**\n * The request conflicts with the current state of the server.\n */\n CONFLICT = 409,\n\n /**\n * The resource has been permanently deleted with no forwarding address.\n */\n GONE = 410,\n\n /**\n * The server requires a Content-Length header field.\n */\n LENGTH_REQUIRED = 411,\n\n /**\n * Preconditions in the client's headers failed.\n */\n PRECONDITION_FAILED = 412,\n\n /**\n * Request entity is larger than limits defined by server.\n */\n REQUEST_TOO_LONG = 413,\n\n /**\n * The request payload exceeds server size limits.\n * Modern equivalent of REQUEST_TOO_LONG.\n */\n PAYLOAD_TOO_LARGE = 413,\n\n /**\n * The URI requested is too long for the server to interpret.\n */\n REQUEST_URI_TOO_LONG = 414,\n\n /**\n * The server does not support the media type requested by the client.\n */\n UNSUPPORTED_MEDIA_TYPE = 415,\n\n /**\n * The range specified by the Range header cannot be fulfilled.\n */\n REQUESTED_RANGE_NOT_SATISFIABLE = 416,\n\n /**\n * The server cannot meet the expectations given in the Expect header.\n */\n EXPECTATION_FAILED = 417,\n\n /**\n * The server refuses to brew coffee because it is a teapot. (April Fools' joke)\n */\n IM_A_TEAPOT = 418,\n\n /**\n * The server cannot store the representation needed to complete the request.\n */\n INSUFFICIENT_SPACE_ON_RESOURCE = 419,\n\n /**\n * @deprecated\n * A method has failed - specific to Spring Framework.\n */\n METHOD_FAILURE = 420,\n\n /**\n * The server cannot produce a response for the requested URI scheme and authority.\n */\n MISDIRECTED_REQUEST = 421,\n\n /**\n * The request was well-formed but has semantic errors preventing processing.\n */\n UNPROCESSABLE_ENTITY = 422,\n\n /**\n * The requested resource is locked against access.\n */\n LOCKED = 423,\n\n /**\n * The request failed due to the failure of a previous request.\n */\n FAILED_DEPENDENCY = 424,\n\n /**\n * The client should switch to a different protocol.\n */\n UPGRADE_REQUIRED = 426,\n\n /**\n * The server requires conditional requests to prevent lost updates.\n */\n PRECONDITION_REQUIRED = 428,\n\n /**\n * The client has sent too many requests in a given time period (rate limiting).\n */\n TOO_MANY_REQUESTS = 429,\n\n /**\n * Request headers are too large for the server to process.\n */\n REQUEST_HEADER_FIELDS_TOO_LARGE = 431,\n\n /**\n * Resource cannot be legally provided (e.g., censored by government).\n */\n UNAVAILABLE_FOR_LEGAL_REASONS = 451,\n\n // 5xx Server Error\n /**\n * The server encountered an unexpected error preventing it from fulfilling the request.\n */\n INTERNAL_SERVER_ERROR = 500,\n\n /**\n * The server does not support the functionality required to fulfill the request.\n */\n NOT_IMPLEMENTED = 501,\n\n /**\n * The server, acting as a gateway, received an invalid response from an upstream server.\n */\n BAD_GATEWAY = 502,\n\n /**\n * The server is currently unable to handle the request due to temporary overload or maintenance.\n */\n SERVICE_UNAVAILABLE = 503,\n\n /**\n * The server, acting as a gateway, did not receive a timely response from an upstream server.\n */\n GATEWAY_TIMEOUT = 504,\n\n /**\n * The server does not support the HTTP protocol version used in the request.\n */\n HTTP_VERSION_NOT_SUPPORTED = 505,\n\n /**\n * Transparent content negotiation for the request resulted in circular reference.\n */\n VARIANT_ALSO_NEGOTIATES = 506,\n\n /**\n * The server cannot store the representation needed to complete the request.\n */\n INSUFFICIENT_STORAGE = 507,\n\n /**\n * The server detected an infinite loop while processing the request.\n */\n LOOP_DETECTED = 508,\n\n /**\n * Further extensions to the request are required for the server to fulfill it.\n */\n NOT_EXTENDED = 510,\n\n /**\n * The client needs to authenticate to gain network access.\n */\n NETWORK_AUTHENTICATION_REQUIRED = 511\n}\n"]}
@@ -5,18 +5,12 @@
5
5
  */
6
6
  export declare function uuid(): string;
7
7
  /**
8
- * Generates a ULID (Universally Unique Lexicographically Sortable Identifier).
8
+ * Generates a nanoid-style random ID (URL-safe, customizable length).
9
9
  *
10
- * @returns {string} ULID string (26 chars, Crockford Base32, e.g., '01H7ZXS9FJKPX06P1AYZKCGHQF').
10
+ * @param {number} length - Length of the ID (default: 21).
11
+ * @returns {string} Nanoid-style random string.
11
12
  */
12
- export declare function ulidString(): string;
13
- /**
14
- * Generates a nanoid string (URL-friendly, collision-resistant, customizable size).
15
- *
16
- * @param {number} [size=21] - Number of characters for the ID (default: 21).
17
- * @returns {string} nanoid string.
18
- */
19
- export declare function nanoId(size?: number): string;
13
+ export declare function nanoId(length?: number): string;
20
14
  /**
21
15
  * Generates a cryptographically strong random hex string.
22
16
  *
@@ -32,4 +26,11 @@ export declare function randomHex(byteLength?: number): string;
32
26
  * @returns {number} Random integer in range.
33
27
  */
34
28
  export declare function randomInt(min: number, max: number): number;
29
+ /**
30
+ * Generates a cryptographically strong random base64 string.
31
+ *
32
+ * @param {number} byteLength - Number of random bytes (default: 16).
33
+ * @returns {string} Random base64 string (URL-safe, no padding).
34
+ */
35
+ export declare function randomBase64(byteLength?: number): string;
35
36
  //# sourceMappingURL=id.utils.d.ts.map