File tree Expand file tree Collapse file tree 1 file changed +37
-6
lines changed Expand file tree Collapse file tree 1 file changed +37
-6
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,8 @@ export type METHODS =
105
105
| 'PATCH'
106
106
| 'DELETE'
107
107
| 'HEAD'
108
- | 'OPTIONS' ;
108
+ | 'OPTIONS'
109
+ | 'ANY' ;
109
110
110
111
export type LoggerFunction = ( message : string , ...args : any [ ] ) => void ;
111
112
@@ -126,14 +127,44 @@ export type HandlerFunction<
126
127
res : Response < TResponse >
127
128
) => void ;
128
129
130
+ export type TimestampFunction = ( ) => string ;
131
+
132
+ export declare interface SamplingOptions {
133
+ route ?: string ;
134
+ target ?: number ;
135
+ rate ?: number ;
136
+ period ?: number ;
137
+ method ?: string | string [ ] ;
138
+ }
139
+
140
+ export declare interface LoggerOptions {
141
+ access ?: boolean | string ;
142
+ customKey ?: string ;
143
+ errorLogging ?: boolean ;
144
+ detail ?: boolean ;
145
+ level ?: string ;
146
+ levels ?: {
147
+ [ key : string ] : string ;
148
+ } ;
149
+ messageKey ?: string ;
150
+ nested ?: boolean ;
151
+ timestamp ?: boolean | TimestampFunction ;
152
+ sampling ?: {
153
+ target ?: number ;
154
+ rate ?: number ;
155
+ period ?: number ;
156
+ rules ?: SamplingOptions [ ] ;
157
+ } ;
158
+ serializers ?: {
159
+ [ name : string ] : ( prop : any ) => any ;
160
+ } ;
161
+ stack ?: boolean ;
162
+ }
163
+
129
164
export interface Options {
130
165
base ?: string ;
131
166
callbackName ?: string ;
132
- logger ?: {
133
- level ?: string ;
134
- format ?: string ;
135
- [ key : string ] : any ;
136
- } ;
167
+ logger ?: boolean | LoggerOptions ;
137
168
mimeTypes ?: {
138
169
[ key : string ] : string ;
139
170
} ;
You can’t perform that action at this time.
0 commit comments