@tramvai/tokens-http-client 2.91.1 → 2.92.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/lib/index.d.ts +8 -1
- package/lib/index.es.js +6 -1
- package/lib/index.js +6 -0
- package/package.json +3 -3
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BaseHttpClient, HttpClient } from '@tramvai/http-client';
|
|
1
|
+
import type { BaseHttpClient, HttpClient, HttpClientInterceptor } from '@tramvai/http-client';
|
|
2
2
|
import type { TinkoffRequestOptions, Agent } from '@tramvai/tinkoff-request-http-client-adapter';
|
|
3
3
|
export type HttpClientFactoryOptions = TinkoffRequestOptions & {
|
|
4
4
|
name: string;
|
|
@@ -17,6 +17,13 @@ export declare const HTTP_CLIENT_FACTORY: ((options: HttpClientFactoryOptions) =
|
|
|
17
17
|
export declare const DEFAULT_HTTP_CLIENT_FACTORY_OPTIONS: Partial<HttpClientFactoryOptions> & {
|
|
18
18
|
__type?: "base token" | undefined;
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* @description
|
|
22
|
+
* Interceptors will be added to default options for factory of HTTP clients
|
|
23
|
+
*/
|
|
24
|
+
export declare const DEFAULT_HTTP_CLIENT_INTERCEPTORS: HttpClientInterceptor & {
|
|
25
|
+
__type?: "multi token" | undefined;
|
|
26
|
+
};
|
|
20
27
|
/**
|
|
21
28
|
* @description
|
|
22
29
|
* Universal HTTP client for arbitrary requests
|
package/lib/index.es.js
CHANGED
|
@@ -10,6 +10,11 @@ const HTTP_CLIENT_FACTORY = createToken('HTTP_CLIENT_FACTORY');
|
|
|
10
10
|
* Default options for factory of HTTP clients
|
|
11
11
|
*/
|
|
12
12
|
const DEFAULT_HTTP_CLIENT_FACTORY_OPTIONS = createToken('DEFAULT_HTTP_CLIENT_FACTORY_OPTIONS');
|
|
13
|
+
/**
|
|
14
|
+
* @description
|
|
15
|
+
* Interceptors will be added to default options for factory of HTTP clients
|
|
16
|
+
*/
|
|
17
|
+
const DEFAULT_HTTP_CLIENT_INTERCEPTORS = createToken('DEFAULT_HTTP_CLIENT_INTERCEPTORS', { multi: true });
|
|
13
18
|
/**
|
|
14
19
|
* @description
|
|
15
20
|
* Universal HTTP client for arbitrary requests
|
|
@@ -40,4 +45,4 @@ const PAPI_SERVICE = createToken('papi service');
|
|
|
40
45
|
*/
|
|
41
46
|
const DISABLE_CIRCUIT_BREAKER = createToken('disable circuit breaker');
|
|
42
47
|
|
|
43
|
-
export { API_CLIENT_PASS_HEADERS, DEFAULT_HTTP_CLIENT_FACTORY_OPTIONS, DISABLE_CIRCUIT_BREAKER, HTTP_CLIENT, HTTP_CLIENT_AGENT, HTTP_CLIENT_FACTORY, PAPI_SERVICE };
|
|
48
|
+
export { API_CLIENT_PASS_HEADERS, DEFAULT_HTTP_CLIENT_FACTORY_OPTIONS, DEFAULT_HTTP_CLIENT_INTERCEPTORS, DISABLE_CIRCUIT_BREAKER, HTTP_CLIENT, HTTP_CLIENT_AGENT, HTTP_CLIENT_FACTORY, PAPI_SERVICE };
|
package/lib/index.js
CHANGED
|
@@ -14,6 +14,11 @@ const HTTP_CLIENT_FACTORY = dippy.createToken('HTTP_CLIENT_FACTORY');
|
|
|
14
14
|
* Default options for factory of HTTP clients
|
|
15
15
|
*/
|
|
16
16
|
const DEFAULT_HTTP_CLIENT_FACTORY_OPTIONS = dippy.createToken('DEFAULT_HTTP_CLIENT_FACTORY_OPTIONS');
|
|
17
|
+
/**
|
|
18
|
+
* @description
|
|
19
|
+
* Interceptors will be added to default options for factory of HTTP clients
|
|
20
|
+
*/
|
|
21
|
+
const DEFAULT_HTTP_CLIENT_INTERCEPTORS = dippy.createToken('DEFAULT_HTTP_CLIENT_INTERCEPTORS', { multi: true });
|
|
17
22
|
/**
|
|
18
23
|
* @description
|
|
19
24
|
* Universal HTTP client for arbitrary requests
|
|
@@ -46,6 +51,7 @@ const DISABLE_CIRCUIT_BREAKER = dippy.createToken('disable circuit breaker');
|
|
|
46
51
|
|
|
47
52
|
exports.API_CLIENT_PASS_HEADERS = API_CLIENT_PASS_HEADERS;
|
|
48
53
|
exports.DEFAULT_HTTP_CLIENT_FACTORY_OPTIONS = DEFAULT_HTTP_CLIENT_FACTORY_OPTIONS;
|
|
54
|
+
exports.DEFAULT_HTTP_CLIENT_INTERCEPTORS = DEFAULT_HTTP_CLIENT_INTERCEPTORS;
|
|
49
55
|
exports.DISABLE_CIRCUIT_BREAKER = DISABLE_CIRCUIT_BREAKER;
|
|
50
56
|
exports.HTTP_CLIENT = HTTP_CLIENT;
|
|
51
57
|
exports.HTTP_CLIENT_AGENT = HTTP_CLIENT_AGENT;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/tokens-http-client",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.92.0",
|
|
4
4
|
"initialVersion": "0.58.99",
|
|
5
5
|
"description": "Tramvai tokens for @tramvai/module-http-client",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"watch": "tsc -w"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@tramvai/http-client": "0.2.
|
|
23
|
-
"@tramvai/tinkoff-request-http-client-adapter": "0.9.
|
|
22
|
+
"@tramvai/http-client": "0.2.9",
|
|
23
|
+
"@tramvai/tinkoff-request-http-client-adapter": "0.9.233"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"@tinkoff/dippy": "0.8.15",
|