@everyonesoftware/common 10.0.0 → 12.0.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.
@@ -1,5 +1,5 @@
1
- import { C as CharacterWriteStream, A as AsyncResult, I as Iterable, f as JavascriptIterable, S as SyncResult, c as Iterator, E as EqualFunctions, T as ToStringFunctions, k as Type, g as JavascriptIterator, e as JavascriptAsyncIterator, P as PromiseAsyncResult, a as Comparable, h as JavascriptIteratorResult, b as Comparison, d as JavascriptAsyncIterable } from './characterWriteStream-ogvZec-U.cjs';
2
- export { J as JavascriptArray, i as JavascriptMap, j as JavascriptSet, l as as, m as asArray, n as asBoolean, o as asFunction, p as asFunctionWithParameterCount, q as asNull, r as asNumber, s as asObject, t as asObjectOrArrayOrNull, u as asString, v as getName, w as getParameterCount, x as getPropertyNames, y as hasFunction, z as hasProperty, B as instanceOf, D as instanceOfType, F as isArray, G as isAsyncIterable, H as isBoolean, K as isFunction, L as isFunctionWithParameterCount, M as isIterable, N as isJavascriptAsyncIterable, O as isJavascriptAsyncIterator, Q as isJavascriptIterable, R as isJavascriptIterator, U as isNull, V as isNumber, W as isObject, X as isObjectOrArrayOrNull, Y as isPromise, Z as isPromiseLike, _ as isString, $ as isUndefined, a0 as isUndefinedOrNull } from './characterWriteStream-ogvZec-U.cjs';
1
+ import { I as Iterable, g as JavascriptIterable, S as SyncResult, d as Iterator, E as EqualFunctions, T as ToStringFunctions, l as Type, h as JavascriptIterator, C as CharacterWriteStream, A as AsyncResult, a as Clock, D as DateTime, f as JavascriptAsyncIterator, P as PromiseAsyncResult, b as Comparable, i as JavascriptIteratorResult, c as Comparison, e as JavascriptAsyncIterable } from './characterWriteStream-CzPcNOCD.cjs';
2
+ export { J as JavascriptArray, j as JavascriptMap, k as JavascriptSet, m as as, n as asArray, o as asBoolean, p as asFunction, q as asFunctionWithParameterCount, r as asNull, s as asNumber, t as asObject, u as asObjectOrArrayOrNull, v as asString, w as getName, x as getParameterCount, y as getPropertyNames, z as hasFunction, B as hasProperty, F as instanceOf, G as instanceOfType, H as isArray, K as isAsyncIterable, L as isBoolean, M as isFunction, N as isFunctionWithParameterCount, O as isIterable, Q as isIterator, R as isJavascriptAsyncIterable, U as isJavascriptAsyncIterator, V as isJavascriptIterable, W as isJavascriptIterator, X as isNull, Y as isNumber, Z as isObject, _ as isObjectOrArrayOrNull, $ as isPromise, a0 as isPromiseLike, a1 as isString, a2 as isUndefined, a3 as isUndefinedOrNull } from './characterWriteStream-CzPcNOCD.cjs';
3
3
  import * as http from 'http';
4
4
 
5
5
  declare class ANSIStyles {
@@ -12,30 +12,6 @@ declare class ANSIStyles {
12
12
  static blue(text: string): string;
13
13
  }
14
14
 
15
- declare class CharacterTable {
16
- private constructor();
17
- static create(): CharacterTable;
18
- }
19
-
20
- declare class IndentedCharacterWriteStream extends CharacterWriteStream {
21
- private readonly innerStream;
22
- private currentIndentationList;
23
- private currentIndentation;
24
- private singleIndent;
25
- private atLineStart;
26
- private constructor();
27
- static create(innerStream: CharacterWriteStream): IndentedCharacterWriteStream;
28
- getSingleIndent(): string;
29
- setSingleIndent(singleIndent: string): this;
30
- getCurrentIndentationCount(): number;
31
- getCurrentIndentation(): string;
32
- addIndentation(singleIndent?: string): this;
33
- removeIndentation(): string;
34
- indent(action: () => (void | number | PromiseLike<void | number>)): AsyncResult<number>;
35
- indent(singleIndent: string, action: () => (void | number | PromiseLike<void | number>)): AsyncResult<number>;
36
- writeString(text: string): AsyncResult<number>;
37
- }
38
-
39
15
  /**
40
16
  * A container that can be accessed using indexes.
41
17
  */
@@ -80,6 +56,41 @@ declare abstract class Indexable<T> implements Iterable<T> {
80
56
  static contains<T>(indexable: Indexable<T>, value: T, equalFunctions?: EqualFunctions): SyncResult<boolean>;
81
57
  }
82
58
 
59
+ declare class CharacterTable {
60
+ private readonly rows;
61
+ private constructor();
62
+ static create(): CharacterTable;
63
+ addRow(row: JavascriptIterable<string>): this;
64
+ addRows(rows: JavascriptIterable<JavascriptIterable<string>>): this;
65
+ getRows(): Indexable<Indexable<string>>;
66
+ }
67
+
68
+ declare class FetchError extends Error {
69
+ private readonly innerError;
70
+ constructor(innerError: Error);
71
+ get code(): string | undefined;
72
+ get hostname(): string | undefined;
73
+ }
74
+
75
+ declare class IndentedCharacterWriteStream extends CharacterWriteStream {
76
+ private readonly innerStream;
77
+ private currentIndentationList;
78
+ private currentIndentation;
79
+ private singleIndent;
80
+ private atLineStart;
81
+ private constructor();
82
+ static create(innerStream: CharacterWriteStream): IndentedCharacterWriteStream;
83
+ getSingleIndent(): string;
84
+ setSingleIndent(singleIndent: string): this;
85
+ getCurrentIndentationCount(): number;
86
+ getCurrentIndentation(): string;
87
+ addIndentation(singleIndent?: string): this;
88
+ removeIndentation(): string;
89
+ indent(action: () => (void | number | PromiseLike<void | number>)): AsyncResult<number>;
90
+ indent(singleIndent: string, action: () => (void | number | PromiseLike<void | number>)): AsyncResult<number>;
91
+ writeString(text: string): AsyncResult<number>;
92
+ }
93
+
83
94
  /**
84
95
  * An {@link Indexable} that can change it's values.
85
96
  */
@@ -123,6 +134,261 @@ declare abstract class MutableIndexable<T> implements Indexable<T> {
123
134
  static contains<T>(indexable: Indexable<T>, value: T, equalFunctions?: EqualFunctions): SyncResult<boolean>;
124
135
  }
125
136
 
137
+ declare class HttpHeader {
138
+ private readonly name;
139
+ private readonly value;
140
+ private constructor();
141
+ static create(name: string, value: string): HttpHeader;
142
+ getName(): string;
143
+ getValue(): string;
144
+ toString(): string;
145
+ }
146
+
147
+ declare class MutableHttpHeaders implements HttpHeaders {
148
+ private readonly headers;
149
+ private constructor();
150
+ static create(headers?: JavascriptIterable<HttpHeader>): MutableHttpHeaders;
151
+ iterate(): Iterator<HttpHeader>;
152
+ get(headerName: string): SyncResult<HttpHeader>;
153
+ getValue(headerName: string): SyncResult<string>;
154
+ /**
155
+ * Set a {@link HttpHeader} value in this collection. This will overwrite any existing
156
+ * {@link HttpHeader} with the same name.
157
+ * @param headerName The name of the header to set.
158
+ * @param headerValue The value of the header to set.
159
+ */
160
+ set(headerName: string, headerValue: string): this;
161
+ set(header: HttpHeader): this;
162
+ setAll(headers: JavascriptIterable<HttpHeader>): this;
163
+ setContentType(contentType: string): this;
164
+ getContentType(): SyncResult<HttpHeader>;
165
+ getContentTypeValue(): SyncResult<string>;
166
+ getCount(): SyncResult<number>;
167
+ toArray(): SyncResult<HttpHeader[]>;
168
+ any(): SyncResult<boolean>;
169
+ equals(right: JavascriptIterable<HttpHeader>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
170
+ toString(toStringFunctions?: ToStringFunctions): string;
171
+ concatenate(...toConcatenate: JavascriptIterable<HttpHeader>[]): Iterable<HttpHeader>;
172
+ map<TOutput>(mapping: (value: HttpHeader) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
173
+ flatMap<TOutput>(mapping: (value: HttpHeader) => JavascriptIterable<TOutput>): Iterable<TOutput>;
174
+ where(condition: (value: HttpHeader) => (boolean | SyncResult<boolean>)): Iterable<HttpHeader>;
175
+ instanceOf<TOutput extends HttpHeader>(typeOrTypeCheck: Type<TOutput> | ((value: HttpHeader) => value is TOutput)): Iterable<TOutput>;
176
+ first(condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
177
+ last(condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
178
+ [Symbol.iterator](): JavascriptIterator<HttpHeader>;
179
+ contains(value: HttpHeader, equalFunctions?: EqualFunctions): SyncResult<boolean>;
180
+ }
181
+
182
+ /**
183
+ * A collection of {@link HttpHeader}s.
184
+ */
185
+ declare abstract class HttpHeaders implements Iterable<HttpHeader> {
186
+ static readonly contentTypeHeaderName: string;
187
+ static create(headers?: JavascriptIterable<HttpHeader>): MutableHttpHeaders;
188
+ /**
189
+ * Get the header with the provided name.
190
+ * @param headerName The name of the header.
191
+ */
192
+ abstract get(headerName: string): SyncResult<HttpHeader>;
193
+ /**
194
+ * Get the value of the header with the provided name.
195
+ * @param headerName The name of the header.
196
+ */
197
+ abstract getValue(headerName: string): SyncResult<string>;
198
+ getContentType(): AsyncResult<HttpHeader>;
199
+ static getContentType(headers: HttpHeaders): AsyncResult<HttpHeader>;
200
+ getContentTypeValue(): AsyncResult<string>;
201
+ static getContentTypeValue(headers: HttpHeaders): AsyncResult<string>;
202
+ /**
203
+ * Get an {@link Iterator} that can be used to iterate through the {@link HttpHeader}s in this
204
+ * collection.
205
+ */
206
+ abstract iterate(): Iterator<HttpHeader>;
207
+ /**
208
+ * Get the {@link HttpHeader}s in this {@link HttpHeaders} object as an array.
209
+ */
210
+ toArray(): SyncResult<HttpHeader[]>;
211
+ static toArray(headers: HttpHeaders): SyncResult<HttpHeader[]>;
212
+ any(): SyncResult<boolean>;
213
+ static any(headers: HttpHeaders): SyncResult<boolean>;
214
+ getCount(): SyncResult<number>;
215
+ static getCount(headers: HttpHeaders): SyncResult<number>;
216
+ equals(right: JavascriptIterable<HttpHeader>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
217
+ static equals(headers: HttpHeaders, right: JavascriptIterable<HttpHeader>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
218
+ toString(toStringFunctions?: ToStringFunctions): string;
219
+ static toString(headers: HttpHeaders, toStringFunctions?: ToStringFunctions): string;
220
+ concatenate(...toConcatenate: JavascriptIterable<HttpHeader>[]): Iterable<HttpHeader>;
221
+ static concatenate(headers: HttpHeaders, ...toConcatenate: JavascriptIterable<HttpHeader>[]): Iterable<HttpHeader>;
222
+ map<TOutput>(mapping: (value: HttpHeader) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
223
+ static map<TOutput>(headers: HttpHeaders, mapping: (value: HttpHeader) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
224
+ flatMap<TOutput>(mapping: (value: HttpHeader) => JavascriptIterable<TOutput>): Iterable<TOutput>;
225
+ static flatMap<TOutput>(headers: HttpHeaders, mapping: (value: HttpHeader) => JavascriptIterable<TOutput>): Iterable<TOutput>;
226
+ where(condition: (value: HttpHeader) => boolean): Iterable<HttpHeader>;
227
+ static where(headers: HttpHeaders, condition: (value: HttpHeader) => (boolean | SyncResult<boolean>)): Iterable<HttpHeader>;
228
+ instanceOf<TOutput extends HttpHeader>(typeOrTypeCheck: Type<TOutput> | ((value: HttpHeader) => value is TOutput)): Iterable<TOutput>;
229
+ static instanceOf<TOutput extends HttpHeader>(headers: HttpHeaders, typeOrTypeCheck: Type<TOutput> | ((value: HttpHeader) => value is TOutput)): Iterable<TOutput>;
230
+ first(condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
231
+ static first(headers: HttpHeaders, condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
232
+ last(condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
233
+ static last(headers: HttpHeaders, condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
234
+ [Symbol.iterator](): JavascriptIterator<HttpHeader>;
235
+ static [Symbol.iterator](headers: HttpHeaders): JavascriptIterator<HttpHeader>;
236
+ contains(value: HttpHeader, equalFunctions?: EqualFunctions): SyncResult<boolean>;
237
+ static contains(headers: HttpHeaders, value: HttpHeader, equalFunctions?: EqualFunctions): SyncResult<boolean>;
238
+ }
239
+
240
+ /**
241
+ * A HTTP response sent by a HTTP server.
242
+ */
243
+ declare abstract class HttpOutgoingResponse {
244
+ /**
245
+ * Set the status code of this {@link HttpOutgoingResponse}.
246
+ * @param statusCode The status code to set.
247
+ */
248
+ abstract setStatusCode(statusCode: number): this;
249
+ /**
250
+ * Get the status code.
251
+ */
252
+ abstract getStatusCode(): AsyncResult<number>;
253
+ /**
254
+ * Get the {@link HttpHeaders} of this {@link HttpOutgoingResponse}.
255
+ */
256
+ abstract getHeaders(): HttpHeaders;
257
+ /**
258
+ * Get the {@link HttpHeader} with the provided name in this {@link HttpOutgoingResponse}. If no
259
+ * header exists with the provided name, then a {@link NotFoundError} will be returned.
260
+ * @param headerName The name of the header to get.
261
+ */
262
+ abstract getHeader(headerName: string): AsyncResult<HttpHeader>;
263
+ /**
264
+ * Get the value of the {@link HttpHeader} with the provided name in this
265
+ * {@link HttpOutgoingResponse}. If no header exists with the provided name, then a
266
+ * {@link NotFoundError} will be returned.
267
+ * @param headerName The name of the header value to get.
268
+ */
269
+ abstract getHeaderValue(headerName: string): AsyncResult<string>;
270
+ abstract setHeader(headerName: string, headerValue: string): this;
271
+ /**
272
+ * Set the body of this {@link HttpOutgoingResponse} to be the provided string value.
273
+ * @param body The string body to set.
274
+ */
275
+ abstract setBodyString(body: string): this;
276
+ /**
277
+ * Set the body of this {@link HttpOutgoingResponse} to be the provided JSON value.
278
+ * @param body The JSON body to set.
279
+ */
280
+ abstract setBodyJSON(body: unknown): this;
281
+ }
282
+
283
+ declare class NodeJSHttpOutgoingResponse implements HttpOutgoingResponse {
284
+ private readonly innerResponse;
285
+ private bodyString;
286
+ private constructor();
287
+ static create(innerResponse: http.ServerResponse<http.IncomingMessage> & {
288
+ req: http.IncomingMessage;
289
+ }): NodeJSHttpOutgoingResponse;
290
+ setStatusCode(statusCode: number): this;
291
+ getStatusCode(): SyncResult<number>;
292
+ private static headerValueToString;
293
+ getHeaders(): HttpHeaders;
294
+ getHeader(headerName: string): SyncResult<HttpHeader>;
295
+ getHeaderValue(headerName: string): SyncResult<string>;
296
+ setHeader(headerName: string, headerValue: string): this;
297
+ setBodyString(body: string): this;
298
+ setBodyJSON(body: unknown): this;
299
+ end(): AsyncResult<void>;
300
+ }
301
+
302
+ /**
303
+ * A {@link Clock} implementation that returns the actual current {@link DateTime}.
304
+ */
305
+ declare class RealClock implements Clock {
306
+ private constructor();
307
+ static create(): RealClock;
308
+ now(): DateTime;
309
+ }
310
+
311
+ declare class TokenType {
312
+ private readonly name;
313
+ private constructor();
314
+ private static create;
315
+ static readonly Whitespace: TokenType;
316
+ static readonly NewLine: TokenType;
317
+ static readonly Letters: TokenType;
318
+ static readonly Digits: TokenType;
319
+ static readonly LeftParenthesis: TokenType;
320
+ static readonly RightParenthesis: TokenType;
321
+ static readonly Backslash: TokenType;
322
+ static readonly ForwardSlash: TokenType;
323
+ static readonly Unknown: TokenType;
324
+ static readonly Period: TokenType;
325
+ static readonly Underscore: TokenType;
326
+ static readonly Colon: TokenType;
327
+ toString(): string;
328
+ }
329
+
330
+ declare class Token {
331
+ private static readonly newLineToken;
332
+ private static readonly carriageReturnNewLineToken;
333
+ private static readonly leftParenthesisToken;
334
+ private static readonly rightParenthesisToken;
335
+ private static readonly backslashToken;
336
+ private static readonly forwardSlashToken;
337
+ private static readonly periodToken;
338
+ private static readonly underscoreToken;
339
+ private static readonly colonToken;
340
+ private readonly text;
341
+ private readonly type;
342
+ private constructor();
343
+ private static create;
344
+ static whitespace(text: string): Token;
345
+ static newLine(text?: string): Token;
346
+ static leftParenthesis(): Token;
347
+ static rightParenthesis(): Token;
348
+ static backslash(): Token;
349
+ static forwardSlash(): Token;
350
+ static period(): Token;
351
+ static underscore(): Token;
352
+ static colon(): Token;
353
+ static letters(text: string): Token;
354
+ static digits(text: string): Token;
355
+ static unknown(text: string): Token;
356
+ getText(): string;
357
+ getType(): TokenType;
358
+ }
359
+
360
+ /**
361
+ * A type that converts a stream of characters into a stream of tokens.
362
+ */
363
+ declare class Tokenizer implements Iterator<Token> {
364
+ private readonly characters;
365
+ private currentToken;
366
+ private started;
367
+ private constructor();
368
+ static create(characters: JavascriptIterable<string>): Tokenizer;
369
+ hasStarted(): boolean;
370
+ hasCurrent(): boolean;
371
+ getCurrent(): Token;
372
+ next(): SyncResult<boolean>;
373
+ private readWhile;
374
+ start(): SyncResult<this>;
375
+ takeCurrent(): SyncResult<Token>;
376
+ any(): SyncResult<boolean>;
377
+ getCount(): SyncResult<number>;
378
+ toArray(): SyncResult<Token[]>;
379
+ concatenate(...toConcatenate: JavascriptIterable<Token>[]): Iterator<Token>;
380
+ where(condition: (value: Token) => (boolean | SyncResult<boolean>)): Iterator<Token>;
381
+ map<TOutput>(mapping: (value: Token) => TOutput | SyncResult<TOutput>): Iterator<TOutput>;
382
+ flatMap<TOutput>(mapping: (value: Token) => JavascriptIterable<TOutput>): Iterator<TOutput>;
383
+ whereInstanceOf<U extends Token>(typeCheck: (value: Token) => value is U): Iterator<U>;
384
+ whereInstanceOfType<U extends Token>(type: Type<U>): Iterator<U>;
385
+ first(condition?: ((value: Token) => (boolean | SyncResult<boolean>)) | undefined): SyncResult<Token>;
386
+ last(condition?: ((value: Token) => (boolean | SyncResult<boolean>)) | undefined): SyncResult<Token>;
387
+ take(maximumToTake: number): Iterator<Token>;
388
+ skip(maximumToSkip: number): Iterator<Token>;
389
+ [Symbol.iterator](): JavascriptIterator<Token>;
390
+ }
391
+
126
392
  /**
127
393
  * A collection of parameters that can be passed to an assert error message function.
128
394
  */
@@ -1150,109 +1416,6 @@ declare abstract class Condition {
1150
1416
  }): void;
1151
1417
  }
1152
1418
 
1153
- declare class HttpHeader {
1154
- private readonly name;
1155
- private readonly value;
1156
- private constructor();
1157
- static create(name: string, value: string): HttpHeader;
1158
- getName(): string;
1159
- getValue(): string;
1160
- toString(): string;
1161
- }
1162
-
1163
- declare class MutableHttpHeaders implements HttpHeaders {
1164
- private readonly headers;
1165
- private constructor();
1166
- static create(headers?: JavascriptIterable<HttpHeader>): MutableHttpHeaders;
1167
- iterate(): Iterator<HttpHeader>;
1168
- get(headerName: string): SyncResult<HttpHeader>;
1169
- getValue(headerName: string): SyncResult<string>;
1170
- /**
1171
- * Set a {@link HttpHeader} value in this collection. This will overwrite any existing
1172
- * {@link HttpHeader} with the same name.
1173
- * @param headerName The name of the header to set.
1174
- * @param headerValue The value of the header to set.
1175
- */
1176
- set(headerName: string, headerValue: string): this;
1177
- set(header: HttpHeader): this;
1178
- setAll(headers: JavascriptIterable<HttpHeader>): this;
1179
- setContentType(contentType: string): this;
1180
- getContentType(): SyncResult<HttpHeader>;
1181
- getContentTypeValue(): SyncResult<string>;
1182
- getCount(): SyncResult<number>;
1183
- toArray(): SyncResult<HttpHeader[]>;
1184
- any(): SyncResult<boolean>;
1185
- equals(right: JavascriptIterable<HttpHeader>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
1186
- toString(toStringFunctions?: ToStringFunctions): string;
1187
- concatenate(...toConcatenate: JavascriptIterable<HttpHeader>[]): Iterable<HttpHeader>;
1188
- map<TOutput>(mapping: (value: HttpHeader) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
1189
- flatMap<TOutput>(mapping: (value: HttpHeader) => JavascriptIterable<TOutput>): Iterable<TOutput>;
1190
- where(condition: (value: HttpHeader) => (boolean | SyncResult<boolean>)): Iterable<HttpHeader>;
1191
- instanceOf<TOutput extends HttpHeader>(typeOrTypeCheck: Type<TOutput> | ((value: HttpHeader) => value is TOutput)): Iterable<TOutput>;
1192
- first(condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
1193
- last(condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
1194
- [Symbol.iterator](): JavascriptIterator<HttpHeader>;
1195
- contains(value: HttpHeader, equalFunctions?: EqualFunctions): SyncResult<boolean>;
1196
- }
1197
-
1198
- /**
1199
- * A collection of {@link HttpHeader}s.
1200
- */
1201
- declare abstract class HttpHeaders implements Iterable<HttpHeader> {
1202
- static readonly contentTypeHeaderName: string;
1203
- static create(headers?: JavascriptIterable<HttpHeader>): MutableHttpHeaders;
1204
- /**
1205
- * Get the header with the provided name.
1206
- * @param headerName The name of the header.
1207
- */
1208
- abstract get(headerName: string): SyncResult<HttpHeader>;
1209
- /**
1210
- * Get the value of the header with the provided name.
1211
- * @param headerName The name of the header.
1212
- */
1213
- abstract getValue(headerName: string): SyncResult<string>;
1214
- getContentType(): AsyncResult<HttpHeader>;
1215
- static getContentType(headers: HttpHeaders): AsyncResult<HttpHeader>;
1216
- getContentTypeValue(): AsyncResult<string>;
1217
- static getContentTypeValue(headers: HttpHeaders): AsyncResult<string>;
1218
- /**
1219
- * Get an {@link Iterator} that can be used to iterate through the {@link HttpHeader}s in this
1220
- * collection.
1221
- */
1222
- abstract iterate(): Iterator<HttpHeader>;
1223
- /**
1224
- * Get the {@link HttpHeader}s in this {@link HttpHeaders} object as an array.
1225
- */
1226
- toArray(): SyncResult<HttpHeader[]>;
1227
- static toArray(headers: HttpHeaders): SyncResult<HttpHeader[]>;
1228
- any(): SyncResult<boolean>;
1229
- static any(headers: HttpHeaders): SyncResult<boolean>;
1230
- getCount(): SyncResult<number>;
1231
- static getCount(headers: HttpHeaders): SyncResult<number>;
1232
- equals(right: JavascriptIterable<HttpHeader>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
1233
- static equals(headers: HttpHeaders, right: JavascriptIterable<HttpHeader>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
1234
- toString(toStringFunctions?: ToStringFunctions): string;
1235
- static toString(headers: HttpHeaders, toStringFunctions?: ToStringFunctions): string;
1236
- concatenate(...toConcatenate: JavascriptIterable<HttpHeader>[]): Iterable<HttpHeader>;
1237
- static concatenate(headers: HttpHeaders, ...toConcatenate: JavascriptIterable<HttpHeader>[]): Iterable<HttpHeader>;
1238
- map<TOutput>(mapping: (value: HttpHeader) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
1239
- static map<TOutput>(headers: HttpHeaders, mapping: (value: HttpHeader) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
1240
- flatMap<TOutput>(mapping: (value: HttpHeader) => JavascriptIterable<TOutput>): Iterable<TOutput>;
1241
- static flatMap<TOutput>(headers: HttpHeaders, mapping: (value: HttpHeader) => JavascriptIterable<TOutput>): Iterable<TOutput>;
1242
- where(condition: (value: HttpHeader) => boolean): Iterable<HttpHeader>;
1243
- static where(headers: HttpHeaders, condition: (value: HttpHeader) => (boolean | SyncResult<boolean>)): Iterable<HttpHeader>;
1244
- instanceOf<TOutput extends HttpHeader>(typeOrTypeCheck: Type<TOutput> | ((value: HttpHeader) => value is TOutput)): Iterable<TOutput>;
1245
- static instanceOf<TOutput extends HttpHeader>(headers: HttpHeaders, typeOrTypeCheck: Type<TOutput> | ((value: HttpHeader) => value is TOutput)): Iterable<TOutput>;
1246
- first(condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
1247
- static first(headers: HttpHeaders, condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
1248
- last(condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
1249
- static last(headers: HttpHeaders, condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
1250
- [Symbol.iterator](): JavascriptIterator<HttpHeader>;
1251
- static [Symbol.iterator](headers: HttpHeaders): JavascriptIterator<HttpHeader>;
1252
- contains(value: HttpHeader, equalFunctions?: EqualFunctions): SyncResult<boolean>;
1253
- static contains(headers: HttpHeaders, value: HttpHeader, equalFunctions?: EqualFunctions): SyncResult<boolean>;
1254
- }
1255
-
1256
1419
  declare enum HttpMethod {
1257
1420
  /**
1258
1421
  * The GET method requests a representation of the specified resource. Requests using GET should
@@ -1365,8 +1528,22 @@ declare class HttpOutgoingRequest {
1365
1528
  */
1366
1529
  declare abstract class HttpIncomingResponse {
1367
1530
  abstract getStatusCode(): number;
1531
+ /**
1532
+ * Get the {@link HttpHeaders} of this {@link HttpIncomingResponse}.
1533
+ */
1368
1534
  abstract getHeaders(): AsyncResult<HttpHeaders>;
1535
+ /**
1536
+ * Get the {@link HttpHeader} with the provided name in this {@link HttpIncomingResponse}. If no
1537
+ * header exists with the provided name, then a {@link NotFoundError} will be returned.
1538
+ * @param headerName The name of the header to get.
1539
+ */
1369
1540
  abstract getHeader(headerName: string): AsyncResult<HttpHeader>;
1541
+ /**
1542
+ * Get the value of the {@link HttpHeader} with the provided name in this
1543
+ * {@link HttpIncomingResponse}. If no header exists with the provided name, then a
1544
+ * {@link NotFoundError} will be returned.
1545
+ * @param headerName The name of the header value to get.
1546
+ */
1370
1547
  abstract getHeaderValue(headerName: string): AsyncResult<string>;
1371
1548
  abstract getBody(): AsyncResult<string>;
1372
1549
  }
@@ -1402,59 +1579,27 @@ declare abstract class HttpIncomingRequest {
1402
1579
  * Get the path component of the requested URL.
1403
1580
  */
1404
1581
  abstract getURLPath(): string;
1405
- abstract getHeaders(): AsyncResult<HttpHeaders>;
1406
- abstract getHeader(headerName: string): AsyncResult<HttpHeader>;
1407
- abstract getHeaderValue(headerName: string): AsyncResult<string>;
1408
- abstract getBody(): AsyncResult<string>;
1409
- }
1410
-
1411
- /**
1412
- * A HTTP response that is sent out by an {@link HttpServer}.
1413
- */
1414
- declare class HttpOutgoingResponse {
1415
- private statusCode;
1416
- private readonly headers;
1417
- private body;
1418
- private constructor();
1419
- static create(): HttpOutgoingResponse;
1420
1582
  /**
1421
- * Get the status code of this {@link HttpOutgoingResponse}.
1583
+ * Get the {@link HttpHeaders} of this {@link HttpIncomingRequest}.
1422
1584
  */
1423
- getStatusCode(): number;
1424
- /**
1425
- * Set the status code of this {@link HttpOutgoingResponse}.
1426
- * @param statusCode The status code of this {@link HttpOutgoingResponse}.
1427
- */
1428
- setStatusCode(statusCode: number): this;
1429
- getHeaders(): HttpHeaders;
1585
+ abstract getHeaders(): AsyncResult<HttpHeaders>;
1430
1586
  /**
1431
- * Get the HTTP header with the provided name or return a {@link NotFoundError} if the header
1432
- * doesn't exist.
1587
+ * Get the {@link HttpHeader} with the provided name in this {@link HttpIncomingRequest}. If no
1588
+ * header exists with the provided name, then a {@link NotFoundError} will be returned.
1433
1589
  * @param headerName The name of the header to get.
1434
1590
  */
1435
- getHeader(headerName: string): SyncResult<HttpHeader>;
1591
+ abstract getHeader(headerName: string): AsyncResult<HttpHeader>;
1436
1592
  /**
1437
- * Get the value of the header with the provided name or return a {@link NotFoundError} if the
1438
- * header doesn't exist.
1593
+ * Get the value of the {@link HttpHeader} with the provided name in this
1594
+ * {@link HttpIncomingRequest}. If no header exists with the provided name, then a
1595
+ * {@link NotFoundError} will be returned.
1439
1596
  * @param headerName The name of the header value to get.
1440
1597
  */
1441
- getHeaderValue(headerName: string): SyncResult<string>;
1442
- /**
1443
- * Set the HTTP header in this {@link HttpOutgoingResponse}.
1444
- * @param headerName The name of the HTTP header.
1445
- * @param headerValue The value of the HTTP header.
1446
- */
1447
- setHeader(headerName: string, headerValue: string): this;
1448
- setContentTypeHeader(contentType: string): this;
1449
- /**
1450
- * Get the body of this {@link HttpOutgoingResponse}.
1451
- */
1452
- getBody(): string;
1598
+ abstract getHeaderValue(headerName: string): AsyncResult<string>;
1453
1599
  /**
1454
- * Set the body of this {@link HttpOutgoingResponse}.
1455
- * @param body The body for this {@link HttpOutgoingResponse}.
1600
+ * Get the body of this {@link HttpIncomingRequest}.
1456
1601
  */
1457
- setBody(body: string): this;
1602
+ abstract getBody(): AsyncResult<string>;
1458
1603
  }
1459
1604
 
1460
1605
  declare abstract class HttpServer implements Disposable {
@@ -1536,41 +1681,6 @@ declare class CurrentProcess {
1536
1681
  setNetwork(network: Network): this;
1537
1682
  }
1538
1683
 
1539
- declare abstract class DateTime {
1540
- static parse(text: string): DateTime;
1541
- static now(): DateTime;
1542
- abstract getYear(): number;
1543
- abstract getMonth(): number;
1544
- abstract getDay(): number;
1545
- abstract getHour(): number;
1546
- abstract getMinute(): number;
1547
- abstract getSecond(): number;
1548
- abstract addDays(days: number): DateTime;
1549
- /**
1550
- * Compare this {@link DateTime} to the provided {@link DateTime}. If this {@link DateTime} is
1551
- * less than the provided {@link DateTime}, then a negative number will be returned, 0 if
1552
- * they're equal, or a positive number if this {@link DateTime} is greater than the provided
1553
- * {@link DateTime}.
1554
- * @param dateTime The {@link DateTime} to compare to this {@link DateTime}.
1555
- */
1556
- compareTo(dateTime: DateTime, compareTimes: boolean): number;
1557
- static compareTo(left: DateTime, right: DateTime, compareTimes: boolean): number;
1558
- lessThan(dateTime: DateTime, compareTimes: boolean): boolean;
1559
- static lessThan(left: DateTime, right: DateTime, compareTimes: boolean): boolean;
1560
- lessThanOrEqualTo(dateTime: DateTime, compareTimes: boolean): boolean;
1561
- static lessThanOrEqualTo(left: DateTime, right: DateTime, compareTimes: boolean): boolean;
1562
- equals(dateTime: DateTime, compareTimes: boolean): boolean;
1563
- static equals(left: DateTime, right: DateTime, compareTimes: boolean): boolean;
1564
- greaterThanOrEqualTo(dateTime: DateTime, compareTimes: boolean): boolean;
1565
- static greaterThanOrEqualTo(left: DateTime, right: DateTime, compareTimes: boolean): boolean;
1566
- greaterThan(dateTime: DateTime, compareTimes: boolean): boolean;
1567
- static greaterThan(left: DateTime, right: DateTime, compareTimes: boolean): boolean;
1568
- get debug(): string;
1569
- static debug(dateTime: DateTime): string;
1570
- abstract toString(): string;
1571
- abstract toDateString(): string;
1572
- }
1573
-
1574
1684
  /**
1575
1685
  * An object that can be used to implement a search algorithm.
1576
1686
  */
@@ -1642,8 +1752,8 @@ declare class FetchHttpIncomingResponse extends HttpIncomingResponse {
1642
1752
  declare class FetchHttpClient implements HttpClient {
1643
1753
  protected constructor();
1644
1754
  static create(): FetchHttpClient;
1645
- sendRequest(request: HttpOutgoingRequest): PromiseAsyncResult<FetchHttpIncomingResponse>;
1646
- sendGetRequest(url: string): PromiseAsyncResult<FetchHttpIncomingResponse>;
1755
+ sendRequest(request: HttpOutgoingRequest): AsyncResult<FetchHttpIncomingResponse>;
1756
+ sendGetRequest(url: string): AsyncResult<FetchHttpIncomingResponse>;
1647
1757
  static convertMethod(method: HttpMethod): string;
1648
1758
  }
1649
1759
 
@@ -3419,4 +3529,4 @@ declare class WonderlandTrailClient implements HttpClient {
3419
3529
  }): PromiseAsyncResult<Iterable<WonderlandTrailItinerary>>;
3420
3530
  }
3421
3531
 
3422
- export { ANSIStyles, type AssertMessageParameters, AsyncIterator, AsyncIteratorToJavascriptAsyncIteratorAdapter, AsyncResult, ByteList, ByteListStream, ByteReadStream, ByteWriteStream, Bytes, CharacterList, CharacterListStream, CharacterReadStream, CharacterReadStreamAsyncIterator, CharacterTable, CharacterWriteStream, CommandLineParameter, CommandLineParameters, Comparable, Comparer, Comparison, ConcatenateIterable, ConcatenateIterator, Condition, CurrentProcess, DateTime, Disposable, EmptyError, EqualFunctions, FetchHttpClient, FetchHttpIncomingResponse, FlatMapIterable, FlatMapIterator, Generator, type GeneratorControl, HttpClient, HttpHeader, HttpHeaders, HttpIncomingRequest, HttpIncomingResponse, HttpMethod, HttpOutgoingRequest, HttpOutgoingResponse, HttpServer, InMemoryCharacterWriteStream, IndentedCharacterWriteStream, Indexable, Iterable, Iterator, IteratorToJavascriptIteratorAdapter, JavascriptArrayList, JavascriptAsyncIterable, JavascriptAsyncIterator, JavascriptAsyncIteratorToAsyncIteratorAdapter, JavascriptIterable, JavascriptIterator, JavascriptIteratorResult, JavascriptIteratorToIteratorAdapter, JavascriptMapMap, JavascriptSetSet, List, ListQueue, ListStack, LuxonDateTime, Map, MapAsyncIterator, type MapEntry, MapIterable, MapIterator, MutableCondition, MutableHttpHeaders, MutableIndexable, MutableMap, Network, Node, NodeJSCharacterWriteStream, NodeJSHttpIncomingRequest, NodeJSHttpServer, NotFoundError, PostCondition, PostConditionError, PreCondition, PreConditionError, PromiseAsyncResult, Property, Queue, RealNetwork, RecreationDotGovClient, RecreationDotGovDivisionAvailability, type RecreationDotGovDivisionAvailabilityJson, type RecreationDotGovDivisionDayAvailability, type RecreationDotGovDivisionJson, RecreationDotGovError, type RecreationDotGovErrorResponse, type RecreationDotGovPermitItineraryJson, SearchControl, Set, SkipAsyncIterator, SkipIterator, Stack, StringComparer, StringIterator, SyncDisposable, SyncResult, TakeAsyncIterator, TakeIterator, ToStringFunctions, Type, WhereAsyncIterator, WhereIterable, WhereIterator, WonderlandTrailAvailability, type WonderlandTrailAvailabilityType, WonderlandTrailClient, WonderlandTrailConnection, WonderlandTrailConnections, WonderlandTrailDirection, WonderlandTrailItinerary, type WonderlandTrailLocation, WonderlandTrailLocations, WonderlandTrailReservationType, andList, depthFirstSearch, escape, escapeAndQuote, getLength, httpMethodToString, isDigit, isLetter, isLetterOrDigit, isLowercasedLetter, isMap, isMutableMap, isSet, isUppercasedLetter, isWhitespace, isWonderlandTrailLocation, join, orList, parseHttpMethod, quote, toString };
3532
+ export { ANSIStyles, type AssertMessageParameters, AsyncIterator, AsyncIteratorToJavascriptAsyncIteratorAdapter, AsyncResult, ByteList, ByteListStream, ByteReadStream, ByteWriteStream, Bytes, CharacterList, CharacterListStream, CharacterReadStream, CharacterReadStreamAsyncIterator, CharacterTable, CharacterWriteStream, Clock, CommandLineParameter, CommandLineParameters, Comparable, Comparer, Comparison, ConcatenateIterable, ConcatenateIterator, Condition, CurrentProcess, DateTime, Disposable, EmptyError, EqualFunctions, FetchError, FetchHttpClient, FetchHttpIncomingResponse, FlatMapIterable, FlatMapIterator, Generator, type GeneratorControl, HttpClient, HttpHeader, HttpHeaders, HttpIncomingRequest, HttpIncomingResponse, HttpMethod, HttpOutgoingRequest, HttpOutgoingResponse, HttpServer, InMemoryCharacterWriteStream, IndentedCharacterWriteStream, Indexable, Iterable, Iterator, IteratorToJavascriptIteratorAdapter, JavascriptArrayList, JavascriptAsyncIterable, JavascriptAsyncIterator, JavascriptAsyncIteratorToAsyncIteratorAdapter, JavascriptIterable, JavascriptIterator, JavascriptIteratorResult, JavascriptIteratorToIteratorAdapter, JavascriptMapMap, JavascriptSetSet, List, ListQueue, ListStack, LuxonDateTime, Map, MapAsyncIterator, type MapEntry, MapIterable, MapIterator, MutableCondition, MutableHttpHeaders, MutableIndexable, MutableMap, Network, Node, NodeJSCharacterWriteStream, NodeJSHttpIncomingRequest, NodeJSHttpOutgoingResponse, NodeJSHttpServer, NotFoundError, PostCondition, PostConditionError, PreCondition, PreConditionError, PromiseAsyncResult, Property, Queue, RealClock, RealNetwork, RecreationDotGovClient, RecreationDotGovDivisionAvailability, type RecreationDotGovDivisionAvailabilityJson, type RecreationDotGovDivisionDayAvailability, type RecreationDotGovDivisionJson, RecreationDotGovError, type RecreationDotGovErrorResponse, type RecreationDotGovPermitItineraryJson, SearchControl, Set, SkipAsyncIterator, SkipIterator, Stack, StringComparer, StringIterator, SyncDisposable, SyncResult, TakeAsyncIterator, TakeIterator, ToStringFunctions, Token, TokenType, Tokenizer, Type, WhereAsyncIterator, WhereIterable, WhereIterator, WonderlandTrailAvailability, type WonderlandTrailAvailabilityType, WonderlandTrailClient, WonderlandTrailConnection, WonderlandTrailConnections, WonderlandTrailDirection, WonderlandTrailItinerary, type WonderlandTrailLocation, WonderlandTrailLocations, WonderlandTrailReservationType, andList, depthFirstSearch, escape, escapeAndQuote, getLength, httpMethodToString, isDigit, isLetter, isLetterOrDigit, isLowercasedLetter, isMap, isMutableMap, isSet, isUppercasedLetter, isWhitespace, isWonderlandTrailLocation, join, orList, parseHttpMethod, quote, toString };