@tramvai/tokens-http-client 2.56.2 → 2.59.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.
Files changed (2) hide show
  1. package/lib/index.d.ts +26 -8
  2. package/package.json +3 -3
package/lib/index.d.ts CHANGED
@@ -7,39 +7,57 @@ export type HttpClientFactoryOptions = TinkoffRequestOptions & {
7
7
  * @description
8
8
  * Factory of HTTP clients with minimal base settings
9
9
  */
10
- export declare const HTTP_CLIENT_FACTORY: import("@tinkoff/dippy").BaseTokenInterface<(options: HttpClientFactoryOptions) => HttpClient>;
10
+ export declare const HTTP_CLIENT_FACTORY: ((options: HttpClientFactoryOptions) => HttpClient) & {
11
+ __type?: "base token" | undefined;
12
+ };
11
13
  /**
12
14
  * @description
13
15
  * Default options for factory of HTTP clients
14
16
  */
15
- export declare const DEFAULT_HTTP_CLIENT_FACTORY_OPTIONS: import("@tinkoff/dippy").BaseTokenInterface<Partial<HttpClientFactoryOptions>>;
17
+ export declare const DEFAULT_HTTP_CLIENT_FACTORY_OPTIONS: Partial<HttpClientFactoryOptions> & {
18
+ __type?: "base token" | undefined;
19
+ };
16
20
  /**
17
21
  * @description
18
22
  * Universal HTTP client for arbitrary requests
19
23
  */
20
- export declare const HTTP_CLIENT: import("@tinkoff/dippy").BaseTokenInterface<HttpClient>;
24
+ export declare const HTTP_CLIENT: HttpClient & {
25
+ __type?: "base token" | undefined;
26
+ };
21
27
  /**
22
28
  * @description
23
29
  * Global HTTP and HTTPS agents for all clients
24
30
  * https://nodejs.org/dist/latest-v16.x/docs/api/http.html#class-httpagent
25
31
  */
26
- export declare const HTTP_CLIENT_AGENT: import("@tinkoff/dippy").BaseTokenInterface<{
32
+ export declare const HTTP_CLIENT_AGENT: {
27
33
  http: Agent;
28
34
  https: Agent;
29
- }>;
35
+ } & {
36
+ __type?: "base token" | undefined;
37
+ };
30
38
  /**
31
39
  * @description
32
40
  * List of HTTP headers that are proxied from app request to all of the backend API
33
41
  */
34
- export declare const API_CLIENT_PASS_HEADERS: import("@tinkoff/dippy").MultiTokenInterface<string | string[]>;
42
+ export declare const API_CLIENT_PASS_HEADERS: (string & {
43
+ __type?: "multi token" | undefined;
44
+ }) | (string[] & {
45
+ __type?: "multi token" | undefined;
46
+ });
35
47
  /**
36
48
  * @description
37
49
  * Internal api for app server.
38
50
  * Uses the value of `APP_INFO_TOKEN` from di for constructing the request address
39
51
  */
40
- export declare const PAPI_SERVICE: import("@tinkoff/dippy").BaseTokenInterface<BaseHttpClient<import("@tramvai/http-client").HttpClientRequest>>;
52
+ export declare const PAPI_SERVICE: BaseHttpClient<import("@tramvai/http-client").HttpClientRequest> & {
53
+ __type?: "base token" | undefined;
54
+ };
41
55
  /**
42
56
  * @description
43
57
  * Enable or disable circuit breaker
44
58
  */
45
- export declare const DISABLE_CIRCUIT_BREAKER: import("@tinkoff/dippy").BaseTokenInterface<boolean>;
59
+ export declare const DISABLE_CIRCUIT_BREAKER: (false & {
60
+ __type?: "base token" | undefined;
61
+ }) | (true & {
62
+ __type?: "base token" | undefined;
63
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/tokens-http-client",
3
- "version": "2.56.2",
3
+ "version": "2.59.0",
4
4
  "initialVersion": "0.58.99",
5
5
  "description": "Tramvai tokens for @tramvai/module-http-client",
6
6
  "main": "lib/index.js",
@@ -21,10 +21,10 @@
21
21
  },
22
22
  "devDependencies": {
23
23
  "@tramvai/http-client": "0.2.5",
24
- "@tramvai/tinkoff-request-http-client-adapter": "0.9.134"
24
+ "@tramvai/tinkoff-request-http-client-adapter": "0.9.140"
25
25
  },
26
26
  "peerDependencies": {
27
- "@tinkoff/dippy": "0.8.10",
27
+ "@tinkoff/dippy": "0.8.11",
28
28
  "tslib": "^2.4.0"
29
29
  },
30
30
  "license": "Apache-2.0"