angular-toolbox 1.3.3 → 1.4.0
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.
- package/README.md +1 -1
- package/esm2022/lib/framework/mock/http/util/http-mock-response.builder.mjs +5 -17
- package/esm2022/lib/framework/mock/http/util/http-status-text-finder.mjs +146 -0
- package/esm2022/lib/framework/mock/http/util/http-status-text.enum.mjs +260 -0
- package/esm2022/lib/framework/mock/http/util/index.mjs +3 -1
- package/esm2022/lib/model/service/version/angular-toolbox-version.service.mjs +4 -4
- package/fesm2022/angular-toolbox.mjs +407 -17
- package/fesm2022/angular-toolbox.mjs.map +1 -1
- package/lib/framework/mock/http/util/http-mock-response.builder.d.ts +0 -8
- package/lib/framework/mock/http/util/http-status-text-finder.d.ts +23 -0
- package/lib/framework/mock/http/util/http-status-text.enum.d.ts +252 -0
- package/lib/framework/mock/http/util/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -46,14 +46,6 @@ export declare class HttpResponseMockBuilder {
|
|
|
46
46
|
* @returns A reference to this `HttpResponseMockBuilder` instance.
|
|
47
47
|
*/
|
|
48
48
|
status(status: number): HttpResponseMockBuilder;
|
|
49
|
-
/**
|
|
50
|
-
* Sets the `statusText` property of the new `HttpResponseMock` instance with the specified `statusText` value.
|
|
51
|
-
*
|
|
52
|
-
* @param statusText The value used to set the `statusText` property of the new `HttpResponseMock` instance.
|
|
53
|
-
*
|
|
54
|
-
* @returns A reference to this `HttpResponseMockBuilder` instance.
|
|
55
|
-
*/
|
|
56
|
-
statusText(statusText: string): HttpResponseMockBuilder;
|
|
57
49
|
/**
|
|
58
50
|
* Sets the `url` property of the new `HttpResponseMock` instance with the specified `url` value.
|
|
59
51
|
*
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
|
+
*/
|
|
8
|
+
import { HttpStatusCode } from "@angular/common/http";
|
|
9
|
+
import { HttpStatusText } from "./http-status-text.enum";
|
|
10
|
+
/**
|
|
11
|
+
* @private
|
|
12
|
+
* A utility class that helps to retreive a status text depending on its status code.
|
|
13
|
+
*/
|
|
14
|
+
export declare class HttpStatusTextFinder {
|
|
15
|
+
/**
|
|
16
|
+
* @private
|
|
17
|
+
* Retreives and return a status text depending on its status code.
|
|
18
|
+
*
|
|
19
|
+
* @param code The status code for which to find the status text.
|
|
20
|
+
* @returns A `HttpStatusText` constant.
|
|
21
|
+
*/
|
|
22
|
+
static getStatusText(code: HttpStatusCode): HttpStatusText;
|
|
23
|
+
}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* The list of all HTTP status text.
|
|
10
|
+
*/
|
|
11
|
+
export declare enum HttpStatusText {
|
|
12
|
+
/**
|
|
13
|
+
* The status text associated with the status code `100`.
|
|
14
|
+
*/
|
|
15
|
+
CONTINUE = "Continue",
|
|
16
|
+
/**
|
|
17
|
+
* The status text associated with the status code `101`.
|
|
18
|
+
*/
|
|
19
|
+
SWITCHING_PROTOCOLS = "Switching Protocols",
|
|
20
|
+
/**
|
|
21
|
+
* The status text associated with the status code `102`.
|
|
22
|
+
*/
|
|
23
|
+
PROCESSING = "Processing",
|
|
24
|
+
/**
|
|
25
|
+
* The status text associated with the status code `103`.
|
|
26
|
+
*/
|
|
27
|
+
EARLY_HINTS = "Early Hints",
|
|
28
|
+
/**
|
|
29
|
+
* The status text associated with the status code `200`.
|
|
30
|
+
*/
|
|
31
|
+
OK = "OK",
|
|
32
|
+
/**
|
|
33
|
+
* The status text associated with the status code `201`.
|
|
34
|
+
*/
|
|
35
|
+
CREATED = "Created",
|
|
36
|
+
/**
|
|
37
|
+
* The status text associated with the status code `202`.
|
|
38
|
+
*/
|
|
39
|
+
ACCEPTED = "Accepted",
|
|
40
|
+
/**
|
|
41
|
+
* The status text associated with the status code `203`.
|
|
42
|
+
*/
|
|
43
|
+
NON_AUTHORITATIVE_INFORMATION = "Non-authoritative Information",
|
|
44
|
+
/**
|
|
45
|
+
* The status text associated with the status code `204`.
|
|
46
|
+
*/
|
|
47
|
+
NO_CONTENT = "No Content",
|
|
48
|
+
/**
|
|
49
|
+
* The status text associated with the status code `205`.
|
|
50
|
+
*/
|
|
51
|
+
RESET_CONTENT = "Reset Content",
|
|
52
|
+
/**
|
|
53
|
+
* The status text associated with the status code `206`.
|
|
54
|
+
*/
|
|
55
|
+
PARTIAL_CONTENT = "Partial Content",
|
|
56
|
+
/**
|
|
57
|
+
* The status text associated with the status code `207`.
|
|
58
|
+
*/
|
|
59
|
+
MULTI_STATUS = "Multi-Status",
|
|
60
|
+
/**
|
|
61
|
+
* The status text associated with the status code `208`.
|
|
62
|
+
*/
|
|
63
|
+
ALREADY_REPORTED = "Already Reported",
|
|
64
|
+
/**
|
|
65
|
+
* The status text associated with the status code `226`.
|
|
66
|
+
*/
|
|
67
|
+
IM_USED = "IM Used",
|
|
68
|
+
/**
|
|
69
|
+
* The status text associated with the status code `300`.
|
|
70
|
+
*/
|
|
71
|
+
MULTIPLE_CHOICES = "Multiple Choices",
|
|
72
|
+
/**
|
|
73
|
+
* The status text associated with the status code `301`.
|
|
74
|
+
*/
|
|
75
|
+
MOVED_PERMANENTLY = "Moved Permanently",
|
|
76
|
+
/**
|
|
77
|
+
* The status text associated with the status code `302`.
|
|
78
|
+
*/
|
|
79
|
+
FOUND = "Found",
|
|
80
|
+
/**
|
|
81
|
+
* The status text associated with the status code `303`.
|
|
82
|
+
*/
|
|
83
|
+
SEE_OTHER = "See Other",
|
|
84
|
+
/**
|
|
85
|
+
* The status text associated with the status code `304`.
|
|
86
|
+
*/
|
|
87
|
+
NOT_MODIFIED = "Not Modified",
|
|
88
|
+
/**
|
|
89
|
+
* The status text associated with the status code `307`.
|
|
90
|
+
*/
|
|
91
|
+
TEMPORARY_REDIRECT = "Temporary Redirect",
|
|
92
|
+
/**
|
|
93
|
+
* The status text associated with the status code `308`.
|
|
94
|
+
*/
|
|
95
|
+
PERMANENT_REDIRECT = "Permanent Redirect",
|
|
96
|
+
/**
|
|
97
|
+
* The status text associated with the status code `400`.
|
|
98
|
+
*/
|
|
99
|
+
BAD_REQUEST = "Bad Request",
|
|
100
|
+
/**
|
|
101
|
+
* The status text associated with the status code `401`.
|
|
102
|
+
*/
|
|
103
|
+
UNAUTHORIZED = "Unauthorized",
|
|
104
|
+
/**
|
|
105
|
+
* The status text associated with the status code `402`.
|
|
106
|
+
*/
|
|
107
|
+
PAYMENT_REQUIRED = "Payment Required",
|
|
108
|
+
/**
|
|
109
|
+
* The status text associated with the status code `403`.
|
|
110
|
+
*/
|
|
111
|
+
FORBIDDEN = "Forbidden",
|
|
112
|
+
/**
|
|
113
|
+
* The status text associated with the status code `404`.
|
|
114
|
+
*/
|
|
115
|
+
NOT_FOUND = "Not Found",
|
|
116
|
+
/**
|
|
117
|
+
* The status text associated with the status code `405`.
|
|
118
|
+
*/
|
|
119
|
+
METHOD_NOT_ALLOWED = "Method Not Allowed",
|
|
120
|
+
/**
|
|
121
|
+
* The status text associated with the status code `406`.
|
|
122
|
+
*/
|
|
123
|
+
NOT_ACCEPTABLE = "Not Acceptable",
|
|
124
|
+
/**
|
|
125
|
+
* The status text associated with the status code `407`.
|
|
126
|
+
*/
|
|
127
|
+
PROXY_AUTHENTICATION_REQUIRED = "Proxy Authentication Required",
|
|
128
|
+
/**
|
|
129
|
+
* The status text associated with the status code `408`.
|
|
130
|
+
*/
|
|
131
|
+
REQUEST_TIMEOUT = "Request Timeout",
|
|
132
|
+
/**
|
|
133
|
+
* The status text associated with the status code `409`.
|
|
134
|
+
*/
|
|
135
|
+
CONFLICT = "Conflict",
|
|
136
|
+
/**
|
|
137
|
+
* The status text associated with the status code `410`.
|
|
138
|
+
*/
|
|
139
|
+
GONE = "Gone",
|
|
140
|
+
/**
|
|
141
|
+
* The status text associated with the status code `411`.
|
|
142
|
+
*/
|
|
143
|
+
LENGTH_REQUIRED = "Length Required",
|
|
144
|
+
/**
|
|
145
|
+
* The status text associated with the status code `412`.
|
|
146
|
+
*/
|
|
147
|
+
PRECONDITION_FAILED = "Precondition Failed",
|
|
148
|
+
/**
|
|
149
|
+
* The status text associated with the status code `413`.
|
|
150
|
+
*/
|
|
151
|
+
PAYLOAD_TOO_LARGE = "Payload Too Large",
|
|
152
|
+
/**
|
|
153
|
+
* The status text associated with the status code `414`.
|
|
154
|
+
*/
|
|
155
|
+
URI_TOO_LONG = "URI Too Long",
|
|
156
|
+
/**
|
|
157
|
+
* The status text associated with the status code `415`.
|
|
158
|
+
*/
|
|
159
|
+
UNSUPPORTED_MEDIA_TYPE = "Unsupported Media Type",
|
|
160
|
+
/**
|
|
161
|
+
* The status text associated with the status code `416`.
|
|
162
|
+
*/
|
|
163
|
+
RANGE_NOT_SATISFIABLE = "Range Not Satisfiable",
|
|
164
|
+
/**
|
|
165
|
+
* The status text associated with the status code `417`.
|
|
166
|
+
*/
|
|
167
|
+
EXPECTATION_FAILED = "Expectation Failed",
|
|
168
|
+
/**
|
|
169
|
+
* The status text associated with the status code `418`.
|
|
170
|
+
*/
|
|
171
|
+
I_M_A_TEAPOT = "I'm a teapot",
|
|
172
|
+
/**
|
|
173
|
+
* The status text associated with the status code `421`.
|
|
174
|
+
*/
|
|
175
|
+
MISDIRECTED_REQUEST = "Misdirected Request",
|
|
176
|
+
/**
|
|
177
|
+
* The status text associated with the status code `422`.
|
|
178
|
+
*/
|
|
179
|
+
UNPROCESSABLE_ENTITY = "Unprocessable Entity",
|
|
180
|
+
/**
|
|
181
|
+
* The status text associated with the status code `423`.
|
|
182
|
+
*/
|
|
183
|
+
LOCKED = "Locked",
|
|
184
|
+
/**
|
|
185
|
+
* The status text associated with the status code `424`.
|
|
186
|
+
*/
|
|
187
|
+
FAILED_DEPENDENCY = "Failed Dependency",
|
|
188
|
+
/**
|
|
189
|
+
* The status text associated with the status code `426`.
|
|
190
|
+
*/
|
|
191
|
+
UPGRADE_REQUIRED = "Upgrade Required",
|
|
192
|
+
/**
|
|
193
|
+
* The status text associated with the status code `428`.
|
|
194
|
+
*/
|
|
195
|
+
PRECONDITION_REQUIRED = "Precondition Required",
|
|
196
|
+
/**
|
|
197
|
+
* The status text associated with the status code `429`.
|
|
198
|
+
*/
|
|
199
|
+
TOO_MANY_REQUESTS = "Too Many Requests",
|
|
200
|
+
/**
|
|
201
|
+
* The status text associated with the status code `431`.
|
|
202
|
+
*/
|
|
203
|
+
REQUEST_HEADER_FIELDS_TOO_LARGE = "Request Header Fields Too Large",
|
|
204
|
+
/**
|
|
205
|
+
* The status text associated with the status code `451`.
|
|
206
|
+
*/
|
|
207
|
+
UNAVAILABLE_FOR_LEGAL_REASONS = "Unavailable For Legal Reasons",
|
|
208
|
+
/**
|
|
209
|
+
* The status text associated with the status code `500`.
|
|
210
|
+
*/
|
|
211
|
+
INTERNAL_SERVER_ERROR = "Internal Server Error",
|
|
212
|
+
/**
|
|
213
|
+
* The status text associated with the status code `501`.
|
|
214
|
+
*/
|
|
215
|
+
NOT_IMPLEMENTED = "Not Implemented",
|
|
216
|
+
/**
|
|
217
|
+
* The status text associated with the status code `502`.
|
|
218
|
+
*/
|
|
219
|
+
BAD_GATEWAY = "Bad Gateway",
|
|
220
|
+
/**
|
|
221
|
+
* The status text associated with the status code `503`.
|
|
222
|
+
*/
|
|
223
|
+
SERVICE_UNAVAILABLE = "Service Unavailable",
|
|
224
|
+
/**
|
|
225
|
+
* The status text associated with the status code `504`.
|
|
226
|
+
*/
|
|
227
|
+
GATEWAY_TIMEOUT = "Gateway Timeout",
|
|
228
|
+
/**
|
|
229
|
+
* The status text associated with the status code `505`.
|
|
230
|
+
*/
|
|
231
|
+
HTTP_VERSION_NOT_SUPPORTED = "HTTP Version Not Supported",
|
|
232
|
+
/**
|
|
233
|
+
* The status text associated with the status code `506`.
|
|
234
|
+
*/
|
|
235
|
+
VARIANT_ALSO_NEGOTIATES = "Variant Also Negotiates",
|
|
236
|
+
/**
|
|
237
|
+
* The status text associated with the status code `507`.
|
|
238
|
+
*/
|
|
239
|
+
INSUFFICIENT_STORAGE = "Insufficient Storage",
|
|
240
|
+
/**
|
|
241
|
+
* The status text associated with the status code `508`.
|
|
242
|
+
*/
|
|
243
|
+
LOOP_DETECTED = "Loop Detected",
|
|
244
|
+
/**
|
|
245
|
+
* The status text associated with the status code `510`.
|
|
246
|
+
*/
|
|
247
|
+
NOT_EXTENDED = "Not Extended",
|
|
248
|
+
/**
|
|
249
|
+
* The status text associated with the status code `511`.
|
|
250
|
+
*/
|
|
251
|
+
NETWORK_AUTHENTICATION_REQUIRED = "Network Authentication Required"
|
|
252
|
+
}
|