@twin.org/web 0.0.1-next.31 → 0.0.1-next.33

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.
@@ -39,7 +39,36 @@ const HeaderTypes = {
39
39
  /**
40
40
  * Content Type.
41
41
  */
42
- ContentType: "content-type"};
42
+ ContentType: "content-type",
43
+ /**
44
+ * Content Length.
45
+ */
46
+ ContentLength: "content-length",
47
+ /**
48
+ * Content Disposition.
49
+ */
50
+ ContentDisposition: "content-disposition",
51
+ /**
52
+ * Accept.
53
+ */
54
+ Accept: "accept",
55
+ /**
56
+ * Authorization.
57
+ */
58
+ Authorization: "authorization",
59
+ /**
60
+ * Cookie.
61
+ */
62
+ Cookie: "cookie",
63
+ /**
64
+ * Set Cookie.
65
+ */
66
+ SetCookie: "set-cookie",
67
+ /**
68
+ * Location
69
+ */
70
+ Location: "location"
71
+ };
43
72
 
44
73
  // Copyright 2024 IOTA Stiftung.
45
74
  // SPDX-License-Identifier: Apache-2.0.
@@ -66,26 +95,255 @@ const HttpMethod = {
66
95
  */
67
96
  // eslint-disable-next-line @typescript-eslint/naming-convention
68
97
  const HttpStatusCode = {
98
+ /**
99
+ * Continue status code.
100
+ */
101
+ continue: 100,
102
+ /**
103
+ * Switching Protocols status code.
104
+ */
105
+ switchingProtocols: 101,
106
+ /**
107
+ * Processing status code.
108
+ */
109
+ processing: 102,
110
+ /**
111
+ * Early Hints status code.
112
+ */
113
+ earlyHints: 103,
114
+ /**
115
+ * OK status code.
116
+ */
117
+ ok: 200,
118
+ /**
119
+ * Created status code.
120
+ */
121
+ created: 201,
122
+ /**
123
+ * Accepted status code.
124
+ */
125
+ accepted: 202,
126
+ /**
127
+ * Non-Authoritative Information status code.
128
+ */
129
+ nonAuthoritativeInformation: 203,
69
130
  /**
70
131
  * No Content status code.
71
132
  */
72
133
  noContent: 204,
134
+ /**
135
+ * Reset Content status code.
136
+ */
137
+ resetContent: 205,
138
+ /**
139
+ * Partial Content status code.
140
+ */
141
+ partialContent: 206,
142
+ /**
143
+ * Multi-Status status code.
144
+ */
145
+ multiStatus: 207,
146
+ /**
147
+ * Already Reported status code.
148
+ */
149
+ alreadyReported: 208,
150
+ /**
151
+ * IM Used status code.
152
+ */
153
+ imUsed: 226,
154
+ /**
155
+ * Multiple Choices status code.
156
+ */
157
+ multipleChoices: 300,
158
+ /**
159
+ * Moved Permanently status code.
160
+ */
161
+ movedPermanently: 301,
162
+ /**
163
+ * Found status code.
164
+ */
165
+ found: 302,
166
+ /**
167
+ * See Other status code.
168
+ */
169
+ seeOther: 303,
170
+ /**
171
+ * Not Modified status code.
172
+ */
173
+ notModified: 304,
174
+ /**
175
+ * Use Proxy status code.
176
+ */
177
+ useProxy: 305,
178
+ /**
179
+ * Temporary Redirect status code.
180
+ */
181
+ temporaryRedirect: 307,
182
+ /**
183
+ * Permanent Redirect status code.
184
+ */
185
+ permanentRedirect: 308,
73
186
  /**
74
187
  * Bad Request status code.
75
188
  */
76
189
  badRequest: 400,
190
+ /**
191
+ * Unauthorized status code.
192
+ */
193
+ unauthorized: 401,
194
+ /**
195
+ * Payment Required status code.
196
+ */
197
+ paymentRequired: 402,
198
+ /**
199
+ * Forbidden status code.
200
+ */
201
+ forbidden: 403,
202
+ /**
203
+ * Not Found status code.
204
+ */
205
+ notFound: 404,
206
+ /**
207
+ * Method Not Allowed status code.
208
+ */
209
+ methodNotAllowed: 405,
210
+ /**
211
+ * Not Acceptable status code.
212
+ */
213
+ notAcceptable: 406,
214
+ /**
215
+ * Proxy Authentication Required status code.
216
+ */
217
+ proxyAuthenticationRequired: 407,
77
218
  /**
78
219
  * Request Timeout status code.
79
220
  */
80
221
  requestTimeout: 408,
222
+ /**
223
+ * Conflict status code.
224
+ */
225
+ conflict: 409,
226
+ /**
227
+ * Gone status code.
228
+ */
229
+ gone: 410,
230
+ /**
231
+ * Length Required status code.
232
+ */
233
+ lengthRequired: 411,
234
+ /**
235
+ * Precondition Failed status code.
236
+ */
237
+ preconditionFailed: 412,
238
+ /**
239
+ * Payload Too Large status code.
240
+ */
241
+ payloadTooLarge: 413,
242
+ /**
243
+ * URI Too Long status code.
244
+ */
245
+ uriTooLong: 414,
246
+ /**
247
+ * Unsupported Media Type status code.
248
+ */
249
+ unsupportedMediaType: 415,
250
+ /**
251
+ * Range Not Satisfiable status code.
252
+ */
253
+ rangeNotSatisfiable: 416,
254
+ /**
255
+ * Expectation Failed status code.
256
+ */
257
+ expectationFailed: 417,
258
+ /**
259
+ * I'm a Teapot status code.
260
+ */
261
+ imATeapot: 418,
262
+ /**
263
+ * Misdirected Request status code.
264
+ */
265
+ misdirectedRequest: 421,
266
+ /**
267
+ * Unprocessable Entity status code.
268
+ */
269
+ unprocessableEntity: 422,
270
+ /**
271
+ * Locked status code.
272
+ */
273
+ locked: 423,
274
+ /**
275
+ * Failed Dependency status code.
276
+ */
277
+ failedDependency: 424,
278
+ /**
279
+ * Too Early status code.
280
+ */
281
+ tooEarly: 425,
282
+ /**
283
+ * Upgrade Required status code.
284
+ */
285
+ upgradeRequired: 426,
286
+ /**
287
+ * Precondition Required status code.
288
+ */
289
+ preconditionRequired: 428,
290
+ /**
291
+ * Too Many Requests status code.
292
+ */
293
+ tooManyRequests: 429,
294
+ /**
295
+ * Request Header Fields Too Large status code.
296
+ */
297
+ requestHeaderFieldsTooLarge: 431,
298
+ /**
299
+ * Unavailable For Legal Reasons status code.
300
+ */
301
+ unavailableForLegalReasons: 451,
81
302
  /**
82
303
  * Internal Server Error status code.
83
304
  */
84
305
  internalServerError: 500,
306
+ /**
307
+ * Not Implemented status code.
308
+ */
309
+ notImplemented: 501,
310
+ /**
311
+ * Bad Gateway status code.
312
+ */
313
+ badGateway: 502,
85
314
  /**
86
315
  * Service Unavailable status code.
87
316
  */
88
- serviceUnavailable: 503};
317
+ serviceUnavailable: 503,
318
+ /**
319
+ * Gateway Timeout status code.
320
+ */
321
+ gatewayTimeout: 504,
322
+ /**
323
+ * HTTP Version Not Supported status code.
324
+ */
325
+ httpVersionNotSupported: 505,
326
+ /**
327
+ * Variant Also Negotiates status code.
328
+ */
329
+ variantAlsoNegotiates: 506,
330
+ /**
331
+ * Insufficient Storage status code.
332
+ */
333
+ insufficientStorage: 507,
334
+ /**
335
+ * Loop Detected status code.
336
+ */
337
+ loopDetected: 508,
338
+ /**
339
+ * Not Extended status code.
340
+ */
341
+ notExtended: 510,
342
+ /**
343
+ * Network Authentication Required status code.
344
+ */
345
+ networkAuthenticationRequired: 511
346
+ };
89
347
 
90
348
  // Copyright 2024 IOTA Stiftung.
91
349
  // SPDX-License-Identifier: Apache-2.0.
@@ -37,7 +37,36 @@ const HeaderTypes = {
37
37
  /**
38
38
  * Content Type.
39
39
  */
40
- ContentType: "content-type"};
40
+ ContentType: "content-type",
41
+ /**
42
+ * Content Length.
43
+ */
44
+ ContentLength: "content-length",
45
+ /**
46
+ * Content Disposition.
47
+ */
48
+ ContentDisposition: "content-disposition",
49
+ /**
50
+ * Accept.
51
+ */
52
+ Accept: "accept",
53
+ /**
54
+ * Authorization.
55
+ */
56
+ Authorization: "authorization",
57
+ /**
58
+ * Cookie.
59
+ */
60
+ Cookie: "cookie",
61
+ /**
62
+ * Set Cookie.
63
+ */
64
+ SetCookie: "set-cookie",
65
+ /**
66
+ * Location
67
+ */
68
+ Location: "location"
69
+ };
41
70
 
42
71
  // Copyright 2024 IOTA Stiftung.
43
72
  // SPDX-License-Identifier: Apache-2.0.
@@ -64,26 +93,255 @@ const HttpMethod = {
64
93
  */
65
94
  // eslint-disable-next-line @typescript-eslint/naming-convention
66
95
  const HttpStatusCode = {
96
+ /**
97
+ * Continue status code.
98
+ */
99
+ continue: 100,
100
+ /**
101
+ * Switching Protocols status code.
102
+ */
103
+ switchingProtocols: 101,
104
+ /**
105
+ * Processing status code.
106
+ */
107
+ processing: 102,
108
+ /**
109
+ * Early Hints status code.
110
+ */
111
+ earlyHints: 103,
112
+ /**
113
+ * OK status code.
114
+ */
115
+ ok: 200,
116
+ /**
117
+ * Created status code.
118
+ */
119
+ created: 201,
120
+ /**
121
+ * Accepted status code.
122
+ */
123
+ accepted: 202,
124
+ /**
125
+ * Non-Authoritative Information status code.
126
+ */
127
+ nonAuthoritativeInformation: 203,
67
128
  /**
68
129
  * No Content status code.
69
130
  */
70
131
  noContent: 204,
132
+ /**
133
+ * Reset Content status code.
134
+ */
135
+ resetContent: 205,
136
+ /**
137
+ * Partial Content status code.
138
+ */
139
+ partialContent: 206,
140
+ /**
141
+ * Multi-Status status code.
142
+ */
143
+ multiStatus: 207,
144
+ /**
145
+ * Already Reported status code.
146
+ */
147
+ alreadyReported: 208,
148
+ /**
149
+ * IM Used status code.
150
+ */
151
+ imUsed: 226,
152
+ /**
153
+ * Multiple Choices status code.
154
+ */
155
+ multipleChoices: 300,
156
+ /**
157
+ * Moved Permanently status code.
158
+ */
159
+ movedPermanently: 301,
160
+ /**
161
+ * Found status code.
162
+ */
163
+ found: 302,
164
+ /**
165
+ * See Other status code.
166
+ */
167
+ seeOther: 303,
168
+ /**
169
+ * Not Modified status code.
170
+ */
171
+ notModified: 304,
172
+ /**
173
+ * Use Proxy status code.
174
+ */
175
+ useProxy: 305,
176
+ /**
177
+ * Temporary Redirect status code.
178
+ */
179
+ temporaryRedirect: 307,
180
+ /**
181
+ * Permanent Redirect status code.
182
+ */
183
+ permanentRedirect: 308,
71
184
  /**
72
185
  * Bad Request status code.
73
186
  */
74
187
  badRequest: 400,
188
+ /**
189
+ * Unauthorized status code.
190
+ */
191
+ unauthorized: 401,
192
+ /**
193
+ * Payment Required status code.
194
+ */
195
+ paymentRequired: 402,
196
+ /**
197
+ * Forbidden status code.
198
+ */
199
+ forbidden: 403,
200
+ /**
201
+ * Not Found status code.
202
+ */
203
+ notFound: 404,
204
+ /**
205
+ * Method Not Allowed status code.
206
+ */
207
+ methodNotAllowed: 405,
208
+ /**
209
+ * Not Acceptable status code.
210
+ */
211
+ notAcceptable: 406,
212
+ /**
213
+ * Proxy Authentication Required status code.
214
+ */
215
+ proxyAuthenticationRequired: 407,
75
216
  /**
76
217
  * Request Timeout status code.
77
218
  */
78
219
  requestTimeout: 408,
220
+ /**
221
+ * Conflict status code.
222
+ */
223
+ conflict: 409,
224
+ /**
225
+ * Gone status code.
226
+ */
227
+ gone: 410,
228
+ /**
229
+ * Length Required status code.
230
+ */
231
+ lengthRequired: 411,
232
+ /**
233
+ * Precondition Failed status code.
234
+ */
235
+ preconditionFailed: 412,
236
+ /**
237
+ * Payload Too Large status code.
238
+ */
239
+ payloadTooLarge: 413,
240
+ /**
241
+ * URI Too Long status code.
242
+ */
243
+ uriTooLong: 414,
244
+ /**
245
+ * Unsupported Media Type status code.
246
+ */
247
+ unsupportedMediaType: 415,
248
+ /**
249
+ * Range Not Satisfiable status code.
250
+ */
251
+ rangeNotSatisfiable: 416,
252
+ /**
253
+ * Expectation Failed status code.
254
+ */
255
+ expectationFailed: 417,
256
+ /**
257
+ * I'm a Teapot status code.
258
+ */
259
+ imATeapot: 418,
260
+ /**
261
+ * Misdirected Request status code.
262
+ */
263
+ misdirectedRequest: 421,
264
+ /**
265
+ * Unprocessable Entity status code.
266
+ */
267
+ unprocessableEntity: 422,
268
+ /**
269
+ * Locked status code.
270
+ */
271
+ locked: 423,
272
+ /**
273
+ * Failed Dependency status code.
274
+ */
275
+ failedDependency: 424,
276
+ /**
277
+ * Too Early status code.
278
+ */
279
+ tooEarly: 425,
280
+ /**
281
+ * Upgrade Required status code.
282
+ */
283
+ upgradeRequired: 426,
284
+ /**
285
+ * Precondition Required status code.
286
+ */
287
+ preconditionRequired: 428,
288
+ /**
289
+ * Too Many Requests status code.
290
+ */
291
+ tooManyRequests: 429,
292
+ /**
293
+ * Request Header Fields Too Large status code.
294
+ */
295
+ requestHeaderFieldsTooLarge: 431,
296
+ /**
297
+ * Unavailable For Legal Reasons status code.
298
+ */
299
+ unavailableForLegalReasons: 451,
79
300
  /**
80
301
  * Internal Server Error status code.
81
302
  */
82
303
  internalServerError: 500,
304
+ /**
305
+ * Not Implemented status code.
306
+ */
307
+ notImplemented: 501,
308
+ /**
309
+ * Bad Gateway status code.
310
+ */
311
+ badGateway: 502,
83
312
  /**
84
313
  * Service Unavailable status code.
85
314
  */
86
- serviceUnavailable: 503};
315
+ serviceUnavailable: 503,
316
+ /**
317
+ * Gateway Timeout status code.
318
+ */
319
+ gatewayTimeout: 504,
320
+ /**
321
+ * HTTP Version Not Supported status code.
322
+ */
323
+ httpVersionNotSupported: 505,
324
+ /**
325
+ * Variant Also Negotiates status code.
326
+ */
327
+ variantAlsoNegotiates: 506,
328
+ /**
329
+ * Insufficient Storage status code.
330
+ */
331
+ insufficientStorage: 507,
332
+ /**
333
+ * Loop Detected status code.
334
+ */
335
+ loopDetected: 508,
336
+ /**
337
+ * Not Extended status code.
338
+ */
339
+ notExtended: 510,
340
+ /**
341
+ * Network Authentication Required status code.
342
+ */
343
+ networkAuthenticationRequired: 511
344
+ };
87
345
 
88
346
  // Copyright 2024 IOTA Stiftung.
89
347
  // SPDX-License-Identifier: Apache-2.0.
package/docs/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @twin.org/web - Changelog
2
2
 
3
- ## 0.0.1-next.31
3
+ ## 0.0.1-next.33
4
4
 
5
5
  - Initial Release
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/web",
3
- "version": "0.0.1-next.31",
3
+ "version": "0.0.1-next.33",
4
4
  "description": "Contains classes for use with web operations",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,8 +14,8 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/core": "0.0.1-next.31",
18
- "@twin.org/crypto": "0.0.1-next.31",
17
+ "@twin.org/core": "0.0.1-next.33",
18
+ "@twin.org/crypto": "0.0.1-next.33",
19
19
  "@twin.org/nameof": "next"
20
20
  },
21
21
  "main": "./dist/cjs/index.cjs",