nextemos 3.9.6 → 3.9.7

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.
@@ -1,60 +1,11 @@
1
- /**
2
- * HTTP request methods.
3
- *
4
- * HTTP defines a set of request methods to indicate the desired action to be
5
- * performed for a given resource. Although they can also be nouns, these
6
- * request methods are sometimes referred as HTTP verbs. Each of them implements
7
- * a different semantic, but some common features are shared by a group of them:
8
- * e.g. a request method can be safe, idempotent, or cacheable.
9
- *
10
- * @public
11
- */
12
1
  export declare enum HTTPMethod {
13
- /**
14
- * The `CONNECT` method establishes a tunnel to the server identified by the
15
- * target resource.
16
- */
17
2
  CONNECT = "CONNECT",
18
- /**
19
- * The `DELETE` method deletes the specified resource.
20
- */
21
3
  DELETE = "DELETE",
22
- /**
23
- * The `GET` method requests a representation of the specified resource.
24
- * Requests using GET should only retrieve data.
25
- */
26
4
  GET = "GET",
27
- /**
28
- * The `HEAD` method asks for a response identical to that of a GET request,
29
- * but without the response body.
30
- */
31
5
  HEAD = "HEAD",
32
- /**
33
- * The `OPTIONS` method is used to describe the communication options for the
34
- * target resource.
35
- */
36
6
  OPTIONS = "OPTIONS",
37
- /**
38
- * The PATCH method is used to apply partial modifications to a resource.
39
- */
40
7
  PATCH = "PATCH",
41
- /**
42
- * The `POST` method is used to submit an entity to the specified resource,
43
- * often causing a change in state or side effects on the server.
44
- */
45
8
  POST = "POST",
46
- /**
47
- * The `PUT` method replaces all current representations of the target
48
- * resource with the request payload.
49
- */
50
9
  PUT = "PUT",
51
- /**
52
- * The `TRACE` method performs a message loop-back test along the path to the
53
- * target resource.
54
- */
55
10
  TRACE = "TRACE"
56
11
  }
57
- /**
58
- * @public
59
- */
60
- export default HTTPMethod;
@@ -1,64 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HTTPMethod = void 0;
4
- /**
5
- * HTTP request methods.
6
- *
7
- * HTTP defines a set of request methods to indicate the desired action to be
8
- * performed for a given resource. Although they can also be nouns, these
9
- * request methods are sometimes referred as HTTP verbs. Each of them implements
10
- * a different semantic, but some common features are shared by a group of them:
11
- * e.g. a request method can be safe, idempotent, or cacheable.
12
- *
13
- * @public
14
- */
15
4
  var HTTPMethod;
16
5
  (function (HTTPMethod) {
17
- /**
18
- * The `CONNECT` method establishes a tunnel to the server identified by the
19
- * target resource.
20
- */
21
6
  HTTPMethod["CONNECT"] = "CONNECT";
22
- /**
23
- * The `DELETE` method deletes the specified resource.
24
- */
25
7
  HTTPMethod["DELETE"] = "DELETE";
26
- /**
27
- * The `GET` method requests a representation of the specified resource.
28
- * Requests using GET should only retrieve data.
29
- */
30
8
  HTTPMethod["GET"] = "GET";
31
- /**
32
- * The `HEAD` method asks for a response identical to that of a GET request,
33
- * but without the response body.
34
- */
35
9
  HTTPMethod["HEAD"] = "HEAD";
36
- /**
37
- * The `OPTIONS` method is used to describe the communication options for the
38
- * target resource.
39
- */
40
10
  HTTPMethod["OPTIONS"] = "OPTIONS";
41
- /**
42
- * The PATCH method is used to apply partial modifications to a resource.
43
- */
44
11
  HTTPMethod["PATCH"] = "PATCH";
45
- /**
46
- * The `POST` method is used to submit an entity to the specified resource,
47
- * often causing a change in state or side effects on the server.
48
- */
49
12
  HTTPMethod["POST"] = "POST";
50
- /**
51
- * The `PUT` method replaces all current representations of the target
52
- * resource with the request payload.
53
- */
54
13
  HTTPMethod["PUT"] = "PUT";
55
- /**
56
- * The `TRACE` method performs a message loop-back test along the path to the
57
- * target resource.
58
- */
59
14
  HTTPMethod["TRACE"] = "TRACE";
60
15
  })(HTTPMethod || (exports.HTTPMethod = HTTPMethod = {}));
61
- /**
62
- * @public
63
- */
64
- exports.default = HTTPMethod;
@@ -1,319 +1,63 @@
1
- /**
2
- * Hypertext Transfer Protocol (HTTP) response status codes.
3
- * @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}
4
- */
5
1
  export declare enum HttpStatusCode {
6
- /**
7
- * The server has received the request headers and the client should proceed to send the request body
8
- * (in the case of a request for which a body needs to be sent; for example, a POST request).
9
- * Sending a large request body to a server after a request has been rejected for inappropriate headers would be inefficient.
10
- * To have a server check the request's headers, a client must send Expect: 100-continue as a header in its initial request
11
- * and receive a 100 Continue status code in response before sending the body. The response 417 Expectation Failed indicates the request should not be continued.
12
- */
13
2
  CONTINUE = 100,
14
- /**
15
- * The requester has asked the server to switch protocols and the server has agreed to do so.
16
- */
17
3
  SWITCHING_PROTOCOLS = 101,
18
- /**
19
- * A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request.
20
- * This code indicates that the server has received and is processing the request, but no response is available yet.
21
- * This prevents the client from timing out and assuming the request was lost.
22
- */
23
4
  PROCESSING = 102,
24
- /**
25
- * Standard response for successful HTTP requests.
26
- * The actual response will depend on the request method used.
27
- * In a GET request, the response will contain an entity corresponding to the requested resource.
28
- * In a POST request, the response will contain an entity describing or containing the result of the action.
29
- */
30
5
  OK = 200,
31
- /**
32
- * The request has been fulfilled, resulting in the creation of a new resource.
33
- */
34
6
  CREATED = 201,
35
- /**
36
- * The request has been accepted for processing, but the processing has not been completed.
37
- * The request might or might not be eventually acted upon, and may be disallowed when processing occurs.
38
- */
39
7
  ACCEPTED = 202,
40
- /**
41
- * SINCE HTTP/1.1
42
- * The server is a transforming proxy that received a 200 OK from its origin,
43
- * but is returning a modified version of the origin's response.
44
- */
45
8
  NON_AUTHORITATIVE_INFORMATION = 203,
46
- /**
47
- * The server successfully processed the request and is not returning any content.
48
- */
49
9
  NO_CONTENT = 204,
50
- /**
51
- * The server successfully processed the request, but is not returning any content.
52
- * Unlike a 204 response, this response requires that the requester reset the document view.
53
- */
54
10
  RESET_CONTENT = 205,
55
- /**
56
- * The server is delivering only part of the resource (byte serving) due to a range header sent by the client.
57
- * The range header is used by HTTP clients to enable resuming of interrupted downloads,
58
- * or split a download into multiple simultaneous streams.
59
- */
60
11
  PARTIAL_CONTENT = 206,
61
- /**
62
- * The message body that follows is an XML message and can contain a number of separate response codes,
63
- * depending on how many sub-requests were made.
64
- */
65
12
  MULTI_STATUS = 207,
66
- /**
67
- * The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response,
68
- * and are not being included again.
69
- */
70
13
  ALREADY_REPORTED = 208,
71
- /**
72
- * The server has fulfilled a request for the resource,
73
- * and the response is a representation of the result of one or more instance-manipulations applied to the current instance.
74
- */
75
14
  IM_USED = 226,
76
- /**
77
- * Indicates multiple options for the resource from which the client may choose (via agent-driven content negotiation).
78
- * For example, this code could be used to present multiple video format options,
79
- * to list files with different filename extensions, or to suggest word-sense disambiguation.
80
- */
81
15
  MULTIPLE_CHOICES = 300,
82
- /**
83
- * This and all future requests should be directed to the given URI.
84
- */
85
16
  MOVED_PERMANENTLY = 301,
86
- /**
87
- * This is an example of industry practice contradicting the standard.
88
- * The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect
89
- * (the original describing phrase was "Moved Temporarily"), but popular browsers implemented 302
90
- * with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307
91
- * to distinguish between the two behaviours. However, some Web applications and frameworks
92
- * use the 302 status code as if it were the 303.
93
- */
94
17
  FOUND = 302,
95
- /**
96
- * SINCE HTTP/1.1
97
- * The response to the request can be found under another URI using a GET method.
98
- * When received in response to a POST (or PUT/DELETE), the client should presume that
99
- * the server has received the data and should issue a redirect with a separate GET message.
100
- */
101
18
  SEE_OTHER = 303,
102
- /**
103
- * Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match.
104
- * In such case, there is no need to retransmit the resource since the client still has a previously-downloaded copy.
105
- */
106
19
  NOT_MODIFIED = 304,
107
- /**
108
- * SINCE HTTP/1.1
109
- * The requested resource is available only through a proxy, the address for which is provided in the response.
110
- * Many HTTP clients (such as Mozilla and Internet Explorer) do not correctly handle responses with this status code, primarily for security reasons.
111
- */
112
20
  USE_PROXY = 305,
113
- /**
114
- * No longer used. Originally meant "Subsequent requests should use the specified proxy."
115
- */
116
21
  SWITCH_PROXY = 306,
117
- /**
118
- * SINCE HTTP/1.1
119
- * In this case, the request should be repeated with another URI; however, future requests should still use the original URI.
120
- * In contrast to how 302 was historically implemented, the request method is not allowed to be changed when reissuing the original request.
121
- * For example, a POST request should be repeated using another POST request.
122
- */
123
22
  TEMPORARY_REDIRECT = 307,
124
- /**
125
- * The request and all future requests should be repeated using another URI.
126
- * 307 and 308 parallel the behaviors of 302 and 301, but do not allow the HTTP method to change.
127
- * So, for example, submitting a form to a permanently redirected resource may continue smoothly.
128
- */
129
23
  PERMANENT_REDIRECT = 308,
130
- /**
131
- * The server cannot or will not process the request due to an apparent client error
132
- * (e.g., malformed request syntax, too large size, invalid request message framing, or deceptive request routing).
133
- */
134
24
  BAD_REQUEST = 400,
135
- /**
136
- * Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet
137
- * been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the
138
- * requested resource. See Basic access authentication and Digest access authentication. 401 semantically means
139
- * "unauthenticated",i.e. the user does not have the necessary credentials.
140
- */
141
25
  UNAUTHORIZED = 401,
142
- /**
143
- * Reserved for future use. The original intention was that this code might be used as part of some form of digital
144
- * cash or micro payment scheme, but that has not happened, and this code is not usually used.
145
- * Google Developers API uses this status if a particular developer has exceeded the daily limit on requests.
146
- */
147
26
  PAYMENT_REQUIRED = 402,
148
- /**
149
- * The request was valid, but the server is refusing action.
150
- * The user might not have the necessary permissions for a resource.
151
- */
152
27
  FORBIDDEN = 403,
153
- /**
154
- * The requested resource could not be found but may be available in the future.
155
- * Subsequent requests by the client are permissible.
156
- */
157
28
  NOT_FOUND = 404,
158
- /**
159
- * A request method is not supported for the requested resource;
160
- * for example, a GET request on a form that requires data to be presented via POST, or a PUT request on a read-only resource.
161
- */
162
29
  METHOD_NOT_ALLOWED = 405,
163
- /**
164
- * The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.
165
- */
166
30
  NOT_ACCEPTABLE = 406,
167
- /**
168
- * The client must first authenticate itself with the proxy.
169
- */
170
31
  PROXY_AUTHENTICATION_REQUIRED = 407,
171
- /**
172
- * The server timed out waiting for the request.
173
- * According to HTTP specifications:
174
- * "The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time."
175
- */
176
32
  REQUEST_TIMEOUT = 408,
177
- /**
178
- * Indicates that the request could not be processed because of conflict in the request,
179
- * such as an edit conflict between multiple simultaneous updates.
180
- */
181
33
  CONFLICT = 409,
182
- /**
183
- * Indicates that the resource requested is no longer available and will not be available again.
184
- * This should be used when a resource has been intentionally removed and the resource should be purged.
185
- * Upon receiving a 410 status code, the client should not request the resource in the future.
186
- * Clients such as search engines should remove the resource from their indices.
187
- * Most use cases do not require clients and search engines to purge the resource, and a "404 Not Found" may be used instead.
188
- */
189
34
  GONE = 410,
190
- /**
191
- * The request did not specify the length of its content, which is required by the requested resource.
192
- */
193
35
  LENGTH_REQUIRED = 411,
194
- /**
195
- * The server does not meet one of the preconditions that the requester put on the request.
196
- */
197
36
  PRECONDITION_FAILED = 412,
198
- /**
199
- * The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large".
200
- */
201
37
  PAYLOAD_TOO_LARGE = 413,
202
- /**
203
- * The URI provided was too long for the server to process. Often the result of too much data being encoded as a query-string of a GET request,
204
- * in which case it should be converted to a POST request.
205
- * Called "Request-URI Too Long" previously.
206
- */
207
38
  URI_TOO_LONG = 414,
208
- /**
209
- * The request entity has a media type which the server or resource does not support.
210
- * For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.
211
- */
212
39
  UNSUPPORTED_MEDIA_TYPE = 415,
213
- /**
214
- * The client has asked for a portion of the file (byte serving), but the server cannot supply that portion.
215
- * For example, if the client asked for a part of the file that lies beyond the end of the file.
216
- * Called "Requested Range Not Satisfiable" previously.
217
- */
218
40
  RANGE_NOT_SATISFIABLE = 416,
219
- /**
220
- * The server cannot meet the requirements of the Expect request-header field.
221
- */
222
41
  EXPECTATION_FAILED = 417,
223
- /**
224
- * This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol,
225
- * and is not expected to be implemented by actual HTTP servers. The RFC specifies this code should be returned by
226
- * teapots requested to brew coffee. This HTTP status is used as an Easter egg in some websites, including Google.com.
227
- */
228
42
  I_AM_A_TEAPOT = 418,
229
- /**
230
- * The request was directed at a server that is not able to produce a response (for example because a connection reuse).
231
- */
232
43
  MISDIRECTED_REQUEST = 421,
233
- /**
234
- * The request was well-formed but was unable to be followed due to semantic errors.
235
- */
236
44
  UNPROCESSABLE_ENTITY = 422,
237
- /**
238
- * The resource that is being accessed is locked.
239
- */
240
45
  LOCKED = 423,
241
- /**
242
- * The request failed due to failure of a previous request (e.g., a PROPPATCH).
243
- */
244
46
  FAILED_DEPENDENCY = 424,
245
- /**
246
- * The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field.
247
- */
248
47
  UPGRADE_REQUIRED = 426,
249
- /**
250
- * The origin server requires the request to be conditional.
251
- * Intended to prevent "the 'lost update' problem, where a client
252
- * GETs a resource's state, modifies it, and PUTs it back to the server,
253
- * when meanwhile a third party has modified the state on the server, leading to a conflict."
254
- */
255
48
  PRECONDITION_REQUIRED = 428,
256
- /**
257
- * The user has sent too many requests in a given amount of time. Intended for use with rate-limiting schemes.
258
- */
259
49
  TOO_MANY_REQUESTS = 429,
260
- /**
261
- * The server is unwilling to process the request because either an individual header field,
262
- * or all the header fields collectively, are too large.
263
- */
264
50
  REQUEST_HEADER_FIELDS_TOO_LARGE = 431,
265
- /**
266
- * A server operator has received a legal demand to deny access to a resource or to a set of resources
267
- * that includes the requested resource. The code 451 was chosen as a reference to the novel Fahrenheit 451.
268
- */
269
51
  UNAVAILABLE_FOR_LEGAL_REASONS = 451,
270
- /**
271
- * A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.
272
- */
273
52
  INTERNAL_SERVER_ERROR = 500,
274
- /**
275
- * The server either does not recognize the request method, or it lacks the ability to fulfill the request.
276
- * Usually this implies future availability (e.g., a new feature of a web-service API).
277
- */
278
53
  NOT_IMPLEMENTED = 501,
279
- /**
280
- * The server was acting as a gateway or proxy and received an invalid response from the upstream server.
281
- */
282
54
  BAD_GATEWAY = 502,
283
- /**
284
- * The server is currently unavailable (because it is overloaded or down for maintenance).
285
- * Generally, this is a temporary state.
286
- */
287
55
  SERVICE_UNAVAILABLE = 503,
288
- /**
289
- * The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
290
- */
291
56
  GATEWAY_TIMEOUT = 504,
292
- /**
293
- * The server does not support the HTTP protocol version used in the request
294
- */
295
57
  HTTP_VERSION_NOT_SUPPORTED = 505,
296
- /**
297
- * Transparent content negotiation for the request results in a circular reference.
298
- */
299
58
  VARIANT_ALSO_NEGOTIATES = 506,
300
- /**
301
- * The server is unable to store the representation needed to complete the request.
302
- */
303
59
  INSUFFICIENT_STORAGE = 507,
304
- /**
305
- * The server detected an infinite loop while processing the request.
306
- */
307
60
  LOOP_DETECTED = 508,
308
- /**
309
- * Further extensions to the request are required for the server to fulfill it.
310
- */
311
61
  NOT_EXTENDED = 510,
312
- /**
313
- * The client needs to authenticate to gain network access.
314
- * Intended for use by intercepting proxies used to control access to the network (e.g., "captive portals" used
315
- * to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot).
316
- */
317
62
  NETWORK_AUTHENTICATION_REQUIRED = 511
318
63
  }
319
- export default HttpStatusCode;
@@ -1,323 +1,67 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HttpStatusCode = void 0;
4
- /**
5
- * Hypertext Transfer Protocol (HTTP) response status codes.
6
- * @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}
7
- */
8
4
  var HttpStatusCode;
9
5
  (function (HttpStatusCode) {
10
- /**
11
- * The server has received the request headers and the client should proceed to send the request body
12
- * (in the case of a request for which a body needs to be sent; for example, a POST request).
13
- * Sending a large request body to a server after a request has been rejected for inappropriate headers would be inefficient.
14
- * To have a server check the request's headers, a client must send Expect: 100-continue as a header in its initial request
15
- * and receive a 100 Continue status code in response before sending the body. The response 417 Expectation Failed indicates the request should not be continued.
16
- */
17
6
  HttpStatusCode[HttpStatusCode["CONTINUE"] = 100] = "CONTINUE";
18
- /**
19
- * The requester has asked the server to switch protocols and the server has agreed to do so.
20
- */
21
7
  HttpStatusCode[HttpStatusCode["SWITCHING_PROTOCOLS"] = 101] = "SWITCHING_PROTOCOLS";
22
- /**
23
- * A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request.
24
- * This code indicates that the server has received and is processing the request, but no response is available yet.
25
- * This prevents the client from timing out and assuming the request was lost.
26
- */
27
8
  HttpStatusCode[HttpStatusCode["PROCESSING"] = 102] = "PROCESSING";
28
- /**
29
- * Standard response for successful HTTP requests.
30
- * The actual response will depend on the request method used.
31
- * In a GET request, the response will contain an entity corresponding to the requested resource.
32
- * In a POST request, the response will contain an entity describing or containing the result of the action.
33
- */
34
9
  HttpStatusCode[HttpStatusCode["OK"] = 200] = "OK";
35
- /**
36
- * The request has been fulfilled, resulting in the creation of a new resource.
37
- */
38
10
  HttpStatusCode[HttpStatusCode["CREATED"] = 201] = "CREATED";
39
- /**
40
- * The request has been accepted for processing, but the processing has not been completed.
41
- * The request might or might not be eventually acted upon, and may be disallowed when processing occurs.
42
- */
43
11
  HttpStatusCode[HttpStatusCode["ACCEPTED"] = 202] = "ACCEPTED";
44
- /**
45
- * SINCE HTTP/1.1
46
- * The server is a transforming proxy that received a 200 OK from its origin,
47
- * but is returning a modified version of the origin's response.
48
- */
49
12
  HttpStatusCode[HttpStatusCode["NON_AUTHORITATIVE_INFORMATION"] = 203] = "NON_AUTHORITATIVE_INFORMATION";
50
- /**
51
- * The server successfully processed the request and is not returning any content.
52
- */
53
13
  HttpStatusCode[HttpStatusCode["NO_CONTENT"] = 204] = "NO_CONTENT";
54
- /**
55
- * The server successfully processed the request, but is not returning any content.
56
- * Unlike a 204 response, this response requires that the requester reset the document view.
57
- */
58
14
  HttpStatusCode[HttpStatusCode["RESET_CONTENT"] = 205] = "RESET_CONTENT";
59
- /**
60
- * The server is delivering only part of the resource (byte serving) due to a range header sent by the client.
61
- * The range header is used by HTTP clients to enable resuming of interrupted downloads,
62
- * or split a download into multiple simultaneous streams.
63
- */
64
15
  HttpStatusCode[HttpStatusCode["PARTIAL_CONTENT"] = 206] = "PARTIAL_CONTENT";
65
- /**
66
- * The message body that follows is an XML message and can contain a number of separate response codes,
67
- * depending on how many sub-requests were made.
68
- */
69
16
  HttpStatusCode[HttpStatusCode["MULTI_STATUS"] = 207] = "MULTI_STATUS";
70
- /**
71
- * The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response,
72
- * and are not being included again.
73
- */
74
17
  HttpStatusCode[HttpStatusCode["ALREADY_REPORTED"] = 208] = "ALREADY_REPORTED";
75
- /**
76
- * The server has fulfilled a request for the resource,
77
- * and the response is a representation of the result of one or more instance-manipulations applied to the current instance.
78
- */
79
18
  HttpStatusCode[HttpStatusCode["IM_USED"] = 226] = "IM_USED";
80
- /**
81
- * Indicates multiple options for the resource from which the client may choose (via agent-driven content negotiation).
82
- * For example, this code could be used to present multiple video format options,
83
- * to list files with different filename extensions, or to suggest word-sense disambiguation.
84
- */
85
19
  HttpStatusCode[HttpStatusCode["MULTIPLE_CHOICES"] = 300] = "MULTIPLE_CHOICES";
86
- /**
87
- * This and all future requests should be directed to the given URI.
88
- */
89
20
  HttpStatusCode[HttpStatusCode["MOVED_PERMANENTLY"] = 301] = "MOVED_PERMANENTLY";
90
- /**
91
- * This is an example of industry practice contradicting the standard.
92
- * The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect
93
- * (the original describing phrase was "Moved Temporarily"), but popular browsers implemented 302
94
- * with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307
95
- * to distinguish between the two behaviours. However, some Web applications and frameworks
96
- * use the 302 status code as if it were the 303.
97
- */
98
21
  HttpStatusCode[HttpStatusCode["FOUND"] = 302] = "FOUND";
99
- /**
100
- * SINCE HTTP/1.1
101
- * The response to the request can be found under another URI using a GET method.
102
- * When received in response to a POST (or PUT/DELETE), the client should presume that
103
- * the server has received the data and should issue a redirect with a separate GET message.
104
- */
105
22
  HttpStatusCode[HttpStatusCode["SEE_OTHER"] = 303] = "SEE_OTHER";
106
- /**
107
- * Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match.
108
- * In such case, there is no need to retransmit the resource since the client still has a previously-downloaded copy.
109
- */
110
23
  HttpStatusCode[HttpStatusCode["NOT_MODIFIED"] = 304] = "NOT_MODIFIED";
111
- /**
112
- * SINCE HTTP/1.1
113
- * The requested resource is available only through a proxy, the address for which is provided in the response.
114
- * Many HTTP clients (such as Mozilla and Internet Explorer) do not correctly handle responses with this status code, primarily for security reasons.
115
- */
116
24
  HttpStatusCode[HttpStatusCode["USE_PROXY"] = 305] = "USE_PROXY";
117
- /**
118
- * No longer used. Originally meant "Subsequent requests should use the specified proxy."
119
- */
120
25
  HttpStatusCode[HttpStatusCode["SWITCH_PROXY"] = 306] = "SWITCH_PROXY";
121
- /**
122
- * SINCE HTTP/1.1
123
- * In this case, the request should be repeated with another URI; however, future requests should still use the original URI.
124
- * In contrast to how 302 was historically implemented, the request method is not allowed to be changed when reissuing the original request.
125
- * For example, a POST request should be repeated using another POST request.
126
- */
127
26
  HttpStatusCode[HttpStatusCode["TEMPORARY_REDIRECT"] = 307] = "TEMPORARY_REDIRECT";
128
- /**
129
- * The request and all future requests should be repeated using another URI.
130
- * 307 and 308 parallel the behaviors of 302 and 301, but do not allow the HTTP method to change.
131
- * So, for example, submitting a form to a permanently redirected resource may continue smoothly.
132
- */
133
27
  HttpStatusCode[HttpStatusCode["PERMANENT_REDIRECT"] = 308] = "PERMANENT_REDIRECT";
134
- /**
135
- * The server cannot or will not process the request due to an apparent client error
136
- * (e.g., malformed request syntax, too large size, invalid request message framing, or deceptive request routing).
137
- */
138
28
  HttpStatusCode[HttpStatusCode["BAD_REQUEST"] = 400] = "BAD_REQUEST";
139
- /**
140
- * Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet
141
- * been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the
142
- * requested resource. See Basic access authentication and Digest access authentication. 401 semantically means
143
- * "unauthenticated",i.e. the user does not have the necessary credentials.
144
- */
145
29
  HttpStatusCode[HttpStatusCode["UNAUTHORIZED"] = 401] = "UNAUTHORIZED";
146
- /**
147
- * Reserved for future use. The original intention was that this code might be used as part of some form of digital
148
- * cash or micro payment scheme, but that has not happened, and this code is not usually used.
149
- * Google Developers API uses this status if a particular developer has exceeded the daily limit on requests.
150
- */
151
30
  HttpStatusCode[HttpStatusCode["PAYMENT_REQUIRED"] = 402] = "PAYMENT_REQUIRED";
152
- /**
153
- * The request was valid, but the server is refusing action.
154
- * The user might not have the necessary permissions for a resource.
155
- */
156
31
  HttpStatusCode[HttpStatusCode["FORBIDDEN"] = 403] = "FORBIDDEN";
157
- /**
158
- * The requested resource could not be found but may be available in the future.
159
- * Subsequent requests by the client are permissible.
160
- */
161
32
  HttpStatusCode[HttpStatusCode["NOT_FOUND"] = 404] = "NOT_FOUND";
162
- /**
163
- * A request method is not supported for the requested resource;
164
- * for example, a GET request on a form that requires data to be presented via POST, or a PUT request on a read-only resource.
165
- */
166
33
  HttpStatusCode[HttpStatusCode["METHOD_NOT_ALLOWED"] = 405] = "METHOD_NOT_ALLOWED";
167
- /**
168
- * The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.
169
- */
170
34
  HttpStatusCode[HttpStatusCode["NOT_ACCEPTABLE"] = 406] = "NOT_ACCEPTABLE";
171
- /**
172
- * The client must first authenticate itself with the proxy.
173
- */
174
35
  HttpStatusCode[HttpStatusCode["PROXY_AUTHENTICATION_REQUIRED"] = 407] = "PROXY_AUTHENTICATION_REQUIRED";
175
- /**
176
- * The server timed out waiting for the request.
177
- * According to HTTP specifications:
178
- * "The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time."
179
- */
180
36
  HttpStatusCode[HttpStatusCode["REQUEST_TIMEOUT"] = 408] = "REQUEST_TIMEOUT";
181
- /**
182
- * Indicates that the request could not be processed because of conflict in the request,
183
- * such as an edit conflict between multiple simultaneous updates.
184
- */
185
37
  HttpStatusCode[HttpStatusCode["CONFLICT"] = 409] = "CONFLICT";
186
- /**
187
- * Indicates that the resource requested is no longer available and will not be available again.
188
- * This should be used when a resource has been intentionally removed and the resource should be purged.
189
- * Upon receiving a 410 status code, the client should not request the resource in the future.
190
- * Clients such as search engines should remove the resource from their indices.
191
- * Most use cases do not require clients and search engines to purge the resource, and a "404 Not Found" may be used instead.
192
- */
193
38
  HttpStatusCode[HttpStatusCode["GONE"] = 410] = "GONE";
194
- /**
195
- * The request did not specify the length of its content, which is required by the requested resource.
196
- */
197
39
  HttpStatusCode[HttpStatusCode["LENGTH_REQUIRED"] = 411] = "LENGTH_REQUIRED";
198
- /**
199
- * The server does not meet one of the preconditions that the requester put on the request.
200
- */
201
40
  HttpStatusCode[HttpStatusCode["PRECONDITION_FAILED"] = 412] = "PRECONDITION_FAILED";
202
- /**
203
- * The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large".
204
- */
205
41
  HttpStatusCode[HttpStatusCode["PAYLOAD_TOO_LARGE"] = 413] = "PAYLOAD_TOO_LARGE";
206
- /**
207
- * The URI provided was too long for the server to process. Often the result of too much data being encoded as a query-string of a GET request,
208
- * in which case it should be converted to a POST request.
209
- * Called "Request-URI Too Long" previously.
210
- */
211
42
  HttpStatusCode[HttpStatusCode["URI_TOO_LONG"] = 414] = "URI_TOO_LONG";
212
- /**
213
- * The request entity has a media type which the server or resource does not support.
214
- * For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.
215
- */
216
43
  HttpStatusCode[HttpStatusCode["UNSUPPORTED_MEDIA_TYPE"] = 415] = "UNSUPPORTED_MEDIA_TYPE";
217
- /**
218
- * The client has asked for a portion of the file (byte serving), but the server cannot supply that portion.
219
- * For example, if the client asked for a part of the file that lies beyond the end of the file.
220
- * Called "Requested Range Not Satisfiable" previously.
221
- */
222
44
  HttpStatusCode[HttpStatusCode["RANGE_NOT_SATISFIABLE"] = 416] = "RANGE_NOT_SATISFIABLE";
223
- /**
224
- * The server cannot meet the requirements of the Expect request-header field.
225
- */
226
45
  HttpStatusCode[HttpStatusCode["EXPECTATION_FAILED"] = 417] = "EXPECTATION_FAILED";
227
- /**
228
- * This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol,
229
- * and is not expected to be implemented by actual HTTP servers. The RFC specifies this code should be returned by
230
- * teapots requested to brew coffee. This HTTP status is used as an Easter egg in some websites, including Google.com.
231
- */
232
46
  HttpStatusCode[HttpStatusCode["I_AM_A_TEAPOT"] = 418] = "I_AM_A_TEAPOT";
233
- /**
234
- * The request was directed at a server that is not able to produce a response (for example because a connection reuse).
235
- */
236
47
  HttpStatusCode[HttpStatusCode["MISDIRECTED_REQUEST"] = 421] = "MISDIRECTED_REQUEST";
237
- /**
238
- * The request was well-formed but was unable to be followed due to semantic errors.
239
- */
240
48
  HttpStatusCode[HttpStatusCode["UNPROCESSABLE_ENTITY"] = 422] = "UNPROCESSABLE_ENTITY";
241
- /**
242
- * The resource that is being accessed is locked.
243
- */
244
49
  HttpStatusCode[HttpStatusCode["LOCKED"] = 423] = "LOCKED";
245
- /**
246
- * The request failed due to failure of a previous request (e.g., a PROPPATCH).
247
- */
248
50
  HttpStatusCode[HttpStatusCode["FAILED_DEPENDENCY"] = 424] = "FAILED_DEPENDENCY";
249
- /**
250
- * The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field.
251
- */
252
51
  HttpStatusCode[HttpStatusCode["UPGRADE_REQUIRED"] = 426] = "UPGRADE_REQUIRED";
253
- /**
254
- * The origin server requires the request to be conditional.
255
- * Intended to prevent "the 'lost update' problem, where a client
256
- * GETs a resource's state, modifies it, and PUTs it back to the server,
257
- * when meanwhile a third party has modified the state on the server, leading to a conflict."
258
- */
259
52
  HttpStatusCode[HttpStatusCode["PRECONDITION_REQUIRED"] = 428] = "PRECONDITION_REQUIRED";
260
- /**
261
- * The user has sent too many requests in a given amount of time. Intended for use with rate-limiting schemes.
262
- */
263
53
  HttpStatusCode[HttpStatusCode["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
264
- /**
265
- * The server is unwilling to process the request because either an individual header field,
266
- * or all the header fields collectively, are too large.
267
- */
268
54
  HttpStatusCode[HttpStatusCode["REQUEST_HEADER_FIELDS_TOO_LARGE"] = 431] = "REQUEST_HEADER_FIELDS_TOO_LARGE";
269
- /**
270
- * A server operator has received a legal demand to deny access to a resource or to a set of resources
271
- * that includes the requested resource. The code 451 was chosen as a reference to the novel Fahrenheit 451.
272
- */
273
55
  HttpStatusCode[HttpStatusCode["UNAVAILABLE_FOR_LEGAL_REASONS"] = 451] = "UNAVAILABLE_FOR_LEGAL_REASONS";
274
- /**
275
- * A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.
276
- */
277
56
  HttpStatusCode[HttpStatusCode["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
278
- /**
279
- * The server either does not recognize the request method, or it lacks the ability to fulfill the request.
280
- * Usually this implies future availability (e.g., a new feature of a web-service API).
281
- */
282
57
  HttpStatusCode[HttpStatusCode["NOT_IMPLEMENTED"] = 501] = "NOT_IMPLEMENTED";
283
- /**
284
- * The server was acting as a gateway or proxy and received an invalid response from the upstream server.
285
- */
286
58
  HttpStatusCode[HttpStatusCode["BAD_GATEWAY"] = 502] = "BAD_GATEWAY";
287
- /**
288
- * The server is currently unavailable (because it is overloaded or down for maintenance).
289
- * Generally, this is a temporary state.
290
- */
291
59
  HttpStatusCode[HttpStatusCode["SERVICE_UNAVAILABLE"] = 503] = "SERVICE_UNAVAILABLE";
292
- /**
293
- * The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
294
- */
295
60
  HttpStatusCode[HttpStatusCode["GATEWAY_TIMEOUT"] = 504] = "GATEWAY_TIMEOUT";
296
- /**
297
- * The server does not support the HTTP protocol version used in the request
298
- */
299
61
  HttpStatusCode[HttpStatusCode["HTTP_VERSION_NOT_SUPPORTED"] = 505] = "HTTP_VERSION_NOT_SUPPORTED";
300
- /**
301
- * Transparent content negotiation for the request results in a circular reference.
302
- */
303
62
  HttpStatusCode[HttpStatusCode["VARIANT_ALSO_NEGOTIATES"] = 506] = "VARIANT_ALSO_NEGOTIATES";
304
- /**
305
- * The server is unable to store the representation needed to complete the request.
306
- */
307
63
  HttpStatusCode[HttpStatusCode["INSUFFICIENT_STORAGE"] = 507] = "INSUFFICIENT_STORAGE";
308
- /**
309
- * The server detected an infinite loop while processing the request.
310
- */
311
64
  HttpStatusCode[HttpStatusCode["LOOP_DETECTED"] = 508] = "LOOP_DETECTED";
312
- /**
313
- * Further extensions to the request are required for the server to fulfill it.
314
- */
315
65
  HttpStatusCode[HttpStatusCode["NOT_EXTENDED"] = 510] = "NOT_EXTENDED";
316
- /**
317
- * The client needs to authenticate to gain network access.
318
- * Intended for use by intercepting proxies used to control access to the network (e.g., "captive portals" used
319
- * to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot).
320
- */
321
66
  HttpStatusCode[HttpStatusCode["NETWORK_AUTHENTICATION_REQUIRED"] = 511] = "NETWORK_AUTHENTICATION_REQUIRED";
322
67
  })(HttpStatusCode || (exports.HttpStatusCode = HttpStatusCode = {}));
323
- exports.default = HttpStatusCode;
@@ -2,3 +2,4 @@ export * from './httpMethods';
2
2
  export * from './httpStatusCode';
3
3
  export * from './productDocumentTypes';
4
4
  export * from './productFlags';
5
+ export * from './scopeTypes';
@@ -18,3 +18,4 @@ __exportStar(require("./httpMethods"), exports);
18
18
  __exportStar(require("./httpStatusCode"), exports);
19
19
  __exportStar(require("./productDocumentTypes"), exports);
20
20
  __exportStar(require("./productFlags"), exports);
21
+ __exportStar(require("./scopeTypes"), exports);
@@ -1,79 +1,20 @@
1
- /**
2
- * The Product API Flags
3
- */
4
1
  export declare enum ProductApiFlags {
5
- /**
6
- * The no flag status
7
- */
8
2
  None = 1,
9
- /**
10
- * If price is 0 then removes it
11
- */
12
3
  PriceIsNotZero = 2,
13
- /**
14
- * Lists ready items for sale with scope type:
15
- * Commercial, Set, Custom, Combine
16
- */
17
4
  OffTheShelf = 4,
18
- /**
19
- * Combines `PriceIsNotZero` and `OffTheShelf`.
20
- * If price is 0, then removes it, and lists ready items for sale.
21
- */
22
5
  Default = 6,
23
- /**
24
- * The group variations
25
- */
26
6
  GroupVariations = 8,
27
- /**
28
- * Ignore approval
29
- */
30
7
  IgnoreApproval = 16,
31
- /**
32
- * Show products where stock is available
33
- */
34
8
  InStock = 32,
35
- /**
36
- * Show out of stock items
37
- */
38
9
  OutOfStock = 64,
39
- /**
40
- * Gets items with discount rate > 0
41
- */
42
10
  Discounted = 128,
43
- /**
44
- * Check sales quantity
45
- */
46
11
  Sold = 256,
47
- /**
48
- * Service computes stocks from the database
49
- */
50
12
  ComputePhysicalStocks = 512,
51
- /**
52
- * Recomputes the product
53
- */
54
13
  TransientRequest = 1024,
55
- /**
56
- * The just selected culture
57
- */
58
14
  JustSelectedCulture = 2048,
59
- /**
60
- * The just default category
61
- */
62
15
  JustDefaultCategory = 4096,
63
- /**
64
- * The just default image document
65
- */
66
16
  JustDefaultImageDocument = 8192,
67
- /**
68
- * The just default video document
69
- */
70
17
  JustDefaultVideoDocument = 16384,
71
- /**
72
- * Flag to show item on the list page
73
- */
74
18
  IsShowedListPage = 32768,
75
- /**
76
- * Flag to show item on the detail page
77
- */
78
19
  IsShowedDetailPage = 65536
79
20
  }
@@ -1,83 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ProductApiFlags = void 0;
4
- /**
5
- * The Product API Flags
6
- */
7
4
  var ProductApiFlags;
8
5
  (function (ProductApiFlags) {
9
- /**
10
- * The no flag status
11
- */
12
6
  ProductApiFlags[ProductApiFlags["None"] = 1] = "None";
13
- /**
14
- * If price is 0 then removes it
15
- */
16
7
  ProductApiFlags[ProductApiFlags["PriceIsNotZero"] = 2] = "PriceIsNotZero";
17
- /**
18
- * Lists ready items for sale with scope type:
19
- * Commercial, Set, Custom, Combine
20
- */
21
8
  ProductApiFlags[ProductApiFlags["OffTheShelf"] = 4] = "OffTheShelf";
22
- /**
23
- * Combines `PriceIsNotZero` and `OffTheShelf`.
24
- * If price is 0, then removes it, and lists ready items for sale.
25
- */
26
9
  ProductApiFlags[ProductApiFlags["Default"] = 6] = "Default";
27
- /**
28
- * The group variations
29
- */
30
10
  ProductApiFlags[ProductApiFlags["GroupVariations"] = 8] = "GroupVariations";
31
- /**
32
- * Ignore approval
33
- */
34
11
  ProductApiFlags[ProductApiFlags["IgnoreApproval"] = 16] = "IgnoreApproval";
35
- /**
36
- * Show products where stock is available
37
- */
38
12
  ProductApiFlags[ProductApiFlags["InStock"] = 32] = "InStock";
39
- /**
40
- * Show out of stock items
41
- */
42
13
  ProductApiFlags[ProductApiFlags["OutOfStock"] = 64] = "OutOfStock";
43
- /**
44
- * Gets items with discount rate > 0
45
- */
46
14
  ProductApiFlags[ProductApiFlags["Discounted"] = 128] = "Discounted";
47
- /**
48
- * Check sales quantity
49
- */
50
15
  ProductApiFlags[ProductApiFlags["Sold"] = 256] = "Sold";
51
- /**
52
- * Service computes stocks from the database
53
- */
54
16
  ProductApiFlags[ProductApiFlags["ComputePhysicalStocks"] = 512] = "ComputePhysicalStocks";
55
- /**
56
- * Recomputes the product
57
- */
58
17
  ProductApiFlags[ProductApiFlags["TransientRequest"] = 1024] = "TransientRequest";
59
- /**
60
- * The just selected culture
61
- */
62
18
  ProductApiFlags[ProductApiFlags["JustSelectedCulture"] = 2048] = "JustSelectedCulture";
63
- /**
64
- * The just default category
65
- */
66
19
  ProductApiFlags[ProductApiFlags["JustDefaultCategory"] = 4096] = "JustDefaultCategory";
67
- /**
68
- * The just default image document
69
- */
70
20
  ProductApiFlags[ProductApiFlags["JustDefaultImageDocument"] = 8192] = "JustDefaultImageDocument";
71
- /**
72
- * The just default video document
73
- */
74
21
  ProductApiFlags[ProductApiFlags["JustDefaultVideoDocument"] = 16384] = "JustDefaultVideoDocument";
75
- /**
76
- * Flag to show item on the list page
77
- */
78
22
  ProductApiFlags[ProductApiFlags["IsShowedListPage"] = 32768] = "IsShowedListPage";
79
- /**
80
- * Flag to show item on the detail page
81
- */
82
23
  ProductApiFlags[ProductApiFlags["IsShowedDetailPage"] = 65536] = "IsShowedDetailPage";
83
24
  })(ProductApiFlags || (exports.ProductApiFlags = ProductApiFlags = {}));
@@ -0,0 +1,10 @@
1
+ export declare enum ScopeTypes {
2
+ SemiProduct = 1,
3
+ Custom = 2,
4
+ Commercial = 3,
5
+ Group = 4,
6
+ Set = 5,
7
+ List = 6,
8
+ Service = 7,
9
+ Combine = 8
10
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ScopeTypes = void 0;
4
+ var ScopeTypes;
5
+ (function (ScopeTypes) {
6
+ ScopeTypes[ScopeTypes["SemiProduct"] = 1] = "SemiProduct";
7
+ ScopeTypes[ScopeTypes["Custom"] = 2] = "Custom";
8
+ ScopeTypes[ScopeTypes["Commercial"] = 3] = "Commercial";
9
+ ScopeTypes[ScopeTypes["Group"] = 4] = "Group";
10
+ ScopeTypes[ScopeTypes["Set"] = 5] = "Set";
11
+ ScopeTypes[ScopeTypes["List"] = 6] = "List";
12
+ ScopeTypes[ScopeTypes["Service"] = 7] = "Service";
13
+ ScopeTypes[ScopeTypes["Combine"] = 8] = "Combine";
14
+ })(ScopeTypes || (exports.ScopeTypes = ScopeTypes = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextemos",
3
- "version": "3.9.6",
3
+ "version": "3.9.7",
4
4
  "description": "For helpers and hooks used in NextJS projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",