@tramvai/tokens-server-private 2.56.1 → 2.56.5
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 +51 -17
- package/package.json +3 -3
package/lib/index.d.ts
CHANGED
|
@@ -9,84 +9,118 @@ type FastifyRequest = OriginalFastifyRequest & {
|
|
|
9
9
|
* @description
|
|
10
10
|
* Direct reference to request object
|
|
11
11
|
*/
|
|
12
|
-
export declare const FASTIFY_REQUEST: import("
|
|
12
|
+
export declare const FASTIFY_REQUEST: OriginalFastifyRequest<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown, import("fastify").FastifyBaseLogger, import("fastify/types/type-provider").ResolveFastifyRequestType<import("fastify").FastifyTypeProviderDefault, import("fastify").FastifySchema, import("fastify").RouteGenericInterface>> & {
|
|
13
|
+
cookies: Record<string, string>;
|
|
14
|
+
} & {
|
|
15
|
+
__type?: "base token" | undefined;
|
|
16
|
+
};
|
|
13
17
|
/**
|
|
14
18
|
* @description
|
|
15
19
|
* Direct reference to response object
|
|
16
20
|
*/
|
|
17
|
-
export declare const FASTIFY_RESPONSE:
|
|
21
|
+
export declare const FASTIFY_RESPONSE: FastifyReply<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify").RouteGenericInterface, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown> & {
|
|
22
|
+
__type?: "base token" | undefined;
|
|
23
|
+
};
|
|
18
24
|
/**
|
|
19
25
|
* @description
|
|
20
26
|
* Creates new server instance
|
|
21
27
|
*/
|
|
22
|
-
export declare const SERVER_FACTORY_TOKEN:
|
|
28
|
+
export declare const SERVER_FACTORY_TOKEN: (() => Server) & {
|
|
29
|
+
__type?: "base token" | undefined;
|
|
30
|
+
};
|
|
23
31
|
/**
|
|
24
32
|
* @description
|
|
25
33
|
* Creates web-app instance
|
|
26
34
|
*/
|
|
27
|
-
export declare const WEB_FASTIFY_APP_FACTORY_TOKEN:
|
|
35
|
+
export declare const WEB_FASTIFY_APP_FACTORY_TOKEN: ((options: {
|
|
28
36
|
server: Server;
|
|
29
|
-
}) => FastifyInstance
|
|
37
|
+
}) => FastifyInstance) & {
|
|
38
|
+
__type?: "base token" | undefined;
|
|
39
|
+
};
|
|
30
40
|
/**
|
|
31
41
|
* @description
|
|
32
42
|
* Instance of the current fastify app that handles requests.
|
|
33
43
|
* Can be used to setup custom request handler and add custom routes
|
|
34
44
|
*/
|
|
35
|
-
export declare const WEB_FASTIFY_APP_TOKEN:
|
|
45
|
+
export declare const WEB_FASTIFY_APP_TOKEN: FastifyInstance<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify").FastifyBaseLogger, import("fastify").FastifyTypeProviderDefault> & {
|
|
46
|
+
__type?: "base token" | undefined;
|
|
47
|
+
};
|
|
36
48
|
/**
|
|
37
49
|
* @description
|
|
38
50
|
* Subscription to before web-app initialization. It is called before any standard handlers.
|
|
39
51
|
*/
|
|
40
|
-
export declare const WEB_FASTIFY_APP_BEFORE_INIT_TOKEN:
|
|
52
|
+
export declare const WEB_FASTIFY_APP_BEFORE_INIT_TOKEN: FASTIFY_APP_INIT_HANDLER & {
|
|
53
|
+
__type?: "multi token" | undefined;
|
|
54
|
+
};
|
|
41
55
|
/**
|
|
42
56
|
* @description
|
|
43
57
|
* Subscription to web-app initialization.
|
|
44
58
|
* It is called after global request handlers but before handlers for page rendering
|
|
45
59
|
*/
|
|
46
|
-
export declare const WEB_FASTIFY_APP_INIT_TOKEN:
|
|
60
|
+
export declare const WEB_FASTIFY_APP_INIT_TOKEN: FASTIFY_APP_INIT_HANDLER & {
|
|
61
|
+
__type?: "multi token" | undefined;
|
|
62
|
+
};
|
|
47
63
|
/**
|
|
48
64
|
* @description
|
|
49
65
|
* You can measure application requests duration.
|
|
50
66
|
*/
|
|
51
|
-
export declare const WEB_FASTIFY_APP_METRICS_TOKEN:
|
|
67
|
+
export declare const WEB_FASTIFY_APP_METRICS_TOKEN: FASTIFY_APP_INIT_HANDLER & {
|
|
68
|
+
__type?: "multi token" | undefined;
|
|
69
|
+
};
|
|
52
70
|
/**
|
|
53
71
|
* @description
|
|
54
72
|
* You can limit requests of application.
|
|
55
73
|
*/
|
|
56
|
-
export declare const WEB_FASTIFY_APP_LIMITER_TOKEN:
|
|
74
|
+
export declare const WEB_FASTIFY_APP_LIMITER_TOKEN: FASTIFY_APP_INIT_HANDLER & {
|
|
75
|
+
__type?: "multi token" | undefined;
|
|
76
|
+
};
|
|
57
77
|
/**
|
|
58
78
|
* @description
|
|
59
79
|
* Subscription to after web-app initialization.
|
|
60
80
|
* It is called after any other handlers
|
|
61
81
|
*/
|
|
62
|
-
export declare const WEB_FASTIFY_APP_AFTER_INIT_TOKEN:
|
|
82
|
+
export declare const WEB_FASTIFY_APP_AFTER_INIT_TOKEN: FASTIFY_APP_INIT_HANDLER & {
|
|
83
|
+
__type?: "multi token" | undefined;
|
|
84
|
+
};
|
|
63
85
|
/**
|
|
64
86
|
* @description
|
|
65
87
|
* Subscription to error handler before any default handlers.
|
|
66
88
|
*/
|
|
67
|
-
export declare const WEB_FASTIFY_APP_BEFORE_ERROR_TOKEN:
|
|
89
|
+
export declare const WEB_FASTIFY_APP_BEFORE_ERROR_TOKEN: FASTIFY_APP_ERROR_HANDLER & {
|
|
90
|
+
__type?: "multi token" | undefined;
|
|
91
|
+
};
|
|
68
92
|
/**
|
|
69
93
|
* @description
|
|
70
94
|
* Subscription to error handler.
|
|
71
95
|
*/
|
|
72
|
-
export declare const WEB_FASTIFY_APP_PROCESS_ERROR_TOKEN:
|
|
96
|
+
export declare const WEB_FASTIFY_APP_PROCESS_ERROR_TOKEN: FASTIFY_APP_ERROR_HANDLER & {
|
|
97
|
+
__type?: "multi token" | undefined;
|
|
98
|
+
};
|
|
73
99
|
/**
|
|
74
100
|
* @description
|
|
75
101
|
* Subscription to error handler after default handlers.
|
|
76
102
|
*/
|
|
77
|
-
export declare const WEB_FASTIFY_APP_AFTER_ERROR_TOKEN:
|
|
103
|
+
export declare const WEB_FASTIFY_APP_AFTER_ERROR_TOKEN: FASTIFY_APP_ERROR_HANDLER & {
|
|
104
|
+
__type?: "multi token" | undefined;
|
|
105
|
+
};
|
|
78
106
|
/**
|
|
79
107
|
* @description
|
|
80
108
|
* Http server for utility routes
|
|
81
109
|
*/
|
|
82
|
-
export declare const UTILITY_SERVER_TOKEN:
|
|
110
|
+
export declare const UTILITY_SERVER_TOKEN: Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse> & {
|
|
111
|
+
__type?: "base token" | undefined;
|
|
112
|
+
};
|
|
83
113
|
/**
|
|
84
114
|
* @description
|
|
85
115
|
* Web app for utility routes
|
|
86
116
|
*/
|
|
87
|
-
export declare const UTILITY_WEB_FASTIFY_APP_TOKEN:
|
|
117
|
+
export declare const UTILITY_WEB_FASTIFY_APP_TOKEN: FastifyInstance<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify").FastifyBaseLogger, import("fastify").FastifyTypeProviderDefault> & {
|
|
118
|
+
__type?: "base token" | undefined;
|
|
119
|
+
};
|
|
88
120
|
export type FASTIFY_APP_INIT_HANDLER = (app: FastifyInstance) => Promise<void> | void;
|
|
89
121
|
export type FASTIFY_APP_ERROR_HANDLER = (error: FastifyError, request: FastifyRequest, reply: FastifyReply) => Promise<string | undefined | void> | string | undefined | void;
|
|
90
122
|
export type PapiExecutor = <Result>(papi: Papi<Result>) => Result;
|
|
91
|
-
export declare const PAPI_EXECUTOR:
|
|
123
|
+
export declare const PAPI_EXECUTOR: PapiExecutor & {
|
|
124
|
+
__type?: "base token" | undefined;
|
|
125
|
+
};
|
|
92
126
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/tokens-server-private",
|
|
3
|
-
"version": "2.56.
|
|
3
|
+
"version": "2.56.5",
|
|
4
4
|
"description": "Tramvai private 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.56.
|
|
22
|
+
"@tramvai/papi": "2.56.5"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@tinkoff/dippy": "0.8.
|
|
25
|
+
"@tinkoff/dippy": "0.8.11",
|
|
26
26
|
"fastify": "^4.6.0",
|
|
27
27
|
"tslib": "^2.4.0"
|
|
28
28
|
},
|