@utiliread/http 1.17.3 → 1.17.6
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/dist/cjs/event-aggregator.js +30 -0
- package/dist/cjs/event-aggregator.js.map +1 -0
- package/dist/cjs/events.js +19 -0
- package/dist/cjs/events.js.map +1 -0
- package/dist/cjs/helpers.js +16 -0
- package/dist/cjs/helpers.js.map +1 -0
- package/dist/cjs/http-builder.js +192 -0
- package/dist/cjs/http-builder.js.map +1 -0
- package/dist/cjs/http-error.js +30 -0
- package/dist/cjs/http-error.js.map +1 -0
- package/dist/cjs/http-response.js +51 -0
- package/dist/cjs/http-response.js.map +1 -0
- package/dist/cjs/http.js +96 -0
- package/dist/cjs/http.js.map +1 -0
- package/dist/cjs/http.spec.js +69 -0
- package/dist/cjs/http.spec.js.map +1 -0
- package/dist/cjs/index.js +38 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/json/index.js +74 -0
- package/dist/cjs/json/index.js.map +1 -0
- package/dist/cjs/jsonpatch/index.js +15 -0
- package/dist/cjs/jsonpatch/index.js.map +1 -0
- package/dist/cjs/mapping.js +37 -0
- package/dist/cjs/mapping.js.map +1 -0
- package/dist/cjs/msgpack/index.js +35 -0
- package/dist/cjs/msgpack/index.js.map +1 -0
- package/dist/cjs/pagination.js +3 -0
- package/dist/cjs/pagination.js.map +1 -0
- package/dist/cjs/problem-details.js +3 -0
- package/dist/cjs/problem-details.js.map +1 -0
- package/dist/cjs/query-string.js +66 -0
- package/dist/cjs/query-string.js.map +1 -0
- package/dist/cjs/query-string.spec.js +52 -0
- package/dist/cjs/query-string.spec.js.map +1 -0
- package/dist/cjs/status-codes.js +71 -0
- package/dist/cjs/status-codes.js.map +1 -0
- package/dist/cjs/timeout-error.js +14 -0
- package/dist/cjs/timeout-error.js.map +1 -0
- package/dist/esm/event-aggregator.d.ts +11 -0
- package/dist/esm/event-aggregator.js +26 -0
- package/dist/esm/event-aggregator.js.map +1 -0
- package/dist/esm/events.d.ts +11 -0
- package/dist/esm/events.js +15 -0
- package/dist/esm/events.js.map +1 -0
- package/dist/esm/helpers.d.ts +5 -0
- package/dist/esm/helpers.js +10 -0
- package/dist/esm/helpers.js.map +1 -0
- package/dist/esm/http-builder.d.ts +60 -0
- package/dist/esm/http-builder.js +187 -0
- package/dist/esm/http-builder.js.map +1 -0
- package/dist/esm/http-error.d.ts +10 -0
- package/dist/esm/http-error.js +26 -0
- package/dist/esm/http-error.js.map +1 -0
- package/dist/esm/http-response.d.ts +18 -0
- package/dist/esm/http-response.js +46 -0
- package/dist/esm/http-response.js.map +1 -0
- package/dist/esm/http.d.ts +33 -0
- package/dist/esm/http.js +92 -0
- package/dist/esm/http.js.map +1 -0
- package/dist/esm/http.spec.d.ts +1 -0
- package/dist/esm/http.spec.js +67 -0
- package/dist/esm/http.spec.js.map +1 -0
- package/dist/esm/index.d.ts +15 -0
- package/dist/esm/index.js +11 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/json/index.d.ts +15 -0
- package/dist/esm/json/index.js +72 -0
- package/dist/esm/json/index.js.map +1 -0
- package/dist/{jsonpatch.d.ts → esm/jsonpatch/index.d.ts} +9 -10
- package/dist/esm/jsonpatch/index.js +13 -0
- package/dist/esm/jsonpatch/index.js.map +1 -0
- package/dist/esm/mapping.d.ts +9 -0
- package/dist/esm/mapping.js +32 -0
- package/dist/esm/mapping.js.map +1 -0
- package/dist/esm/msgpack/index.d.ts +8 -0
- package/dist/esm/msgpack/index.js +33 -0
- package/dist/esm/msgpack/index.js.map +1 -0
- package/dist/esm/pagination.d.ts +23 -0
- package/dist/esm/pagination.js +2 -0
- package/dist/esm/pagination.js.map +1 -0
- package/dist/esm/problem-details.d.ts +7 -0
- package/dist/esm/problem-details.js +2 -0
- package/dist/esm/problem-details.js.map +1 -0
- package/dist/esm/query-string.d.ts +6 -0
- package/dist/esm/query-string.js +62 -0
- package/dist/esm/query-string.js.map +1 -0
- package/dist/esm/query-string.spec.d.ts +1 -0
- package/dist/esm/query-string.spec.js +50 -0
- package/dist/esm/query-string.spec.js.map +1 -0
- package/dist/esm/status-codes.d.ts +67 -0
- package/dist/esm/status-codes.js +68 -0
- package/dist/esm/status-codes.js.map +1 -0
- package/dist/esm/timeout-error.d.ts +3 -0
- package/dist/esm/timeout-error.js +10 -0
- package/dist/esm/timeout-error.js.map +1 -0
- package/json.d.ts +1 -1
- package/jsonpatch.d.ts +1 -1
- package/msgpack.d.ts +1 -1
- package/package.json +20 -27
- package/plugins/json/src/index.ts +17 -19
- package/plugins/json/tsconfig.cjs.json +8 -0
- package/plugins/json/tsconfig.json +4 -2
- package/plugins/jsonpatch/tsconfig.cjs.json +8 -0
- package/plugins/jsonpatch/tsconfig.json +4 -2
- package/plugins/msgpack/src/index.ts +12 -13
- package/plugins/msgpack/tsconfig.cjs.json +8 -0
- package/plugins/msgpack/tsconfig.json +4 -2
- package/src/index.ts +1 -1
- package/src/mapping.d.ts +9 -0
- package/src/mapping.js +32 -0
- package/src/mapping.js.map +1 -0
- package/tsconfig.cjs.json +8 -0
- package/tsconfig.json +13 -3
- package/dist/index.d.ts +0 -227
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -534
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -507
- package/dist/index.mjs.map +0 -1
- package/dist/json.d.ts +0 -15
- package/dist/json.d.ts.map +0 -1
- package/dist/json.js +0 -100
- package/dist/json.js.map +0 -1
- package/dist/json.mjs +0 -100
- package/dist/json.mjs.map +0 -1
- package/dist/jsonpatch.d.ts.map +0 -1
- package/dist/jsonpatch.js +0 -18
- package/dist/jsonpatch.js.map +0 -1
- package/dist/jsonpatch.mjs +0 -18
- package/dist/jsonpatch.mjs.map +0 -1
- package/dist/msgpack.d.ts +0 -9
- package/dist/msgpack.d.ts.map +0 -1
- package/dist/msgpack.js +0 -62
- package/dist/msgpack.js.map +0 -1
- package/dist/msgpack.mjs +0 -62
- package/dist/msgpack.mjs.map +0 -1
- package/plugins/json/package-lock.json +0 -145
- package/plugins/json/package.json +0 -11
- package/plugins/jsonpatch/package-lock.json +0 -124
- package/plugins/jsonpatch/package.json +0 -13
- package/plugins/msgpack/package-lock.json +0 -134
- package/plugins/msgpack/package.json +0 -12
- package/tsconfig.test.json +0 -7
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
import { HttpBuilder, HttpBuilderOfT } from "@utiliread/http";
|
|
1
|
+
import { HttpBuilder, HttpBuilderOfT, Mapping } from "@utiliread/http";
|
|
2
2
|
import type {
|
|
3
3
|
InfinitePaginationResult,
|
|
4
4
|
PaginationResult,
|
|
5
|
-
} from "
|
|
5
|
+
} from "@utiliread/http";
|
|
6
6
|
import { deserialize, serialize } from "@utiliread/json";
|
|
7
|
-
import type { TypeOrMapper } from "../../../src/mapping";
|
|
8
|
-
import { getMapper, getNullableMapper } from "../../../src/mapping";
|
|
9
7
|
|
|
10
8
|
// https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation
|
|
11
9
|
declare module "@utiliread/http" {
|
|
12
10
|
interface HttpBuilder {
|
|
13
11
|
withJson(content: any): this;
|
|
14
12
|
|
|
15
|
-
expectJson<T>(typeOrMapper?: TypeOrMapper<T>): HttpBuilderOfT<T>;
|
|
16
|
-
expectJsonArray<T>(typeOrMapper: TypeOrMapper<T>): HttpBuilderOfT<T[]>;
|
|
13
|
+
expectJson<T>(typeOrMapper?: Mapping.TypeOrMapper<T>): HttpBuilderOfT<T>;
|
|
14
|
+
expectJsonArray<T>(typeOrMapper: Mapping.TypeOrMapper<T>): HttpBuilderOfT<T[]>;
|
|
17
15
|
expectJsonNullableArray<T>(
|
|
18
|
-
typeOrMapper: TypeOrMapper<T>
|
|
16
|
+
typeOrMapper: Mapping.TypeOrMapper<T>
|
|
19
17
|
): HttpBuilderOfT<(T | null)[]>;
|
|
20
18
|
expectJsonPaginationResult<T>(
|
|
21
|
-
typeOrMapper: TypeOrMapper<T>
|
|
19
|
+
typeOrMapper: Mapping.TypeOrMapper<T>
|
|
22
20
|
): HttpBuilderOfT<PaginationResult<T>>;
|
|
23
21
|
expectJsonInfinitePaginationResult<T>(
|
|
24
|
-
typeOrMapper: TypeOrMapper<T>
|
|
22
|
+
typeOrMapper: Mapping.TypeOrMapper<T>
|
|
25
23
|
): HttpBuilderOfT<InfinitePaginationResult<T>>;
|
|
26
24
|
}
|
|
27
25
|
interface HttpBuilderOfT<T> {
|
|
@@ -46,24 +44,24 @@ HttpBuilderOfT.prototype.withJson = function <T>(
|
|
|
46
44
|
|
|
47
45
|
HttpBuilder.prototype.expectJson = function <T>(
|
|
48
46
|
this: HttpBuilder,
|
|
49
|
-
typeOrMapper?: TypeOrMapper<T>
|
|
47
|
+
typeOrMapper?: Mapping.TypeOrMapper<T>
|
|
50
48
|
) {
|
|
51
49
|
this.message.headers.set("Accept", "application/json");
|
|
52
50
|
return this.useHandler((response) => {
|
|
53
51
|
return response.rawResponse
|
|
54
52
|
.json()
|
|
55
|
-
.then((x) => getMapper(deserialize, typeOrMapper)(x));
|
|
53
|
+
.then((x) => Mapping.getMapper(deserialize, typeOrMapper)(x));
|
|
56
54
|
});
|
|
57
55
|
};
|
|
58
56
|
|
|
59
57
|
HttpBuilder.prototype.expectJsonArray = function <T>(
|
|
60
58
|
this: HttpBuilder,
|
|
61
|
-
typeOrMapper: TypeOrMapper<T>
|
|
59
|
+
typeOrMapper: Mapping.TypeOrMapper<T>
|
|
62
60
|
) {
|
|
63
61
|
this.message.headers.set("Accept", "application/json");
|
|
64
62
|
return this.useHandler((response) => {
|
|
65
63
|
return response.rawResponse.json().then((x: any[]) => {
|
|
66
|
-
const itemFactory = getMapper(deserialize, typeOrMapper);
|
|
64
|
+
const itemFactory = Mapping.getMapper(deserialize, typeOrMapper);
|
|
67
65
|
return x.map(itemFactory);
|
|
68
66
|
});
|
|
69
67
|
});
|
|
@@ -71,12 +69,12 @@ HttpBuilder.prototype.expectJsonArray = function <T>(
|
|
|
71
69
|
|
|
72
70
|
HttpBuilder.prototype.expectJsonNullableArray = function <T>(
|
|
73
71
|
this: HttpBuilder,
|
|
74
|
-
typeOrMapper: TypeOrMapper<T>
|
|
72
|
+
typeOrMapper: Mapping.TypeOrMapper<T>
|
|
75
73
|
): HttpBuilderOfT<(T | null)[]> {
|
|
76
74
|
this.message.headers.set("Accept", "application/json");
|
|
77
75
|
return this.useHandler((response) => {
|
|
78
76
|
return response.rawResponse.json().then((x: any[]) => {
|
|
79
|
-
const itemFactory = getNullableMapper(deserialize, typeOrMapper);
|
|
77
|
+
const itemFactory = Mapping.getNullableMapper(deserialize, typeOrMapper);
|
|
80
78
|
return x.map(itemFactory);
|
|
81
79
|
});
|
|
82
80
|
});
|
|
@@ -84,12 +82,12 @@ HttpBuilder.prototype.expectJsonNullableArray = function <T>(
|
|
|
84
82
|
|
|
85
83
|
HttpBuilder.prototype.expectJsonPaginationResult = function <T>(
|
|
86
84
|
this: HttpBuilder,
|
|
87
|
-
typeOrMapper: TypeOrMapper<T>
|
|
85
|
+
typeOrMapper: Mapping.TypeOrMapper<T>
|
|
88
86
|
) {
|
|
89
87
|
this.message.headers.set("Accept", "application/json");
|
|
90
88
|
return this.useHandler((response) => {
|
|
91
89
|
return response.rawResponse.json().then((x: PaginationResult<any>) => {
|
|
92
|
-
const itemFactory = getMapper(deserialize, typeOrMapper);
|
|
90
|
+
const itemFactory = Mapping.getMapper(deserialize, typeOrMapper);
|
|
93
91
|
return {
|
|
94
92
|
meta: {
|
|
95
93
|
pageCount: x.meta.pageCount,
|
|
@@ -104,14 +102,14 @@ HttpBuilder.prototype.expectJsonPaginationResult = function <T>(
|
|
|
104
102
|
|
|
105
103
|
HttpBuilder.prototype.expectJsonInfinitePaginationResult = function <T>(
|
|
106
104
|
this: HttpBuilder,
|
|
107
|
-
typeOrMapper: TypeOrMapper<T>
|
|
105
|
+
typeOrMapper: Mapping.TypeOrMapper<T>
|
|
108
106
|
) {
|
|
109
107
|
this.message.headers.set("Accept", "application/json");
|
|
110
108
|
return this.useHandler((response) => {
|
|
111
109
|
return response.rawResponse
|
|
112
110
|
.json()
|
|
113
111
|
.then((x: InfinitePaginationResult<any>) => {
|
|
114
|
-
const itemFactory = getMapper(deserialize, typeOrMapper);
|
|
112
|
+
const itemFactory = Mapping.getMapper(deserialize, typeOrMapper);
|
|
115
113
|
return {
|
|
116
114
|
meta: {
|
|
117
115
|
pageSize: x.meta.pageSize,
|
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { HttpBuilder, HttpBuilderOfT, HttpResponse } from "@utiliread/http";
|
|
1
|
+
import { HttpBuilder, HttpBuilderOfT, HttpResponse, Mapping } from "@utiliread/http";
|
|
3
2
|
import { decodeArrayStream, decodeAsync } from "@msgpack/msgpack";
|
|
4
|
-
|
|
5
|
-
import {
|
|
3
|
+
|
|
4
|
+
import { deserialize } from "@utiliread/msgpack";
|
|
6
5
|
|
|
7
6
|
// https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation
|
|
8
7
|
declare module "@utiliread/http" {
|
|
9
8
|
interface HttpBuilder {
|
|
10
|
-
expectMessagePack<T>(typeOrMapper?: TypeOrMapper<T>): HttpBuilderOfT<T>;
|
|
9
|
+
expectMessagePack<T>(typeOrMapper?: Mapping.TypeOrMapper<T>): HttpBuilderOfT<T>;
|
|
11
10
|
expectMessagePackArray<T>(
|
|
12
|
-
typeOrMapper?: TypeOrMapper<T>
|
|
11
|
+
typeOrMapper?: Mapping.TypeOrMapper<T>
|
|
13
12
|
): HttpBuilderOfT<T[]>;
|
|
14
13
|
streamMessagePackArray<T>(
|
|
15
|
-
typeOrMapper?: TypeOrMapper<T>
|
|
14
|
+
typeOrMapper?: Mapping.TypeOrMapper<T>
|
|
16
15
|
): HttpBuilderOfT<AsyncGenerator<T, void, unknown>>;
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
HttpBuilder.prototype.expectMessagePack = function <T>(
|
|
21
20
|
this: HttpBuilder,
|
|
22
|
-
typeOrMapper?: TypeOrMapper<T>
|
|
21
|
+
typeOrMapper?: Mapping.TypeOrMapper<T>
|
|
23
22
|
) {
|
|
24
23
|
this.message.headers.set("Accept", "application/x-msgpack");
|
|
25
24
|
return this.useHandler(async (response) => {
|
|
26
|
-
const itemFactory = getMapper(deserialize, typeOrMapper);
|
|
25
|
+
const itemFactory = Mapping.getMapper(deserialize, typeOrMapper);
|
|
27
26
|
const decoded = await decodeAsync(response.rawResponse.body!);
|
|
28
27
|
return itemFactory(decoded);
|
|
29
28
|
});
|
|
@@ -31,12 +30,12 @@ HttpBuilder.prototype.expectMessagePack = function <T>(
|
|
|
31
30
|
|
|
32
31
|
HttpBuilder.prototype.expectMessagePackArray = function <T>(
|
|
33
32
|
this: HttpBuilder,
|
|
34
|
-
typeOrMapper?: TypeOrMapper<T>
|
|
33
|
+
typeOrMapper?: Mapping.TypeOrMapper<T>
|
|
35
34
|
) {
|
|
36
35
|
this.message.headers.set("Accept", "application/x-msgpack");
|
|
37
36
|
return this.useHandler(async (response) => {
|
|
38
37
|
const items: T[] = [];
|
|
39
|
-
const itemFactory = getMapper(deserialize, typeOrMapper);
|
|
38
|
+
const itemFactory = Mapping.getMapper(deserialize, typeOrMapper);
|
|
40
39
|
for await (const item of decodeArrayStream(response.rawResponse.body!)) {
|
|
41
40
|
items.push(itemFactory(item));
|
|
42
41
|
}
|
|
@@ -46,12 +45,12 @@ HttpBuilder.prototype.expectMessagePackArray = function <T>(
|
|
|
46
45
|
|
|
47
46
|
HttpBuilder.prototype.streamMessagePackArray = function <T>(
|
|
48
47
|
this: HttpBuilder,
|
|
49
|
-
typeOrMapper?: TypeOrMapper<T>
|
|
48
|
+
typeOrMapper?: Mapping.TypeOrMapper<T>
|
|
50
49
|
) {
|
|
51
50
|
this.message.headers.set("Accept", "application/x-msgpack");
|
|
52
51
|
|
|
53
52
|
async function* handler(response: HttpResponse) {
|
|
54
|
-
const itemFactory = getMapper(deserialize, typeOrMapper);
|
|
53
|
+
const itemFactory = Mapping.getMapper(deserialize, typeOrMapper);
|
|
55
54
|
for await (const item of decodeArrayStream(response.rawResponse.body!)) {
|
|
56
55
|
yield itemFactory(item);
|
|
57
56
|
}
|
package/src/index.ts
CHANGED
package/src/mapping.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare type DeserializeFn<T> = (source: any, type: Type<T>) => T | null | undefined;
|
|
2
|
+
export declare type Type<T> = {
|
|
3
|
+
new (): T;
|
|
4
|
+
};
|
|
5
|
+
export declare type Mapper<T> = ((source: any) => T);
|
|
6
|
+
export declare type TypeOrMapper<T> = Type<T> | Mapper<T>;
|
|
7
|
+
export declare function getNullableMapper<T>(deserialize: DeserializeFn<T>, typeOrMap: Type<T> | Mapper<T> | undefined): Mapper<T | null>;
|
|
8
|
+
export declare function getMapper<T>(deserialize: DeserializeFn<T>, typeOrMap: Type<T> | Mapper<T> | undefined): Mapper<T>;
|
|
9
|
+
export {};
|
package/src/mapping.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export function getNullableMapper(deserialize, typeOrMap) {
|
|
2
|
+
if (!typeOrMap) {
|
|
3
|
+
return (x) => x;
|
|
4
|
+
}
|
|
5
|
+
if (isZeroArgumentFunction(typeOrMap)) {
|
|
6
|
+
// It cannot be a factory function if it takes no arguments,
|
|
7
|
+
// so it must be a (zero argument) type (constructor)
|
|
8
|
+
return (x) => {
|
|
9
|
+
const bound = deserialize(x, typeOrMap);
|
|
10
|
+
// The server cannot produce the undefined result
|
|
11
|
+
if (bound === undefined) {
|
|
12
|
+
throw Error("The model factory created a undefined result");
|
|
13
|
+
}
|
|
14
|
+
return bound;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
return typeOrMap;
|
|
18
|
+
}
|
|
19
|
+
export function getMapper(deserialize, typeOrMap) {
|
|
20
|
+
const nullableFactory = getNullableMapper(deserialize, typeOrMap);
|
|
21
|
+
return (x) => {
|
|
22
|
+
const result = nullableFactory(x);
|
|
23
|
+
if (result === null) {
|
|
24
|
+
throw Error("The model factory created a null result");
|
|
25
|
+
}
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function isZeroArgumentFunction(typeCtor) {
|
|
30
|
+
return typeCtor.length === 0;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=mapping.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapping.js","sourceRoot":"","sources":["mapping.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,iBAAiB,CAAI,WAA6B,EAAE,SAA0C;IAC1G,IAAI,CAAC,SAAS,EAAE;QACZ,OAAO,CAAC,CAAM,EAAE,EAAE,CAAI,CAAC,CAAC;KAC3B;IAED,IAAI,sBAAsB,CAAC,SAAS,CAAC,EAAE;QACnC,4DAA4D;QAC5D,qDAAqD;QACrD,OAAO,CAAC,CAAM,EAAE,EAAE;YACd,MAAM,KAAK,GAAG,WAAW,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;YAExC,iDAAiD;YACjD,IAAI,KAAK,KAAK,SAAS,EAAE;gBACrB,MAAM,KAAK,CAAC,8CAA8C,CAAC,CAAC;aAC/D;YAED,OAAO,KAAK,CAAC;QACjB,CAAC,CAAA;KACJ;IAED,OAAO,SAAS,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,SAAS,CAAI,WAA6B,EAAE,SAA0C;IAClG,MAAM,eAAe,GAAG,iBAAiB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IAClE,OAAO,CAAC,CAAM,EAAE,EAAE;QACd,MAAM,MAAM,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;QAElC,IAAI,MAAM,KAAK,IAAI,EAAE;YACjB,MAAM,KAAK,CAAC,yCAAyC,CAAC,CAAC;SAC1D;QAED,OAAO,MAAM,CAAC;IAClB,CAAC,CAAC;AACN,CAAC;AAED,SAAS,sBAAsB,CAAI,QAAkB;IACjD,OAAO,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC;AACjC,CAAC"}
|
package/tsconfig.json
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"target": "ES2018",
|
|
4
|
+
"module": "ESNext",
|
|
4
5
|
"moduleResolution": "Node",
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"sourceMap": true,
|
|
5
8
|
"strict": true,
|
|
6
9
|
"stripInternal": true,
|
|
7
|
-
"
|
|
8
|
-
"
|
|
10
|
+
"rootDir": "src",
|
|
11
|
+
"outDir": "dist/esm",
|
|
12
|
+
"lib": ["ES2018", "DOM"],
|
|
13
|
+
"types": ["mocha"]
|
|
9
14
|
},
|
|
10
|
-
"
|
|
15
|
+
"include": [
|
|
16
|
+
"src/**/*.ts"
|
|
17
|
+
],
|
|
18
|
+
"exclude": [
|
|
19
|
+
"./*.d.ts"
|
|
20
|
+
]
|
|
11
21
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
export interface Subscription {
|
|
2
|
-
dispose(): void;
|
|
3
|
-
}
|
|
4
|
-
export type ProblemDetails = {
|
|
5
|
-
detail?: string;
|
|
6
|
-
instance?: string;
|
|
7
|
-
status?: number;
|
|
8
|
-
title?: string;
|
|
9
|
-
type: string;
|
|
10
|
-
} & Record<string, any>;
|
|
11
|
-
export class HttpError extends Error {
|
|
12
|
-
statusCode: number;
|
|
13
|
-
get hasDetails(): boolean | undefined;
|
|
14
|
-
constructor(statusCode: number, response?: HttpResponse | undefined);
|
|
15
|
-
details<TDetails = ProblemDetails>(): Promise<TDetails>;
|
|
16
|
-
}
|
|
17
|
-
export class HttpResponse {
|
|
18
|
-
rawResponse: Response;
|
|
19
|
-
get url(): string;
|
|
20
|
-
get statusCode(): number;
|
|
21
|
-
get headers(): Headers;
|
|
22
|
-
get isInformational(): boolean;
|
|
23
|
-
get isSuccessful(): boolean;
|
|
24
|
-
get isRedirection(): boolean;
|
|
25
|
-
get isClientError(): boolean;
|
|
26
|
-
get isServerError(): boolean;
|
|
27
|
-
constructor(rawResponse: Response);
|
|
28
|
-
ensureSuccessfulStatusCode(): this;
|
|
29
|
-
}
|
|
30
|
-
export class HttpResponseOfT<T> extends HttpResponse {
|
|
31
|
-
constructor(rawResponse: Response, handler: (response: HttpResponse) => Promise<T>);
|
|
32
|
-
receive(): Promise<T>;
|
|
33
|
-
}
|
|
34
|
-
export class TimeoutError extends Error {
|
|
35
|
-
constructor();
|
|
36
|
-
}
|
|
37
|
-
export class HttpBuilder {
|
|
38
|
-
message: Message;
|
|
39
|
-
options: RequestOptions;
|
|
40
|
-
constructor(message: Message, options: RequestOptions, /** @internal */ http: Http);
|
|
41
|
-
onSend(callback: (request: Message) => void | Promise<void>): this;
|
|
42
|
-
onSent(callback: (response: HttpResponse, request: Message) => void | Promise<void>): this;
|
|
43
|
-
useHandler<T>(handler: (response: HttpResponse) => Promise<T>): HttpBuilderOfT<T>;
|
|
44
|
-
send(abortSignal?: AbortSignal): Promise<HttpResponse>;
|
|
45
|
-
getUrl(): string;
|
|
46
|
-
ensureSuccessStatusCode(ensureSuccessStatusCode?: boolean): this;
|
|
47
|
-
useCors(mode: RequestMode): this;
|
|
48
|
-
useTimeout(timeout: number | null): this;
|
|
49
|
-
with(content: any, contentType?: string): this;
|
|
50
|
-
withForm(content: FormData): this;
|
|
51
|
-
addHeader(name: string, value: string): this;
|
|
52
|
-
expectString(): HttpBuilderOfT<string>;
|
|
53
|
-
expectBinary(): HttpBuilderOfT<ArrayBuffer>;
|
|
54
|
-
}
|
|
55
|
-
export class HttpBuilderOfT<T> extends HttpBuilder {
|
|
56
|
-
constructor(inner: HttpBuilder, handler: (response: HttpResponse) => Promise<T>);
|
|
57
|
-
onSend(callback: (request: Message) => void | Promise<void>): this;
|
|
58
|
-
onSent(callback: (response: HttpResponse, request: Message) => void | Promise<void>): this;
|
|
59
|
-
ensureSuccessStatusCode(ensureSuccessStatusCode?: boolean): this;
|
|
60
|
-
useCors(mode: RequestMode): this;
|
|
61
|
-
useTimeout(timeout: number): this;
|
|
62
|
-
allowEmptyResponse(): HttpBuilderOfT<T | null>;
|
|
63
|
-
onReceived(callback: (response: HttpResponseOfT<T>, request: Message, value: T) => void | Promise<void>): this;
|
|
64
|
-
send(abortSignal?: AbortSignal): SendPromise<T>;
|
|
65
|
-
transfer(abortSignal?: AbortSignal): Promise<T>;
|
|
66
|
-
}
|
|
67
|
-
type HttpMethod = "HEAD" | "POST" | "GET" | "PUT" | "PATCH" | "DELETE";
|
|
68
|
-
export interface Message {
|
|
69
|
-
method: HttpMethod;
|
|
70
|
-
url: string;
|
|
71
|
-
headers: Headers;
|
|
72
|
-
content?: any;
|
|
73
|
-
contentType?: string;
|
|
74
|
-
mode?: RequestMode;
|
|
75
|
-
properties: {
|
|
76
|
-
[key: string]: any;
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
interface RequestOptions {
|
|
80
|
-
fetch: Fetch;
|
|
81
|
-
timeout?: number;
|
|
82
|
-
baseUrl?: string;
|
|
83
|
-
}
|
|
84
|
-
interface SendPromise<T> extends Promise<HttpResponseOfT<T>> {
|
|
85
|
-
thenReceive(): Promise<T>;
|
|
86
|
-
}
|
|
87
|
-
export class QueryString {
|
|
88
|
-
static serialize(params: any): string;
|
|
89
|
-
static append(url: string, params: any): string;
|
|
90
|
-
static getParameter(name: string): string | null | undefined;
|
|
91
|
-
}
|
|
92
|
-
export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
93
|
-
export class Http {
|
|
94
|
-
static defaults: HttpOptions;
|
|
95
|
-
options: HttpOptions;
|
|
96
|
-
constructor(options?: Partial<HttpOptions>);
|
|
97
|
-
static request(method: HttpMethod, url: string, params?: any): HttpBuilder;
|
|
98
|
-
static head(url: string, params?: any): HttpBuilder;
|
|
99
|
-
static post(url: string, params?: any): HttpBuilder;
|
|
100
|
-
static get(url: string, params?: any): HttpBuilder;
|
|
101
|
-
static put(url: string, params?: any): HttpBuilder;
|
|
102
|
-
static patch(url: string, params?: any): HttpBuilder;
|
|
103
|
-
static delete(url: string, params?: any): HttpBuilder;
|
|
104
|
-
request(method: HttpMethod, url: string, params?: any): HttpBuilder;
|
|
105
|
-
head(url: string, params?: any): HttpBuilder;
|
|
106
|
-
post(url: string, params?: any): HttpBuilder;
|
|
107
|
-
get(url: string, params?: any): HttpBuilder;
|
|
108
|
-
put(url: string, params?: any): HttpBuilder;
|
|
109
|
-
patch(url: string, params?: any): HttpBuilder;
|
|
110
|
-
delete(url: string, params?: any): HttpBuilder;
|
|
111
|
-
onSend(callback: (request: Message) => void | Promise<void>): Subscription;
|
|
112
|
-
onSent(callback: (response: HttpResponse, request: Message) => void | Promise<void>): Subscription;
|
|
113
|
-
onReceived(callback: (response: HttpResponseOfT<any>, request: Message, value: any) => void | Promise<void>): Subscription;
|
|
114
|
-
}
|
|
115
|
-
interface HttpOptions {
|
|
116
|
-
fetch?: Fetch;
|
|
117
|
-
timeout?: number;
|
|
118
|
-
baseUrl?: string;
|
|
119
|
-
}
|
|
120
|
-
export interface Page {
|
|
121
|
-
number?: number;
|
|
122
|
-
size: number;
|
|
123
|
-
}
|
|
124
|
-
export interface PaginationResult<T> {
|
|
125
|
-
meta: {
|
|
126
|
-
pageCount: number;
|
|
127
|
-
pageSize: number;
|
|
128
|
-
totalItems: number;
|
|
129
|
-
};
|
|
130
|
-
data: T[];
|
|
131
|
-
}
|
|
132
|
-
export interface InfinitePage {
|
|
133
|
-
continuationToken?: string;
|
|
134
|
-
size: number;
|
|
135
|
-
}
|
|
136
|
-
export interface InfinitePaginationResult<T> {
|
|
137
|
-
meta: {
|
|
138
|
-
pageSize: number;
|
|
139
|
-
continuationToken: string | null;
|
|
140
|
-
};
|
|
141
|
-
data: T[];
|
|
142
|
-
}
|
|
143
|
-
interface Events {
|
|
144
|
-
sent: (response: HttpResponse, request: Message) => void | Promise<void>;
|
|
145
|
-
}
|
|
146
|
-
interface EventsOfT<T> extends Events {
|
|
147
|
-
received: (response: HttpResponse, request: Message, value: T) => void | Promise<void>;
|
|
148
|
-
}
|
|
149
|
-
export function events<P extends any[]>(action: (...params: P) => HttpBuilder, configure: (...params: P) => Partial<Events>): (...params: P) => HttpBuilder;
|
|
150
|
-
export function events<B extends HttpBuilderOfT<T>, P extends any[], T>(action: (...params: P) => B, configure: (...params: P) => Partial<EventsOfT<T>>): (...params: P) => B;
|
|
151
|
-
export function isHttpError(error: Error): error is HttpError;
|
|
152
|
-
export function isAbortError(error: Error): boolean;
|
|
153
|
-
export function isTimeoutError(error: Error): error is TimeoutError;
|
|
154
|
-
export const statusCodes: Readonly<{
|
|
155
|
-
status100Continue: number;
|
|
156
|
-
status101SwitchingProtocols: number;
|
|
157
|
-
status102Processing: number;
|
|
158
|
-
status200OK: number;
|
|
159
|
-
status201Created: number;
|
|
160
|
-
status202Accepted: number;
|
|
161
|
-
status203NonAuthoritative: number;
|
|
162
|
-
status204NoContent: number;
|
|
163
|
-
status205ResetContent: number;
|
|
164
|
-
status206PartialContent: number;
|
|
165
|
-
status207MultiStatus: number;
|
|
166
|
-
status208AlreadyReported: number;
|
|
167
|
-
status226IMUsed: number;
|
|
168
|
-
status300MultipleChoices: number;
|
|
169
|
-
status301MovedPermanently: number;
|
|
170
|
-
status302Found: number;
|
|
171
|
-
status303SeeOther: number;
|
|
172
|
-
status304NotModified: number;
|
|
173
|
-
status305UseProxy: number;
|
|
174
|
-
status306SwitchProxy: number;
|
|
175
|
-
status307TemporaryRedirect: number;
|
|
176
|
-
status308PermanentRedirect: number;
|
|
177
|
-
status400BadRequest: number;
|
|
178
|
-
status401Unauthorized: number;
|
|
179
|
-
status402PaymentRequired: number;
|
|
180
|
-
status403Forbidden: number;
|
|
181
|
-
status404NotFound: number;
|
|
182
|
-
status405MethodNotAllowed: number;
|
|
183
|
-
status406NotAcceptable: number;
|
|
184
|
-
status407ProxyAuthenticationRequired: number;
|
|
185
|
-
status408RequestTimeout: number;
|
|
186
|
-
status409Conflict: number;
|
|
187
|
-
status410Gone: number;
|
|
188
|
-
status411LengthRequired: number;
|
|
189
|
-
status412PreconditionFailed: number;
|
|
190
|
-
status413RequestEntityTooLarge: number;
|
|
191
|
-
status413PayloadTooLarge: number;
|
|
192
|
-
status414RequestUriTooLong: number;
|
|
193
|
-
status414UriTooLong: number;
|
|
194
|
-
status415UnsupportedMediaType: number;
|
|
195
|
-
status416RequestedRangeNotSatisfiable: number;
|
|
196
|
-
status416RangeNotSatisfiable: number;
|
|
197
|
-
status417ExpectationFailed: number;
|
|
198
|
-
status418ImATeapot: number;
|
|
199
|
-
status419AuthenticationTimeout: number;
|
|
200
|
-
status421MisdirectedRequest: number;
|
|
201
|
-
status422UnprocessableEntity: number;
|
|
202
|
-
status423Locked: number;
|
|
203
|
-
status424FailedDependency: number;
|
|
204
|
-
status426UpgradeRequired: number;
|
|
205
|
-
status428PreconditionRequired: number;
|
|
206
|
-
status429TooManyRequests: number;
|
|
207
|
-
status431RequestHeaderFieldsTooLarge: number;
|
|
208
|
-
status451UnavailableForLegalReasons: number;
|
|
209
|
-
status500InternalServerError: number;
|
|
210
|
-
status501NotImplemented: number;
|
|
211
|
-
status502BadGateway: number;
|
|
212
|
-
status503ServiceUnavailable: number;
|
|
213
|
-
status504GatewayTimeout: number;
|
|
214
|
-
status505HttpVersionNotsupported: number;
|
|
215
|
-
status506VariantAlsoNegotiates: number;
|
|
216
|
-
status507InsufficientStorage: number;
|
|
217
|
-
status508LoopDetected: number;
|
|
218
|
-
status510NotExtended: number;
|
|
219
|
-
status511NetworkAuthenticationRequired: number;
|
|
220
|
-
}>;
|
|
221
|
-
type Type<T> = {
|
|
222
|
-
new (): T;
|
|
223
|
-
};
|
|
224
|
-
type Mapper<T> = ((source: any) => T);
|
|
225
|
-
export type TypeOrMapper<T> = Type<T> | Mapper<T>;
|
|
226
|
-
|
|
227
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AA6BA;IACI,O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K,OAAO,CAAC,MAAM,CAAC,GAC3C,CAAC,GAAG,MAAM,EAAE,CAAC,KAAK,WAAW,CAAC;AACjC,uBAAuB,CAAC,SAAS,eAAe,CAAC,CAAC,EAAE,CAAC,SAAS,GAAG,EAAE,EAAE,CAAC,EACpE,MAAM,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,EAC3B,SAAS,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,GACjD,CAAC,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC;ACnBvB,4BAA4B,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,SAAS,CAE5D;AAED,6BAA6B,KAAK,EAAE,KAAK,GAAG,OAAO,CAElD;AAED,+BAA+B,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,YAAY,CAElE;ACbD,OAAO,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkEX,CAAC;ACjEH,UAAiB,CAAC,IAAI;IAAE,QAAO,CAAC,CAAA;CAAE,CAAC;AACnC,YAAmB,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC;AAC7C,yBAAyB,CAAC,IAAI,KAAK,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC","sources":["src/src/event-aggregator.ts","src/src/problem-details.ts","src/src/http-error.ts","src/src/http-response.ts","src/src/timeout-error.ts","src/src/http-builder.ts","src/src/query-string.ts","src/src/http.ts","src/src/pagination.ts","src/src/events.ts","src/src/helpers.ts","src/src/status-codes.ts","src/src/mapping.ts","src/src/index.ts","src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,"export { Http } from \"./http\";\nexport type {\n Page,\n PaginationResult,\n InfinitePage,\n InfinitePaginationResult,\n} from \"./pagination\";\nexport type { ProblemDetails } from \"./problem-details\";\nexport { QueryString } from \"./query-string\";\nexport { HttpResponse, HttpResponseOfT } from \"./http-response\";\nexport { HttpBuilder, HttpBuilderOfT } from \"./http-builder\";\nexport type { Message } from \"./http-builder\";\nexport { HttpError } from \"./http-error\";\nexport { TimeoutError } from \"./timeout-error\";\nexport { events } from \"./events\";\nexport * from \"./helpers\";\nexport type { Fetch } from \"./http\";\nexport type { Subscription } from \"./event-aggregator\";\nexport { statusCodes } from \"./status-codes\";\nexport type { TypeOrMapper } from \"./mapping\";"],"names":[],"version":3,"file":"index.d.ts.map"}
|