@tramvai/tokens-server 2.0.7 → 2.2.2

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 +18 -18
  2. package/package.json +3 -3
package/lib/index.d.ts CHANGED
@@ -6,27 +6,27 @@ import type { Papi } from '@tramvai/papi';
6
6
  * @description
7
7
  * Specifies base url for public papi handlers. By default equals to `/[appName]/papi`
8
8
  */
9
- export declare const SERVER_MODULE_PAPI_PUBLIC_URL: string;
9
+ export declare const SERVER_MODULE_PAPI_PUBLIC_URL: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<string>;
10
10
  /**
11
11
  * @description
12
12
  * Specifies base url for private papi handlers. By default equals `/[appName]/private/papi`
13
13
  */
14
- export declare const SERVER_MODULE_PAPI_PRIVATE_URL: string;
14
+ export declare const SERVER_MODULE_PAPI_PRIVATE_URL: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<string>;
15
15
  /**
16
16
  * @description
17
17
  * Add private papi route
18
18
  */
19
- export declare const SERVER_MODULE_PAPI_PRIVATE_ROUTE: Papi<any, any>;
19
+ export declare const SERVER_MODULE_PAPI_PRIVATE_ROUTE: import("@tinkoff/dippy/lib/createToken/createToken").MultiTokenInterface<Papi<any, any>>;
20
20
  /**
21
21
  * @description
22
22
  * Add public papi route
23
23
  */
24
- export declare const SERVER_MODULE_PAPI_PUBLIC_ROUTE: Papi<any, any>;
24
+ export declare const SERVER_MODULE_PAPI_PUBLIC_ROUTE: import("@tinkoff/dippy/lib/createToken/createToken").MultiTokenInterface<Papi<any, any>>;
25
25
  /**
26
26
  * @description
27
27
  * Settings for the static server
28
28
  */
29
- export declare const SERVER_MODULE_STATICS_OPTIONS: ServerModuleStaticsOptions;
29
+ export declare const SERVER_MODULE_STATICS_OPTIONS: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<ServerModuleStaticsOptions>;
30
30
  /**
31
31
  * @description
32
32
  * Instance of nodejs `http.Server`.
@@ -48,7 +48,7 @@ export declare const SERVER_MODULE_STATICS_OPTIONS: ServerModuleStaticsOptions;
48
48
  },
49
49
  ```
50
50
  */
51
- export declare const SERVER_TOKEN: Server;
51
+ export declare const SERVER_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<Server>;
52
52
  /**
53
53
  * @deprecated Prefer not to use such low-level entity as it may change in the future or will be dropped.
54
54
  * @description
@@ -71,7 +71,7 @@ export declare const SERVER_TOKEN: Server;
71
71
  }
72
72
  ```
73
73
  */
74
- export declare const WEB_APP_TOKEN: Application;
74
+ export declare const WEB_APP_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<Application>;
75
75
  /**
76
76
  * @deprecated Prefer not to use such low-level entity as it may change in the future or will be dropped.
77
77
  * @description
@@ -88,7 +88,7 @@ export declare const WEB_APP_TOKEN: Application;
88
88
  }
89
89
  ```
90
90
  */
91
- export declare const WEB_APP_BEFORE_INIT_TOKEN: APP_INIT_HANDLER;
91
+ export declare const WEB_APP_BEFORE_INIT_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").MultiTokenInterface<APP_INIT_HANDLER>;
92
92
  /**
93
93
  * @deprecated Prefer not to use such low-level entity as it may change in the future or will be dropped.
94
94
  * @description
@@ -107,7 +107,7 @@ export declare const WEB_APP_BEFORE_INIT_TOKEN: APP_INIT_HANDLER;
107
107
  }
108
108
  ```
109
109
  */
110
- export declare const WEB_APP_INIT_TOKEN: APP_INIT_HANDLER;
110
+ export declare const WEB_APP_INIT_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").MultiTokenInterface<APP_INIT_HANDLER>;
111
111
  /**
112
112
  * @deprecated Prefer not to use such low-level entity as it may change in the future or will be dropped.
113
113
  * @description
@@ -124,7 +124,7 @@ export declare const WEB_APP_INIT_TOKEN: APP_INIT_HANDLER;
124
124
  }
125
125
  ```
126
126
  */
127
- export declare const WEB_APP_LIMITER_TOKEN: APP_INIT_HANDLER;
127
+ export declare const WEB_APP_LIMITER_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").MultiTokenInterface<APP_INIT_HANDLER>;
128
128
  /**
129
129
  * @deprecated Prefer not to use such low-level entity as it may change in the future or will be dropped.
130
130
  * @description
@@ -142,44 +142,44 @@ export declare const WEB_APP_LIMITER_TOKEN: APP_INIT_HANDLER;
142
142
  }
143
143
  ```
144
144
  */
145
- export declare const WEB_APP_AFTER_INIT_TOKEN: APP_INIT_HANDLER;
145
+ export declare const WEB_APP_AFTER_INIT_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").MultiTokenInterface<APP_INIT_HANDLER>;
146
146
  /**
147
147
  * @description
148
148
  * Add resources for request proxying to the app through `http-proxy-middleware`
149
149
  */
150
- export declare const PROXY_CONFIG_TOKEN: ProxyConfig[];
150
+ export declare const PROXY_CONFIG_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").MultiTokenInterface<ProxyConfig[]>;
151
151
  /**
152
152
  * @description
153
153
  * Override filter function when accessing papi route `/dependenciesVersion`
154
154
  */
155
- export declare const DEPENDENCIES_VERSION_FILTER_TOKEN: DepsFilter;
155
+ export declare const DEPENDENCIES_VERSION_FILTER_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<DepsFilter>;
156
156
  /**
157
157
  * @description
158
158
  * List of the utility URLs on server (e.g. healthz and readyz)
159
159
  * Url matching is happens with a library `path-to-regexp`.
160
160
  */
161
- export declare const UTILITY_SERVER_PATHS: string;
161
+ export declare const UTILITY_SERVER_PATHS: import("@tinkoff/dippy/lib/createToken/createToken").MultiTokenInterface<string>;
162
162
  /**
163
163
  * @description
164
164
  * Defines port to listen for utility routes
165
165
  */
166
- export declare const UTILITY_SERVER_PORT_TOKEN: number;
166
+ export declare const UTILITY_SERVER_PORT_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<number>;
167
167
  /**
168
168
  * @description
169
169
  * Custom function for k8s readiness, you might want to wait for something before allowing traffic to your app\
170
170
  * https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
171
171
  */
172
- export declare const READINESS_PROBE_TOKEN: () => Promise<any>;
172
+ export declare const READINESS_PROBE_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<() => Promise<any>>;
173
173
  /**
174
174
  * @description
175
175
  * Custom function for k8s liveness, a function accepting a state and returning a promise indicating service health\
176
176
  * https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
177
177
  */
178
- export declare const LIVENESS_PROBE_TOKEN: () => Promise<any>;
178
+ export declare const LIVENESS_PROBE_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<() => Promise<any>>;
179
179
  export interface ServerModuleStaticsOptions {
180
180
  path: string;
181
181
  }
182
- export declare type APP_INIT_HANDLER = Array<(app?: Application) => Promise<never> | never>;
182
+ export declare type APP_INIT_HANDLER = (app?: Application) => Promise<void> | void;
183
183
  export declare type ProxyConfig = {
184
184
  [key: string]: string | {
185
185
  target: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/tokens-server",
3
- "version": "2.0.7",
3
+ "version": "2.2.2",
4
4
  "description": "Tramvai tokens for @tramvai/module-server",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.es.js",
@@ -19,10 +19,10 @@
19
19
  "build-for-publish": "true"
20
20
  },
21
21
  "dependencies": {
22
- "@tramvai/papi": "2.0.7"
22
+ "@tramvai/papi": "2.2.2"
23
23
  },
24
24
  "peerDependencies": {
25
- "@tinkoff/dippy": "0.7.42",
25
+ "@tinkoff/dippy": "0.7.43",
26
26
  "express": "^4.17.1",
27
27
  "fastify": "^3.29.0",
28
28
  "tslib": "^2.0.3"