@navios/core 0.1.5 → 0.1.7
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/dist/_tsup-dts-rollup.d.mts +1485 -0
- package/dist/_tsup-dts-rollup.d.ts +1485 -0
- package/dist/index.d.mts +134 -940
- package/dist/index.d.ts +134 -940
- package/dist/index.js +19 -1
- package/dist/index.mjs +19 -1
- package/package.json +4 -4
- package/src/__tests__/controller.spec.mts +2 -2
- package/src/decorators/endpoint.decorator.mts +1 -1
- package/src/navios.application.mts +17 -0
- package/src/services/module-loader.service.mts +5 -0
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
|
@@ -0,0 +1,1485 @@
|
|
|
1
|
+
import type { AnyZodObject } from 'zod';
|
|
2
|
+
import type { BaseEndpointConfig } from '@navios/common';
|
|
3
|
+
import type { EndpointFunctionArgs } from '@navios/common';
|
|
4
|
+
import { FastifyBaseLogger } from 'fastify';
|
|
5
|
+
import type { FastifyCorsOptions } from '@fastify/cors';
|
|
6
|
+
import type { FastifyInstance } from 'fastify';
|
|
7
|
+
import type { FastifyListenOptions } from 'fastify';
|
|
8
|
+
import type { FastifyReply } from 'fastify';
|
|
9
|
+
import type { FastifyRequest } from 'fastify';
|
|
10
|
+
import { FastifySchema } from 'fastify';
|
|
11
|
+
import type { FastifyServerOptions } from 'fastify';
|
|
12
|
+
import { FastifyTypeProviderDefault } from 'fastify';
|
|
13
|
+
import type { HttpHeader } from 'fastify/types/utils.js';
|
|
14
|
+
import type { HttpMethod } from '@navios/common';
|
|
15
|
+
import { IncomingMessage } from 'http';
|
|
16
|
+
import type { InspectOptions } from 'util';
|
|
17
|
+
import { LoggerInstance as LoggerInstance_2 } from '../logger/logger.service.mjs';
|
|
18
|
+
import type { output } from 'zod';
|
|
19
|
+
import { RawServerDefault } from 'fastify';
|
|
20
|
+
import { ResolveFastifyRequestType } from 'fastify/types/type-provider.js';
|
|
21
|
+
import { RouteGenericInterface } from 'fastify';
|
|
22
|
+
import { ServerResponse } from 'http';
|
|
23
|
+
import { z } from 'zod';
|
|
24
|
+
import { ZodOptional } from 'zod';
|
|
25
|
+
import type { ZodType } from 'zod';
|
|
26
|
+
|
|
27
|
+
declare const addLeadingSlash: (path?: string) => string;
|
|
28
|
+
export { addLeadingSlash }
|
|
29
|
+
export { addLeadingSlash as addLeadingSlash_alias_1 }
|
|
30
|
+
export { addLeadingSlash as addLeadingSlash_alias_2 }
|
|
31
|
+
export { addLeadingSlash as addLeadingSlash_alias_3 }
|
|
32
|
+
|
|
33
|
+
declare const Application: InjectionToken<FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTypeProviderDefault>, undefined>;
|
|
34
|
+
export { Application }
|
|
35
|
+
export { Application as Application_alias_1 }
|
|
36
|
+
export { Application as Application_alias_2 }
|
|
37
|
+
|
|
38
|
+
declare class AttributeFactory {
|
|
39
|
+
static createAttribute(token: symbol): ClassAttribute;
|
|
40
|
+
static createAttribute<T extends ZodType>(token: symbol, schema: T): ClassSchemaAttribute<T>;
|
|
41
|
+
static get(attribute: ClassAttribute, target: ModuleMetadata | ControllerMetadata | EndpointMetadata): true | null;
|
|
42
|
+
static get<T extends ZodType>(attribute: ClassSchemaAttribute<T>, target: ModuleMetadata | ControllerMetadata | EndpointMetadata): z.output<T> | null;
|
|
43
|
+
static getAll(attribute: ClassAttribute, target: ModuleMetadata | ControllerMetadata | EndpointMetadata): Array<true> | null;
|
|
44
|
+
static getAll<T extends ZodType>(attribute: ClassSchemaAttribute<T>, target: ModuleMetadata | ControllerMetadata | EndpointMetadata): Array<z.output<T>> | null;
|
|
45
|
+
static getLast(attribute: ClassAttribute, target: (ModuleMetadata | ControllerMetadata | EndpointMetadata)[]): true | null;
|
|
46
|
+
static getLast<T extends ZodType>(attribute: ClassSchemaAttribute<T>, target: (ModuleMetadata | ControllerMetadata | EndpointMetadata)[]): z.output<T> | null;
|
|
47
|
+
static has(attribute: ClassAttribute, target: ModuleMetadata | ControllerMetadata | EndpointMetadata): boolean;
|
|
48
|
+
static has<T extends ZodType>(attribute: ClassSchemaAttribute<T>, target: ModuleMetadata | ControllerMetadata | EndpointMetadata): boolean;
|
|
49
|
+
}
|
|
50
|
+
export { AttributeFactory }
|
|
51
|
+
export { AttributeFactory as AttributeFactory_alias_1 }
|
|
52
|
+
|
|
53
|
+
declare class BadRequestException extends HttpException {
|
|
54
|
+
constructor(message: string | object);
|
|
55
|
+
}
|
|
56
|
+
export { BadRequestException }
|
|
57
|
+
export { BadRequestException as BadRequestException_alias_1 }
|
|
58
|
+
export { BadRequestException as BadRequestException_alias_2 }
|
|
59
|
+
|
|
60
|
+
declare class BoundInjectionToken<T, S extends AnyZodObject | ZodOptional<AnyZodObject>> extends InjectionToken<T, undefined> {
|
|
61
|
+
readonly token: InjectionToken<T, S>;
|
|
62
|
+
readonly value: z.input<S>;
|
|
63
|
+
constructor(token: InjectionToken<T, S>, value: z.input<S>);
|
|
64
|
+
}
|
|
65
|
+
export { BoundInjectionToken }
|
|
66
|
+
export { BoundInjectionToken as BoundInjectionToken_alias_1 }
|
|
67
|
+
export { BoundInjectionToken as BoundInjectionToken_alias_2 }
|
|
68
|
+
|
|
69
|
+
declare interface CanActivate {
|
|
70
|
+
canActivate(executionContext: ExecutionContext): Promise<boolean> | boolean;
|
|
71
|
+
}
|
|
72
|
+
export { CanActivate }
|
|
73
|
+
export { CanActivate as CanActivate_alias_1 }
|
|
74
|
+
export { CanActivate as CanActivate_alias_2 }
|
|
75
|
+
|
|
76
|
+
declare type ChannelEmitter<Events extends EventsConfig, Ns extends string, E extends EventsNames<Events>> = {
|
|
77
|
+
emit<Args extends EventsArgs<Events, E>>(ns: Ns, event: E, ...args: Args): Promise<any>;
|
|
78
|
+
};
|
|
79
|
+
export { ChannelEmitter }
|
|
80
|
+
export { ChannelEmitter as ChannelEmitter_alias_1 }
|
|
81
|
+
export { ChannelEmitter as ChannelEmitter_alias_2 }
|
|
82
|
+
|
|
83
|
+
declare type ClassAttribute = (() => <T>(target: T, context: ClassDecoratorContext | ClassMethodDecoratorContext) => T) & {
|
|
84
|
+
token: symbol;
|
|
85
|
+
};
|
|
86
|
+
export { ClassAttribute }
|
|
87
|
+
export { ClassAttribute as ClassAttribute_alias_1 }
|
|
88
|
+
|
|
89
|
+
declare type ClassSchemaAttribute<T extends ZodType> = ((value: z.input<T>) => <T extends ClassType>(target: T, context: ClassDecoratorContext | ClassMethodDecoratorContext) => T) & {
|
|
90
|
+
token: symbol;
|
|
91
|
+
schema: ZodType;
|
|
92
|
+
};
|
|
93
|
+
export { ClassSchemaAttribute }
|
|
94
|
+
export { ClassSchemaAttribute as ClassSchemaAttribute_alias_1 }
|
|
95
|
+
|
|
96
|
+
declare type ClassType = new (...args: any[]) => any;
|
|
97
|
+
export { ClassType }
|
|
98
|
+
export { ClassType as ClassType_alias_1 }
|
|
99
|
+
export { ClassType as ClassType_alias_2 }
|
|
100
|
+
|
|
101
|
+
declare type ClassTypeWithInstance<T> = new (...args: any[]) => T;
|
|
102
|
+
export { ClassTypeWithInstance }
|
|
103
|
+
export { ClassTypeWithInstance as ClassTypeWithInstance_alias_1 }
|
|
104
|
+
export { ClassTypeWithInstance as ClassTypeWithInstance_alias_2 }
|
|
105
|
+
|
|
106
|
+
declare const clc: {
|
|
107
|
+
bold: (text: string) => string;
|
|
108
|
+
green: (text: string) => string;
|
|
109
|
+
yellow: (text: string) => string;
|
|
110
|
+
red: (text: string) => string;
|
|
111
|
+
magentaBright: (text: string) => string;
|
|
112
|
+
cyanBright: (text: string) => string;
|
|
113
|
+
};
|
|
114
|
+
export { clc }
|
|
115
|
+
export { clc as clc_alias_1 }
|
|
116
|
+
export { clc as clc_alias_2 }
|
|
117
|
+
export { clc as clc_alias_3 }
|
|
118
|
+
|
|
119
|
+
declare const ConfigProvider: InjectionToken<ConfigService<Record<string, unknown>>, z.ZodObject<{
|
|
120
|
+
load: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>;
|
|
121
|
+
}, "strip", z.ZodTypeAny, {
|
|
122
|
+
load: (...args: unknown[]) => unknown;
|
|
123
|
+
}, {
|
|
124
|
+
load: (...args: unknown[]) => unknown;
|
|
125
|
+
}>>;
|
|
126
|
+
export { ConfigProvider }
|
|
127
|
+
export { ConfigProvider as ConfigProvider_alias_1 }
|
|
128
|
+
export { ConfigProvider as ConfigProvider_alias_2 }
|
|
129
|
+
|
|
130
|
+
declare class ConfigProviderFactory {
|
|
131
|
+
logger: LoggerInstance_2;
|
|
132
|
+
create(ctx: any, args: z.infer<typeof ConfigProviderOptions>): Promise<ConfigServiceInstance<unknown>>;
|
|
133
|
+
}
|
|
134
|
+
export { ConfigProviderFactory }
|
|
135
|
+
export { ConfigProviderFactory as ConfigProviderFactory_alias_1 }
|
|
136
|
+
export { ConfigProviderFactory as ConfigProviderFactory_alias_2 }
|
|
137
|
+
|
|
138
|
+
declare const ConfigProviderOptions: z.ZodObject<{
|
|
139
|
+
load: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>;
|
|
140
|
+
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
load: (...args: unknown[]) => unknown;
|
|
142
|
+
}, {
|
|
143
|
+
load: (...args: unknown[]) => unknown;
|
|
144
|
+
}>;
|
|
145
|
+
export { ConfigProviderOptions }
|
|
146
|
+
export { ConfigProviderOptions as ConfigProviderOptions_alias_1 }
|
|
147
|
+
export { ConfigProviderOptions as ConfigProviderOptions_alias_2 }
|
|
148
|
+
|
|
149
|
+
declare interface ConfigService<Config = Record<string, unknown>> {
|
|
150
|
+
getConfig: () => Config;
|
|
151
|
+
get: <Key extends Path<Config>>(key: Key) => PathValue<Config, Key> | null;
|
|
152
|
+
getOrDefault: <Key extends Path<Config>>(key: Key, defaultValue: PathValue<Config, Key>) => PathValue<Config, Key>;
|
|
153
|
+
getOrThrow: <Key extends Path<Config>>(key: Key, errorMessage?: string) => PathValue<Config, Key>;
|
|
154
|
+
}
|
|
155
|
+
export { ConfigService }
|
|
156
|
+
export { ConfigService as ConfigService_alias_1 }
|
|
157
|
+
export { ConfigService as ConfigService_alias_2 }
|
|
158
|
+
|
|
159
|
+
declare class ConfigServiceInstance<Config = Record<string, unknown>> implements ConfigService<Config> {
|
|
160
|
+
private config;
|
|
161
|
+
private logger;
|
|
162
|
+
constructor(config: Config | undefined, logger: LoggerService);
|
|
163
|
+
getConfig(): Config;
|
|
164
|
+
get<Key extends Path<Config>>(key: Key): PathValue<Config, Key> | null;
|
|
165
|
+
getOrDefault<Key extends Path<Config>>(key: Key, defaultValue: PathValue<Config, Key>): PathValue<Config, Key>;
|
|
166
|
+
getOrThrow<Key extends Path<Config>>(key: Key, errorMessage?: string): PathValue<Config, Key>;
|
|
167
|
+
}
|
|
168
|
+
export { ConfigServiceInstance }
|
|
169
|
+
export { ConfigServiceInstance as ConfigServiceInstance_alias_1 }
|
|
170
|
+
export { ConfigServiceInstance as ConfigServiceInstance_alias_2 }
|
|
171
|
+
|
|
172
|
+
declare class ConflictException extends HttpException {
|
|
173
|
+
constructor(message: string | object, error?: Error);
|
|
174
|
+
}
|
|
175
|
+
export { ConflictException }
|
|
176
|
+
export { ConflictException as ConflictException_alias_1 }
|
|
177
|
+
export { ConflictException as ConflictException_alias_2 }
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* @publicApi
|
|
181
|
+
*/
|
|
182
|
+
declare class ConsoleLogger implements LoggerService {
|
|
183
|
+
/**
|
|
184
|
+
* The options of the logger.
|
|
185
|
+
*/
|
|
186
|
+
protected options: ConsoleLoggerOptions;
|
|
187
|
+
/**
|
|
188
|
+
* The context of the logger (can be set manually or automatically inferred).
|
|
189
|
+
*/
|
|
190
|
+
protected context?: string;
|
|
191
|
+
/**
|
|
192
|
+
* The original context of the logger (set in the constructor).
|
|
193
|
+
*/
|
|
194
|
+
protected originalContext?: string;
|
|
195
|
+
/**
|
|
196
|
+
* The options used for the "inspect" method.
|
|
197
|
+
*/
|
|
198
|
+
protected inspectOptions: InspectOptions;
|
|
199
|
+
/**
|
|
200
|
+
* The last timestamp at which the log message was printed.
|
|
201
|
+
*/
|
|
202
|
+
protected static lastTimestampAt?: number;
|
|
203
|
+
constructor();
|
|
204
|
+
constructor(context: string);
|
|
205
|
+
constructor(options: ConsoleLoggerOptions);
|
|
206
|
+
constructor(context: string, options: ConsoleLoggerOptions);
|
|
207
|
+
/**
|
|
208
|
+
* Write a 'log' level log, if the configured level allows for it.
|
|
209
|
+
* Prints to `stdout` with newline.
|
|
210
|
+
*/
|
|
211
|
+
log(message: any, context?: string): void;
|
|
212
|
+
log(message: any, ...optionalParams: [...any, string?]): void;
|
|
213
|
+
/**
|
|
214
|
+
* Write an 'error' level log, if the configured level allows for it.
|
|
215
|
+
* Prints to `stderr` with newline.
|
|
216
|
+
*/
|
|
217
|
+
error(message: any, stackOrContext?: string): void;
|
|
218
|
+
error(message: any, stack?: string, context?: string): void;
|
|
219
|
+
error(message: any, ...optionalParams: [...any, string?, string?]): void;
|
|
220
|
+
/**
|
|
221
|
+
* Write a 'warn' level log, if the configured level allows for it.
|
|
222
|
+
* Prints to `stdout` with newline.
|
|
223
|
+
*/
|
|
224
|
+
warn(message: any, context?: string): void;
|
|
225
|
+
warn(message: any, ...optionalParams: [...any, string?]): void;
|
|
226
|
+
/**
|
|
227
|
+
* Write a 'debug' level log, if the configured level allows for it.
|
|
228
|
+
* Prints to `stdout` with newline.
|
|
229
|
+
*/
|
|
230
|
+
debug(message: any, context?: string): void;
|
|
231
|
+
debug(message: any, ...optionalParams: [...any, string?]): void;
|
|
232
|
+
/**
|
|
233
|
+
* Write a 'verbose' level log, if the configured level allows for it.
|
|
234
|
+
* Prints to `stdout` with newline.
|
|
235
|
+
*/
|
|
236
|
+
verbose(message: any, context?: string): void;
|
|
237
|
+
verbose(message: any, ...optionalParams: [...any, string?]): void;
|
|
238
|
+
/**
|
|
239
|
+
* Write a 'fatal' level log, if the configured level allows for it.
|
|
240
|
+
* Prints to `stdout` with newline.
|
|
241
|
+
*/
|
|
242
|
+
fatal(message: any, context?: string): void;
|
|
243
|
+
fatal(message: any, ...optionalParams: [...any, string?]): void;
|
|
244
|
+
/**
|
|
245
|
+
* Set log levels
|
|
246
|
+
* @param levels log levels
|
|
247
|
+
*/
|
|
248
|
+
setLogLevels(levels: LogLevel[]): void;
|
|
249
|
+
/**
|
|
250
|
+
* Set logger context
|
|
251
|
+
* @param context context
|
|
252
|
+
*/
|
|
253
|
+
setContext(context: string): void;
|
|
254
|
+
/**
|
|
255
|
+
* Resets the logger context to the value that was passed in the constructor.
|
|
256
|
+
*/
|
|
257
|
+
resetContext(): void;
|
|
258
|
+
isLevelEnabled(level: LogLevel): boolean;
|
|
259
|
+
protected getTimestamp(): string;
|
|
260
|
+
protected printMessages(messages: unknown[], context?: string, logLevel?: LogLevel, writeStreamType?: 'stdout' | 'stderr', errorStack?: unknown): void;
|
|
261
|
+
protected printAsJson(message: unknown, options: {
|
|
262
|
+
context: string;
|
|
263
|
+
logLevel: LogLevel;
|
|
264
|
+
writeStreamType?: 'stdout' | 'stderr';
|
|
265
|
+
errorStack?: unknown;
|
|
266
|
+
}): void;
|
|
267
|
+
protected formatPid(pid: number): string;
|
|
268
|
+
protected formatContext(context: string): string;
|
|
269
|
+
protected formatMessage(logLevel: LogLevel, message: unknown, pidMessage: string, formattedLogLevel: string, contextMessage: string, timestampDiff: string): string;
|
|
270
|
+
protected stringifyMessage(message: unknown, logLevel: LogLevel): string;
|
|
271
|
+
protected colorize(message: string, logLevel: LogLevel): string;
|
|
272
|
+
protected printStackTrace(stack: string): void;
|
|
273
|
+
protected updateAndGetTimestampDiff(): string;
|
|
274
|
+
protected formatTimestampDiff(timestampDiff: number): string;
|
|
275
|
+
protected getInspectOptions(): InspectOptions;
|
|
276
|
+
protected stringifyReplacer(key: string, value: unknown): unknown;
|
|
277
|
+
private getContextAndMessagesToPrint;
|
|
278
|
+
private getContextAndStackAndMessagesToPrint;
|
|
279
|
+
private isStackFormat;
|
|
280
|
+
private getColorByLogLevel;
|
|
281
|
+
}
|
|
282
|
+
export { ConsoleLogger }
|
|
283
|
+
export { ConsoleLogger as ConsoleLogger_alias_1 }
|
|
284
|
+
export { ConsoleLogger as ConsoleLogger_alias_2 }
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* @publicApi
|
|
288
|
+
*/
|
|
289
|
+
declare interface ConsoleLoggerOptions {
|
|
290
|
+
/**
|
|
291
|
+
* Enabled log levels.
|
|
292
|
+
*/
|
|
293
|
+
logLevels?: LogLevel[];
|
|
294
|
+
/**
|
|
295
|
+
* If enabled, will print timestamp (time difference) between current and previous log message.
|
|
296
|
+
* Note: This option is not used when `json` is enabled.
|
|
297
|
+
*/
|
|
298
|
+
timestamp?: boolean;
|
|
299
|
+
/**
|
|
300
|
+
* A prefix to be used for each log message.
|
|
301
|
+
* Note: This option is not used when `json` is enabled.
|
|
302
|
+
*/
|
|
303
|
+
prefix?: string;
|
|
304
|
+
/**
|
|
305
|
+
* If enabled, will print the log message in JSON format.
|
|
306
|
+
*/
|
|
307
|
+
json?: boolean;
|
|
308
|
+
/**
|
|
309
|
+
* If enabled, will print the log message in color.
|
|
310
|
+
* Default true if json is disabled, false otherwise
|
|
311
|
+
*/
|
|
312
|
+
colors?: boolean;
|
|
313
|
+
/**
|
|
314
|
+
* The context of the logger.
|
|
315
|
+
*/
|
|
316
|
+
context?: string;
|
|
317
|
+
/**
|
|
318
|
+
* If enabled, will print the log message in a single line, even if it is an object with multiple properties.
|
|
319
|
+
* If set to a number, the most n inner elements are united on a single line as long as all properties fit into breakLength. Short array elements are also grouped together.
|
|
320
|
+
* Default true when `json` is enabled, false otherwise.
|
|
321
|
+
*/
|
|
322
|
+
compact?: boolean | number;
|
|
323
|
+
/**
|
|
324
|
+
* Specifies the maximum number of Array, TypedArray, Map, Set, WeakMap, and WeakSet elements to include when formatting.
|
|
325
|
+
* Set to null or Infinity to show all elements. Set to 0 or negative to show no elements.
|
|
326
|
+
* Ignored when `json` is enabled, colors are disabled, and `compact` is set to true as it produces a parseable JSON output.
|
|
327
|
+
* @default 100
|
|
328
|
+
*/
|
|
329
|
+
maxArrayLength?: number;
|
|
330
|
+
/**
|
|
331
|
+
* Specifies the maximum number of characters to include when formatting.
|
|
332
|
+
* Set to null or Infinity to show all elements. Set to 0 or negative to show no characters.
|
|
333
|
+
* Ignored when `json` is enabled, colors are disabled, and `compact` is set to true as it produces a parseable JSON output.
|
|
334
|
+
* @default 10000.
|
|
335
|
+
*/
|
|
336
|
+
maxStringLength?: number;
|
|
337
|
+
/**
|
|
338
|
+
* If enabled, will sort keys while formatting objects.
|
|
339
|
+
* Can also be a custom sorting function.
|
|
340
|
+
* Ignored when `json` is enabled, colors are disabled, and `compact` is set to true as it produces a parseable JSON output.
|
|
341
|
+
* @default false
|
|
342
|
+
*/
|
|
343
|
+
sorted?: boolean | ((a: string, b: string) => number);
|
|
344
|
+
/**
|
|
345
|
+
* Specifies the number of times to recurse while formatting object. T
|
|
346
|
+
* This is useful for inspecting large objects. To recurse up to the maximum call stack size pass Infinity or null.
|
|
347
|
+
* Ignored when `json` is enabled, colors are disabled, and `compact` is set to true as it produces a parseable JSON output.
|
|
348
|
+
* @default 5
|
|
349
|
+
*/
|
|
350
|
+
depth?: number;
|
|
351
|
+
/**
|
|
352
|
+
* If true, object's non-enumerable symbols and properties are included in the formatted result.
|
|
353
|
+
* WeakMap and WeakSet entries are also included as well as user defined prototype properties
|
|
354
|
+
* @default false
|
|
355
|
+
*/
|
|
356
|
+
showHidden?: boolean;
|
|
357
|
+
/**
|
|
358
|
+
* The length at which input values are split across multiple lines. Set to Infinity to format the input as a single line (in combination with "compact" set to true).
|
|
359
|
+
* Default Infinity when "compact" is true, 80 otherwise.
|
|
360
|
+
* Ignored when `json` is enabled, colors are disabled, and `compact` is set to true as it produces a parseable JSON output.
|
|
361
|
+
*/
|
|
362
|
+
breakLength?: number;
|
|
363
|
+
}
|
|
364
|
+
export { ConsoleLoggerOptions }
|
|
365
|
+
export { ConsoleLoggerOptions as ConsoleLoggerOptions_alias_1 }
|
|
366
|
+
export { ConsoleLoggerOptions as ConsoleLoggerOptions_alias_2 }
|
|
367
|
+
|
|
368
|
+
declare function Controller({ guards }?: ControllerOptions): (target: ClassType, context: ClassDecoratorContext) => ClassType;
|
|
369
|
+
export { Controller }
|
|
370
|
+
export { Controller as Controller_alias_1 }
|
|
371
|
+
export { Controller as Controller_alias_2 }
|
|
372
|
+
|
|
373
|
+
declare class ControllerAdapterService {
|
|
374
|
+
guardRunner: GuardRunnerService;
|
|
375
|
+
private logger;
|
|
376
|
+
setupController(controller: ClassType, instance: FastifyInstance, moduleMetadata: ModuleMetadata): void;
|
|
377
|
+
providePreHandler(executionContext: ExecutionContext): ((request: FastifyRequest, reply: FastifyReply) => Promise<undefined>) | undefined;
|
|
378
|
+
private provideSchemaForConfig;
|
|
379
|
+
private provideHandler;
|
|
380
|
+
private provideHandlerForConfig;
|
|
381
|
+
}
|
|
382
|
+
export { ControllerAdapterService }
|
|
383
|
+
export { ControllerAdapterService as ControllerAdapterService_alias_1 }
|
|
384
|
+
export { ControllerAdapterService as ControllerAdapterService_alias_2 }
|
|
385
|
+
|
|
386
|
+
declare interface ControllerMetadata {
|
|
387
|
+
endpoints: Set<EndpointMetadata>;
|
|
388
|
+
guards: Set<ClassTypeWithInstance<CanActivate> | InjectionToken<CanActivate, undefined>>;
|
|
389
|
+
customAttributes: Map<string | symbol, any>;
|
|
390
|
+
}
|
|
391
|
+
export { ControllerMetadata }
|
|
392
|
+
export { ControllerMetadata as ControllerMetadata_alias_1 }
|
|
393
|
+
export { ControllerMetadata as ControllerMetadata_alias_2 }
|
|
394
|
+
|
|
395
|
+
declare const ControllerMetadataKey: unique symbol;
|
|
396
|
+
export { ControllerMetadataKey }
|
|
397
|
+
export { ControllerMetadataKey as ControllerMetadataKey_alias_1 }
|
|
398
|
+
export { ControllerMetadataKey as ControllerMetadataKey_alias_2 }
|
|
399
|
+
|
|
400
|
+
declare interface ControllerOptions {
|
|
401
|
+
guards?: ClassType[] | Set<ClassType>;
|
|
402
|
+
}
|
|
403
|
+
export { ControllerOptions }
|
|
404
|
+
export { ControllerOptions as ControllerOptions_alias_1 }
|
|
405
|
+
export { ControllerOptions as ControllerOptions_alias_2 }
|
|
406
|
+
|
|
407
|
+
declare function Endpoint<Method extends HttpMethod = HttpMethod, Url extends string = string, QuerySchema = undefined, ResponseSchema extends ZodType = ZodType, RequestSchema = ZodType>(endpoint: {
|
|
408
|
+
config: BaseEndpointConfig<Method, Url, QuerySchema, ResponseSchema, RequestSchema>;
|
|
409
|
+
}): (target: (params: QuerySchema extends AnyZodObject ? RequestSchema extends ZodType ? EndpointFunctionArgs<Url, QuerySchema, RequestSchema> : EndpointFunctionArgs<Url, QuerySchema, undefined> : RequestSchema extends ZodType ? EndpointFunctionArgs<Url, undefined, RequestSchema> : EndpointFunctionArgs<Url, undefined, undefined>) => Promise<z.input<ResponseSchema>>, context: ClassMethodDecoratorContext) => (params: QuerySchema extends AnyZodObject ? RequestSchema extends ZodType ? EndpointFunctionArgs<Url, QuerySchema, RequestSchema> : EndpointFunctionArgs<Url, QuerySchema, undefined> : RequestSchema extends ZodType ? EndpointFunctionArgs<Url, undefined, RequestSchema> : EndpointFunctionArgs<Url, undefined, undefined>) => Promise<z.input<ResponseSchema>>;
|
|
410
|
+
export { Endpoint }
|
|
411
|
+
export { Endpoint as Endpoint_alias_1 }
|
|
412
|
+
export { Endpoint as Endpoint_alias_2 }
|
|
413
|
+
|
|
414
|
+
declare interface EndpointMetadata {
|
|
415
|
+
classMethod: string;
|
|
416
|
+
url: string;
|
|
417
|
+
successStatusCode: number;
|
|
418
|
+
type: EndpointType;
|
|
419
|
+
headers: Partial<Record<HttpHeader, number | string | string[] | undefined>>;
|
|
420
|
+
httpMethod: HttpMethod;
|
|
421
|
+
config: BaseEndpointConfig | null;
|
|
422
|
+
guards: Set<ClassTypeWithInstance<CanActivate> | InjectionToken<CanActivate, undefined>>;
|
|
423
|
+
customAttributes: Map<string | symbol, any>;
|
|
424
|
+
}
|
|
425
|
+
export { EndpointMetadata }
|
|
426
|
+
export { EndpointMetadata as EndpointMetadata_alias_1 }
|
|
427
|
+
export { EndpointMetadata as EndpointMetadata_alias_2 }
|
|
428
|
+
|
|
429
|
+
declare const EndpointMetadataKey: unique symbol;
|
|
430
|
+
export { EndpointMetadataKey }
|
|
431
|
+
export { EndpointMetadataKey as EndpointMetadataKey_alias_1 }
|
|
432
|
+
export { EndpointMetadataKey as EndpointMetadataKey_alias_2 }
|
|
433
|
+
|
|
434
|
+
declare type EndpointParams<EndpointDeclaration extends {
|
|
435
|
+
config: BaseEndpointConfig<any, any, any, any, any>;
|
|
436
|
+
}, Url extends string = EndpointDeclaration['config']['url'], QuerySchema = EndpointDeclaration['config']['querySchema']> = QuerySchema extends AnyZodObject ? EndpointDeclaration['config']['requestSchema'] extends ZodType ? EndpointFunctionArgs<Url, QuerySchema, EndpointDeclaration['config']['requestSchema']> : EndpointFunctionArgs<Url, QuerySchema, undefined> : EndpointDeclaration['config']['requestSchema'] extends ZodType ? EndpointFunctionArgs<Url, undefined, EndpointDeclaration['config']['requestSchema']> : EndpointFunctionArgs<Url, undefined, undefined>;
|
|
437
|
+
export { EndpointParams }
|
|
438
|
+
export { EndpointParams as EndpointParams_alias_1 }
|
|
439
|
+
export { EndpointParams as EndpointParams_alias_2 }
|
|
440
|
+
|
|
441
|
+
declare enum EndpointType {
|
|
442
|
+
Unknown = "unknown",
|
|
443
|
+
Config = "config",
|
|
444
|
+
Handler = "handler"
|
|
445
|
+
}
|
|
446
|
+
export { EndpointType }
|
|
447
|
+
export { EndpointType as EndpointType_alias_1 }
|
|
448
|
+
export { EndpointType as EndpointType_alias_2 }
|
|
449
|
+
|
|
450
|
+
declare function envInt(key: keyof NodeJS.ProcessEnv, defaultValue: number): number;
|
|
451
|
+
export { envInt }
|
|
452
|
+
export { envInt as envInt_alias_1 }
|
|
453
|
+
export { envInt as envInt_alias_2 }
|
|
454
|
+
export { envInt as envInt_alias_3 }
|
|
455
|
+
|
|
456
|
+
declare function envString<DefaultValue extends string | undefined, Ensured = DefaultValue extends string ? true : false>(key: keyof NodeJS.ProcessEnv, defaultValue?: DefaultValue): Ensured extends true ? string : string | undefined;
|
|
457
|
+
export { envString }
|
|
458
|
+
export { envString as envString_alias_1 }
|
|
459
|
+
export { envString as envString_alias_2 }
|
|
460
|
+
export { envString as envString_alias_3 }
|
|
461
|
+
|
|
462
|
+
declare enum ErrorsEnum {
|
|
463
|
+
InstanceExpired = "InstanceExpired",
|
|
464
|
+
InstanceNotFound = "InstanceNotFound",
|
|
465
|
+
InstanceDestroying = "InstanceDestroying",
|
|
466
|
+
UnknownError = "UnknownError",
|
|
467
|
+
FactoryNotFound = "FactoryNotFound",
|
|
468
|
+
FactoryTokenNotResolved = "FactoryTokenNotResolved"
|
|
469
|
+
}
|
|
470
|
+
export { ErrorsEnum }
|
|
471
|
+
export { ErrorsEnum as ErrorsEnum_alias_1 }
|
|
472
|
+
export { ErrorsEnum as ErrorsEnum_alias_2 }
|
|
473
|
+
export { ErrorsEnum as ErrorsEnum_alias_3 }
|
|
474
|
+
|
|
475
|
+
declare class EventEmitter<Events extends EventsConfig = {}> implements EventEmitterInterface<Events> {
|
|
476
|
+
private listeners;
|
|
477
|
+
on<E extends EventsNames<Events>, Args extends EventsArgs<Events, E>>(event: E, listener: (...args: Args) => void): () => void;
|
|
478
|
+
off<E extends EventsNames<Events>, Args extends EventsArgs<Events, E>>(event: E, listener: (...args: Args) => void): void;
|
|
479
|
+
once<E extends EventsNames<Events>, Args extends EventsArgs<Events, E>>(event: E, listener: (...args: Args) => void): () => void;
|
|
480
|
+
emit<E extends EventsNames<Events>, Args extends EventsArgs<Events, E>>(event: E, ...args: Args): Promise<any>;
|
|
481
|
+
addChannel<E extends EventsNames<Events>, Ns extends string, Emitter extends ChannelEmitter<Events, Ns, E>>(ns: Ns, event: E, target: Emitter): () => void;
|
|
482
|
+
}
|
|
483
|
+
export { EventEmitter }
|
|
484
|
+
export { EventEmitter as EventEmitter_alias_1 }
|
|
485
|
+
export { EventEmitter as EventEmitter_alias_2 }
|
|
486
|
+
|
|
487
|
+
declare interface EventEmitterInterface<Events extends EventsConfig> {
|
|
488
|
+
on<E extends EventsNames<Events>, Args extends EventsArgs<Events, E>>(event: E, listener: (...args: Args) => void): () => void;
|
|
489
|
+
emit<E extends EventsNames<Events>, Args extends EventsArgs<Events, E>>(event: E, ...args: Args): void;
|
|
490
|
+
addChannel<E extends EventsNames<Events>, Ns extends string, Emmiter extends ChannelEmitter<Events, Ns, E>>(ns: Ns, event: E, target: Emmiter): () => void;
|
|
491
|
+
}
|
|
492
|
+
export { EventEmitterInterface }
|
|
493
|
+
export { EventEmitterInterface as EventEmitterInterface_alias_1 }
|
|
494
|
+
export { EventEmitterInterface as EventEmitterInterface_alias_2 }
|
|
495
|
+
|
|
496
|
+
declare type EventsArgs<Events extends EventsConfig, Name extends EventsNames<Events>> = Events[Name] extends any[] ? Events[Name] : [];
|
|
497
|
+
export { EventsArgs }
|
|
498
|
+
export { EventsArgs as EventsArgs_alias_1 }
|
|
499
|
+
export { EventsArgs as EventsArgs_alias_2 }
|
|
500
|
+
|
|
501
|
+
declare type EventsConfig = {
|
|
502
|
+
[event: string]: any[];
|
|
503
|
+
};
|
|
504
|
+
export { EventsConfig }
|
|
505
|
+
export { EventsConfig as EventsConfig_alias_1 }
|
|
506
|
+
export { EventsConfig as EventsConfig_alias_2 }
|
|
507
|
+
|
|
508
|
+
declare type EventsNames<Events extends EventsConfig> = Exclude<keyof Events, symbol | number>;
|
|
509
|
+
export { EventsNames }
|
|
510
|
+
export { EventsNames as EventsNames_alias_1 }
|
|
511
|
+
export { EventsNames as EventsNames_alias_2 }
|
|
512
|
+
|
|
513
|
+
declare type ExcludedKeys = 'computedTimeRates' | 'aiModelsRates' | 'aiModel';
|
|
514
|
+
|
|
515
|
+
declare type ExcludedParts = 'services' | 'mailer' | 'aws' | 'computedTimeRates' | 'aiModelsRates';
|
|
516
|
+
|
|
517
|
+
declare class ExecutionContext {
|
|
518
|
+
private readonly module;
|
|
519
|
+
private readonly controller;
|
|
520
|
+
private readonly handler;
|
|
521
|
+
private request;
|
|
522
|
+
private reply;
|
|
523
|
+
constructor(module: ModuleMetadata, controller: ControllerMetadata, handler: EndpointMetadata);
|
|
524
|
+
getModule(): ModuleMetadata;
|
|
525
|
+
getController(): ControllerMetadata;
|
|
526
|
+
getHandler(): EndpointMetadata;
|
|
527
|
+
getRequest(): FastifyRequest;
|
|
528
|
+
getReply(): FastifyReply;
|
|
529
|
+
provideRequest(request: FastifyRequest): void;
|
|
530
|
+
provideReply(reply: FastifyReply): void;
|
|
531
|
+
}
|
|
532
|
+
export { ExecutionContext }
|
|
533
|
+
export { ExecutionContext as ExecutionContext_alias_1 }
|
|
534
|
+
export { ExecutionContext as ExecutionContext_alias_2 }
|
|
535
|
+
|
|
536
|
+
declare const ExecutionContextInjectionToken = "ExecutionContextInjectionToken";
|
|
537
|
+
export { ExecutionContextInjectionToken }
|
|
538
|
+
export { ExecutionContextInjectionToken as ExecutionContextInjectionToken_alias_1 }
|
|
539
|
+
export { ExecutionContextInjectionToken as ExecutionContextInjectionToken_alias_2 }
|
|
540
|
+
|
|
541
|
+
declare const ExecutionContextToken: InjectionToken<ExecutionContext, undefined>;
|
|
542
|
+
export { ExecutionContextToken }
|
|
543
|
+
export { ExecutionContextToken as ExecutionContextToken_alias_1 }
|
|
544
|
+
export { ExecutionContextToken as ExecutionContextToken_alias_2 }
|
|
545
|
+
|
|
546
|
+
declare function extractControllerMetadata(target: ClassType): ControllerMetadata;
|
|
547
|
+
export { extractControllerMetadata }
|
|
548
|
+
export { extractControllerMetadata as extractControllerMetadata_alias_1 }
|
|
549
|
+
export { extractControllerMetadata as extractControllerMetadata_alias_2 }
|
|
550
|
+
|
|
551
|
+
declare function extractModuleMetadata(target: ClassType): ModuleMetadata;
|
|
552
|
+
export { extractModuleMetadata }
|
|
553
|
+
export { extractModuleMetadata as extractModuleMetadata_alias_1 }
|
|
554
|
+
export { extractModuleMetadata as extractModuleMetadata_alias_2 }
|
|
555
|
+
|
|
556
|
+
export declare interface Factory<T> {
|
|
557
|
+
create(ctx: any): Promise<T>;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
declare class FactoryInjectionToken<T, S extends AnyZodObject | ZodOptional<AnyZodObject>> extends InjectionToken<T, S> {
|
|
561
|
+
readonly token: InjectionToken<T, S>;
|
|
562
|
+
readonly factory: () => Promise<z.input<S>>;
|
|
563
|
+
value?: z.input<S>;
|
|
564
|
+
resolved: boolean;
|
|
565
|
+
constructor(token: InjectionToken<T, S>, factory: () => Promise<z.input<S>>);
|
|
566
|
+
resolve(): Promise<z.input<S>>;
|
|
567
|
+
}
|
|
568
|
+
export { FactoryInjectionToken }
|
|
569
|
+
export { FactoryInjectionToken as FactoryInjectionToken_alias_1 }
|
|
570
|
+
export { FactoryInjectionToken as FactoryInjectionToken_alias_2 }
|
|
571
|
+
|
|
572
|
+
declare class FactoryNotFound extends Error {
|
|
573
|
+
name: string;
|
|
574
|
+
code: ErrorsEnum;
|
|
575
|
+
constructor(name: string);
|
|
576
|
+
}
|
|
577
|
+
export { FactoryNotFound }
|
|
578
|
+
export { FactoryNotFound as FactoryNotFound_alias_1 }
|
|
579
|
+
export { FactoryNotFound as FactoryNotFound_alias_2 }
|
|
580
|
+
export { FactoryNotFound as FactoryNotFound_alias_3 }
|
|
581
|
+
|
|
582
|
+
declare class FactoryTokenNotResolved extends Error {
|
|
583
|
+
code: ErrorsEnum;
|
|
584
|
+
constructor(name: string | symbol | ClassType);
|
|
585
|
+
}
|
|
586
|
+
export { FactoryTokenNotResolved }
|
|
587
|
+
export { FactoryTokenNotResolved as FactoryTokenNotResolved_alias_1 }
|
|
588
|
+
export { FactoryTokenNotResolved as FactoryTokenNotResolved_alias_2 }
|
|
589
|
+
export { FactoryTokenNotResolved as FactoryTokenNotResolved_alias_3 }
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* @publicApi
|
|
593
|
+
*/
|
|
594
|
+
declare function filterLogLevels(parseableString?: string): LogLevel[];
|
|
595
|
+
export { filterLogLevels }
|
|
596
|
+
export { filterLogLevels as filterLogLevels_alias_1 }
|
|
597
|
+
export { filterLogLevels as filterLogLevels_alias_2 }
|
|
598
|
+
export { filterLogLevels as filterLogLevels_alias_3 }
|
|
599
|
+
|
|
600
|
+
declare class ForbiddenException extends HttpException {
|
|
601
|
+
constructor(message: string);
|
|
602
|
+
}
|
|
603
|
+
export { ForbiddenException }
|
|
604
|
+
export { ForbiddenException as ForbiddenException_alias_1 }
|
|
605
|
+
export { ForbiddenException as ForbiddenException_alias_2 }
|
|
606
|
+
|
|
607
|
+
declare function getAllEndpointMetadata(context: ClassMethodDecoratorContext | ClassDecoratorContext): Set<EndpointMetadata>;
|
|
608
|
+
export { getAllEndpointMetadata }
|
|
609
|
+
export { getAllEndpointMetadata as getAllEndpointMetadata_alias_1 }
|
|
610
|
+
export { getAllEndpointMetadata as getAllEndpointMetadata_alias_2 }
|
|
611
|
+
|
|
612
|
+
declare function getControllerMetadata(target: ClassType, context: ClassDecoratorContext): ControllerMetadata;
|
|
613
|
+
export { getControllerMetadata }
|
|
614
|
+
export { getControllerMetadata as getControllerMetadata_alias_1 }
|
|
615
|
+
export { getControllerMetadata as getControllerMetadata_alias_2 }
|
|
616
|
+
|
|
617
|
+
declare function getEndpointMetadata(target: Function, context: ClassMethodDecoratorContext): EndpointMetadata;
|
|
618
|
+
export { getEndpointMetadata }
|
|
619
|
+
export { getEndpointMetadata as getEndpointMetadata_alias_1 }
|
|
620
|
+
export { getEndpointMetadata as getEndpointMetadata_alias_2 }
|
|
621
|
+
|
|
622
|
+
declare function getInjectableToken<R>(target: ClassType): R extends {
|
|
623
|
+
create(...args: any[]): infer V;
|
|
624
|
+
} ? InjectionToken<V> : InjectionToken<R>;
|
|
625
|
+
export { getInjectableToken }
|
|
626
|
+
export { getInjectableToken as getInjectableToken_alias_1 }
|
|
627
|
+
export { getInjectableToken as getInjectableToken_alias_2 }
|
|
628
|
+
export { getInjectableToken as getInjectableToken_alias_3 }
|
|
629
|
+
|
|
630
|
+
declare function getModuleMetadata(target: ClassType, context: ClassDecoratorContext): ModuleMetadata;
|
|
631
|
+
export { getModuleMetadata }
|
|
632
|
+
export { getModuleMetadata as getModuleMetadata_alias_1 }
|
|
633
|
+
export { getModuleMetadata as getModuleMetadata_alias_2 }
|
|
634
|
+
|
|
635
|
+
declare function getServiceLocator(): ServiceLocator;
|
|
636
|
+
export { getServiceLocator }
|
|
637
|
+
export { getServiceLocator as getServiceLocator_alias_1 }
|
|
638
|
+
export { getServiceLocator as getServiceLocator_alias_2 }
|
|
639
|
+
|
|
640
|
+
declare class GuardRunnerService {
|
|
641
|
+
runGuards(allGuards: Set<ClassTypeWithInstance<CanActivate> | InjectionToken<CanActivate, undefined>>, executionContext: ExecutionContext): Promise<boolean>;
|
|
642
|
+
makeContext(executionContext: ExecutionContext): Set<ClassTypeWithInstance<CanActivate> | InjectionToken<CanActivate, undefined>>;
|
|
643
|
+
}
|
|
644
|
+
export { GuardRunnerService }
|
|
645
|
+
export { GuardRunnerService as GuardRunnerService_alias_1 }
|
|
646
|
+
export { GuardRunnerService as GuardRunnerService_alias_2 }
|
|
647
|
+
|
|
648
|
+
declare function hasControllerMetadata(target: ClassType): boolean;
|
|
649
|
+
export { hasControllerMetadata }
|
|
650
|
+
export { hasControllerMetadata as hasControllerMetadata_alias_1 }
|
|
651
|
+
export { hasControllerMetadata as hasControllerMetadata_alias_2 }
|
|
652
|
+
|
|
653
|
+
declare function hasModuleMetadata(target: ClassType): boolean;
|
|
654
|
+
export { hasModuleMetadata }
|
|
655
|
+
export { hasModuleMetadata as hasModuleMetadata_alias_1 }
|
|
656
|
+
export { hasModuleMetadata as hasModuleMetadata_alias_2 }
|
|
657
|
+
|
|
658
|
+
declare function Header(name: HttpHeader, value: string | number | string[]): <T extends Function>(target: T, context: ClassMethodDecoratorContext) => T;
|
|
659
|
+
export { Header }
|
|
660
|
+
export { Header as Header_alias_1 }
|
|
661
|
+
export { Header as Header_alias_2 }
|
|
662
|
+
|
|
663
|
+
declare function HttpCode(code: number): <T extends Function>(target: T, context: ClassMethodDecoratorContext) => T;
|
|
664
|
+
export { HttpCode }
|
|
665
|
+
export { HttpCode as HttpCode_alias_1 }
|
|
666
|
+
export { HttpCode as HttpCode_alias_2 }
|
|
667
|
+
|
|
668
|
+
declare class HttpException {
|
|
669
|
+
readonly statusCode: number;
|
|
670
|
+
readonly response: string | object;
|
|
671
|
+
readonly error?: Error | undefined;
|
|
672
|
+
constructor(statusCode: number, response: string | object, error?: Error | undefined);
|
|
673
|
+
}
|
|
674
|
+
export { HttpException }
|
|
675
|
+
export { HttpException as HttpException_alias_1 }
|
|
676
|
+
export { HttpException as HttpException_alias_2 }
|
|
677
|
+
|
|
678
|
+
declare function inject<T extends ClassType>(token: T): Promise<InstanceType<T>>;
|
|
679
|
+
|
|
680
|
+
declare function inject<T, S extends AnyZodObject>(token: InjectionToken<T, S>, args: z.input<S>): Promise<T>;
|
|
681
|
+
|
|
682
|
+
declare function inject<T, S extends ZodOptional<AnyZodObject>>(token: InjectionToken<T, S>, args?: z.input<S>): Promise<T>;
|
|
683
|
+
|
|
684
|
+
declare function inject<T>(token: InjectionToken<T, undefined>): Promise<T>;
|
|
685
|
+
export { inject }
|
|
686
|
+
export { inject as inject_alias_1 }
|
|
687
|
+
export { inject as inject_alias_2 }
|
|
688
|
+
|
|
689
|
+
declare function Injectable({ scope, type, token, }?: InjectableOptions): (target: ClassType, context: ClassDecoratorContext) => ClassType;
|
|
690
|
+
export { Injectable }
|
|
691
|
+
export { Injectable as Injectable_alias_1 }
|
|
692
|
+
export { Injectable as Injectable_alias_2 }
|
|
693
|
+
export { Injectable as Injectable_alias_3 }
|
|
694
|
+
|
|
695
|
+
declare interface InjectableMetadata<Instance = any, Schema = any> {
|
|
696
|
+
type: InjectableType;
|
|
697
|
+
scope: InjectableScope;
|
|
698
|
+
token: InjectionToken<Instance, Schema>;
|
|
699
|
+
}
|
|
700
|
+
export { InjectableMetadata }
|
|
701
|
+
export { InjectableMetadata as InjectableMetadata_alias_1 }
|
|
702
|
+
export { InjectableMetadata as InjectableMetadata_alias_2 }
|
|
703
|
+
|
|
704
|
+
declare interface InjectableOptions {
|
|
705
|
+
scope?: InjectableScope;
|
|
706
|
+
type?: InjectableType;
|
|
707
|
+
token?: InjectionToken<any, any>;
|
|
708
|
+
}
|
|
709
|
+
export { InjectableOptions }
|
|
710
|
+
export { InjectableOptions as InjectableOptions_alias_1 }
|
|
711
|
+
export { InjectableOptions as InjectableOptions_alias_2 }
|
|
712
|
+
export { InjectableOptions as InjectableOptions_alias_3 }
|
|
713
|
+
|
|
714
|
+
declare enum InjectableScope {
|
|
715
|
+
/**
|
|
716
|
+
* Singleton scope: The instance is created once and shared across the application.
|
|
717
|
+
*/
|
|
718
|
+
Singleton = "Singleton",
|
|
719
|
+
/**
|
|
720
|
+
* Instance scope: A new instance is created for each injection.
|
|
721
|
+
*/
|
|
722
|
+
Instance = "Instance"
|
|
723
|
+
}
|
|
724
|
+
export { InjectableScope }
|
|
725
|
+
export { InjectableScope as InjectableScope_alias_1 }
|
|
726
|
+
export { InjectableScope as InjectableScope_alias_2 }
|
|
727
|
+
export { InjectableScope as InjectableScope_alias_3 }
|
|
728
|
+
|
|
729
|
+
declare const InjectableTokenMeta: unique symbol;
|
|
730
|
+
export { InjectableTokenMeta }
|
|
731
|
+
export { InjectableTokenMeta as InjectableTokenMeta_alias_1 }
|
|
732
|
+
export { InjectableTokenMeta as InjectableTokenMeta_alias_2 }
|
|
733
|
+
export { InjectableTokenMeta as InjectableTokenMeta_alias_3 }
|
|
734
|
+
|
|
735
|
+
declare enum InjectableType {
|
|
736
|
+
Class = "Class",
|
|
737
|
+
Factory = "Factory"
|
|
738
|
+
}
|
|
739
|
+
export { InjectableType }
|
|
740
|
+
export { InjectableType as InjectableType_alias_1 }
|
|
741
|
+
export { InjectableType as InjectableType_alias_2 }
|
|
742
|
+
export { InjectableType as InjectableType_alias_3 }
|
|
743
|
+
|
|
744
|
+
declare class InjectionToken<T, S extends AnyZodObject | ZodOptional<AnyZodObject> | unknown = unknown> {
|
|
745
|
+
readonly name: string | symbol | ClassType;
|
|
746
|
+
readonly schema: AnyZodObject | undefined;
|
|
747
|
+
id: `${string}-${string}-${string}-${string}-${string}`;
|
|
748
|
+
constructor(name: string | symbol | ClassType, schema: AnyZodObject | undefined);
|
|
749
|
+
static create<T extends ClassType>(name: T): InjectionToken<InstanceType<T>, undefined>;
|
|
750
|
+
static create<T extends ClassType, Schema extends AnyZodObject | ZodOptional<AnyZodObject>>(name: T, schema: Schema): InjectionToken<InstanceType<T>, Schema>;
|
|
751
|
+
static create<T>(name: string | symbol): InjectionToken<T, undefined>;
|
|
752
|
+
static create<T, Schema extends AnyZodObject | ZodOptional<AnyZodObject>>(name: string | any, schema: Schema): InjectionToken<T, Schema>;
|
|
753
|
+
static bound<T, S extends AnyZodObject | ZodOptional<AnyZodObject>>(token: InjectionToken<T, S>, value: z.input<S>): BoundInjectionToken<T, S>;
|
|
754
|
+
static factory<T, S extends AnyZodObject | ZodOptional<AnyZodObject>>(token: InjectionToken<T, S>, factory: () => Promise<z.input<S>>): FactoryInjectionToken<T, S>;
|
|
755
|
+
static refineType<T>(token: BoundInjectionToken<any, any>): BoundInjectionToken<T, any>;
|
|
756
|
+
}
|
|
757
|
+
export { InjectionToken }
|
|
758
|
+
export { InjectionToken as InjectionToken_alias_1 }
|
|
759
|
+
export { InjectionToken as InjectionToken_alias_2 }
|
|
760
|
+
|
|
761
|
+
declare class InstanceDestroying extends Error {
|
|
762
|
+
name: string;
|
|
763
|
+
code: ErrorsEnum;
|
|
764
|
+
constructor(name: string);
|
|
765
|
+
}
|
|
766
|
+
export { InstanceDestroying }
|
|
767
|
+
export { InstanceDestroying as InstanceDestroying_alias_1 }
|
|
768
|
+
export { InstanceDestroying as InstanceDestroying_alias_2 }
|
|
769
|
+
export { InstanceDestroying as InstanceDestroying_alias_3 }
|
|
770
|
+
|
|
771
|
+
declare class InstanceExpired extends Error {
|
|
772
|
+
name: string;
|
|
773
|
+
code: ErrorsEnum;
|
|
774
|
+
constructor(name: string);
|
|
775
|
+
}
|
|
776
|
+
export { InstanceExpired }
|
|
777
|
+
export { InstanceExpired as InstanceExpired_alias_1 }
|
|
778
|
+
export { InstanceExpired as InstanceExpired_alias_2 }
|
|
779
|
+
export { InstanceExpired as InstanceExpired_alias_3 }
|
|
780
|
+
|
|
781
|
+
declare class InstanceNotFound extends Error {
|
|
782
|
+
name: string;
|
|
783
|
+
code: ErrorsEnum;
|
|
784
|
+
constructor(name: string);
|
|
785
|
+
}
|
|
786
|
+
export { InstanceNotFound }
|
|
787
|
+
export { InstanceNotFound as InstanceNotFound_alias_1 }
|
|
788
|
+
export { InstanceNotFound as InstanceNotFound_alias_2 }
|
|
789
|
+
export { InstanceNotFound as InstanceNotFound_alias_3 }
|
|
790
|
+
|
|
791
|
+
declare class InternalServerErrorException extends HttpException {
|
|
792
|
+
constructor(message: string | object, error?: Error);
|
|
793
|
+
}
|
|
794
|
+
export { InternalServerErrorException }
|
|
795
|
+
export { InternalServerErrorException as InternalServerErrorException_alias_1 }
|
|
796
|
+
export { InternalServerErrorException as InternalServerErrorException_alias_2 }
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* Evaluates to `true` if `T` is `any`. `false` otherwise.
|
|
800
|
+
* (c) https://stackoverflow.com/a/68633327/5290447
|
|
801
|
+
*/
|
|
802
|
+
declare type IsAny<T> = unknown extends T ? [keyof T] extends [never] ? false : true : false;
|
|
803
|
+
|
|
804
|
+
declare const isConstructor: (val: any) => boolean;
|
|
805
|
+
export { isConstructor }
|
|
806
|
+
export { isConstructor as isConstructor_alias_1 }
|
|
807
|
+
export { isConstructor as isConstructor_alias_2 }
|
|
808
|
+
export { isConstructor as isConstructor_alias_3 }
|
|
809
|
+
|
|
810
|
+
declare const isEmpty: (array: any) => boolean;
|
|
811
|
+
export { isEmpty }
|
|
812
|
+
export { isEmpty as isEmpty_alias_1 }
|
|
813
|
+
export { isEmpty as isEmpty_alias_2 }
|
|
814
|
+
export { isEmpty as isEmpty_alias_3 }
|
|
815
|
+
|
|
816
|
+
declare const isFunction: (val: any) => val is Function;
|
|
817
|
+
export { isFunction }
|
|
818
|
+
export { isFunction as isFunction_alias_1 }
|
|
819
|
+
export { isFunction as isFunction_alias_2 }
|
|
820
|
+
export { isFunction as isFunction_alias_3 }
|
|
821
|
+
|
|
822
|
+
/**
|
|
823
|
+
* @publicApi
|
|
824
|
+
*/
|
|
825
|
+
declare function isLogLevel(maybeLogLevel: any): maybeLogLevel is LogLevel;
|
|
826
|
+
export { isLogLevel }
|
|
827
|
+
export { isLogLevel as isLogLevel_alias_1 }
|
|
828
|
+
export { isLogLevel as isLogLevel_alias_2 }
|
|
829
|
+
export { isLogLevel as isLogLevel_alias_3 }
|
|
830
|
+
|
|
831
|
+
/**
|
|
832
|
+
* Checks if target level is enabled.
|
|
833
|
+
* @param targetLevel target level
|
|
834
|
+
* @param logLevels array of enabled log levels
|
|
835
|
+
*/
|
|
836
|
+
declare function isLogLevelEnabled(targetLevel: LogLevel, logLevels: LogLevel[] | undefined): boolean;
|
|
837
|
+
export { isLogLevelEnabled }
|
|
838
|
+
export { isLogLevelEnabled as isLogLevelEnabled_alias_1 }
|
|
839
|
+
export { isLogLevelEnabled as isLogLevelEnabled_alias_2 }
|
|
840
|
+
export { isLogLevelEnabled as isLogLevelEnabled_alias_3 }
|
|
841
|
+
|
|
842
|
+
declare const isNil: (val: any) => val is null | undefined;
|
|
843
|
+
export { isNil }
|
|
844
|
+
export { isNil as isNil_alias_1 }
|
|
845
|
+
export { isNil as isNil_alias_2 }
|
|
846
|
+
export { isNil as isNil_alias_3 }
|
|
847
|
+
|
|
848
|
+
declare const isNumber: (val: any) => val is number;
|
|
849
|
+
export { isNumber }
|
|
850
|
+
export { isNumber as isNumber_alias_1 }
|
|
851
|
+
export { isNumber as isNumber_alias_2 }
|
|
852
|
+
export { isNumber as isNumber_alias_3 }
|
|
853
|
+
|
|
854
|
+
declare const isObject: (fn: any) => fn is object;
|
|
855
|
+
export { isObject }
|
|
856
|
+
export { isObject as isObject_alias_1 }
|
|
857
|
+
export { isObject as isObject_alias_2 }
|
|
858
|
+
export { isObject as isObject_alias_3 }
|
|
859
|
+
|
|
860
|
+
declare const isPlainObject: (fn: any) => fn is object;
|
|
861
|
+
export { isPlainObject }
|
|
862
|
+
export { isPlainObject as isPlainObject_alias_1 }
|
|
863
|
+
export { isPlainObject as isPlainObject_alias_2 }
|
|
864
|
+
export { isPlainObject as isPlainObject_alias_3 }
|
|
865
|
+
|
|
866
|
+
declare const isString: (val: any) => val is string;
|
|
867
|
+
export { isString }
|
|
868
|
+
export { isString as isString_alias_1 }
|
|
869
|
+
export { isString as isString_alias_2 }
|
|
870
|
+
export { isString as isString_alias_3 }
|
|
871
|
+
|
|
872
|
+
declare const isSymbol: (val: any) => val is symbol;
|
|
873
|
+
export { isSymbol }
|
|
874
|
+
export { isSymbol as isSymbol_alias_1 }
|
|
875
|
+
export { isSymbol as isSymbol_alias_2 }
|
|
876
|
+
export { isSymbol as isSymbol_alias_3 }
|
|
877
|
+
|
|
878
|
+
declare const isUndefined: (obj: any) => obj is undefined;
|
|
879
|
+
export { isUndefined }
|
|
880
|
+
export { isUndefined as isUndefined_alias_1 }
|
|
881
|
+
export { isUndefined as isUndefined_alias_2 }
|
|
882
|
+
export { isUndefined as isUndefined_alias_3 }
|
|
883
|
+
|
|
884
|
+
declare const LOG_LEVELS: ["verbose", "debug", "log", "warn", "error", "fatal"];
|
|
885
|
+
export { LOG_LEVELS }
|
|
886
|
+
export { LOG_LEVELS as LOG_LEVELS_alias_1 }
|
|
887
|
+
export { LOG_LEVELS as LOG_LEVELS_alias_2 }
|
|
888
|
+
|
|
889
|
+
declare const Logger: InjectionToken<LoggerInstance, z.ZodOptional<z.ZodObject<{
|
|
890
|
+
context: z.ZodOptional<z.ZodString>;
|
|
891
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
892
|
+
timestamp: z.ZodOptional<z.ZodBoolean>;
|
|
893
|
+
}, "strip", z.ZodTypeAny, {
|
|
894
|
+
timestamp?: boolean | undefined;
|
|
895
|
+
}, {
|
|
896
|
+
timestamp?: boolean | undefined;
|
|
897
|
+
}>>;
|
|
898
|
+
}, "strip", z.ZodTypeAny, {
|
|
899
|
+
options?: {
|
|
900
|
+
timestamp?: boolean | undefined;
|
|
901
|
+
} | undefined;
|
|
902
|
+
context?: string | undefined;
|
|
903
|
+
}, {
|
|
904
|
+
options?: {
|
|
905
|
+
timestamp?: boolean | undefined;
|
|
906
|
+
} | undefined;
|
|
907
|
+
context?: string | undefined;
|
|
908
|
+
}>>>;
|
|
909
|
+
export { Logger }
|
|
910
|
+
export { Logger as Logger_alias_1 }
|
|
911
|
+
export { Logger as Logger_alias_2 }
|
|
912
|
+
|
|
913
|
+
declare class LoggerFactory {
|
|
914
|
+
create(ctx: any, args: z.infer<typeof LoggerOptions>): LoggerInstance;
|
|
915
|
+
}
|
|
916
|
+
export { LoggerFactory }
|
|
917
|
+
export { LoggerFactory as LoggerFactory_alias_1 }
|
|
918
|
+
export { LoggerFactory as LoggerFactory_alias_2 }
|
|
919
|
+
|
|
920
|
+
declare const LoggerInjectionToken = "LoggerInjectionToken";
|
|
921
|
+
export { LoggerInjectionToken }
|
|
922
|
+
export { LoggerInjectionToken as LoggerInjectionToken_alias_1 }
|
|
923
|
+
export { LoggerInjectionToken as LoggerInjectionToken_alias_2 }
|
|
924
|
+
|
|
925
|
+
declare class LoggerInstance implements LoggerService {
|
|
926
|
+
protected context?: string | undefined;
|
|
927
|
+
protected options: {
|
|
928
|
+
timestamp?: boolean;
|
|
929
|
+
};
|
|
930
|
+
protected static staticInstanceRef?: LoggerService;
|
|
931
|
+
protected static logLevels?: LogLevel[];
|
|
932
|
+
protected localInstanceRef?: LoggerService;
|
|
933
|
+
constructor();
|
|
934
|
+
constructor(context: string);
|
|
935
|
+
constructor(context: string, options?: {
|
|
936
|
+
timestamp?: boolean;
|
|
937
|
+
});
|
|
938
|
+
get localInstance(): LoggerService;
|
|
939
|
+
/**
|
|
940
|
+
* Write an 'error' level log.
|
|
941
|
+
*/
|
|
942
|
+
error(message: any, stack?: string, context?: string): void;
|
|
943
|
+
error(message: any, ...optionalParams: [...any, string?, string?]): void;
|
|
944
|
+
/**
|
|
945
|
+
* Write a 'log' level log.
|
|
946
|
+
*/
|
|
947
|
+
log(message: any, context?: string): void;
|
|
948
|
+
log(message: any, ...optionalParams: [...any, string?]): void;
|
|
949
|
+
/**
|
|
950
|
+
* Write a 'warn' level log.
|
|
951
|
+
*/
|
|
952
|
+
warn(message: any, context?: string): void;
|
|
953
|
+
warn(message: any, ...optionalParams: [...any, string?]): void;
|
|
954
|
+
/**
|
|
955
|
+
* Write a 'debug' level log.
|
|
956
|
+
*/
|
|
957
|
+
debug(message: any, context?: string): void;
|
|
958
|
+
debug(message: any, ...optionalParams: [...any, string?]): void;
|
|
959
|
+
/**
|
|
960
|
+
* Write a 'verbose' level log.
|
|
961
|
+
*/
|
|
962
|
+
verbose(message: any, context?: string): void;
|
|
963
|
+
verbose(message: any, ...optionalParams: [...any, string?]): void;
|
|
964
|
+
/**
|
|
965
|
+
* Write a 'fatal' level log.
|
|
966
|
+
*/
|
|
967
|
+
fatal(message: any, context?: string): void;
|
|
968
|
+
fatal(message: any, ...optionalParams: [...any, string?]): void;
|
|
969
|
+
/**
|
|
970
|
+
* Write an 'error' level log.
|
|
971
|
+
*/
|
|
972
|
+
static error(message: any, stackOrContext?: string): void;
|
|
973
|
+
static error(message: any, context?: string): void;
|
|
974
|
+
static error(message: any, stack?: string, context?: string): void;
|
|
975
|
+
static error(message: any, ...optionalParams: [...any, string?, string?]): void;
|
|
976
|
+
/**
|
|
977
|
+
* Write a 'log' level log.
|
|
978
|
+
*/
|
|
979
|
+
static log(message: any, context?: string): void;
|
|
980
|
+
static log(message: any, ...optionalParams: [...any, string?]): void;
|
|
981
|
+
/**
|
|
982
|
+
* Write a 'warn' level log.
|
|
983
|
+
*/
|
|
984
|
+
static warn(message: any, context?: string): void;
|
|
985
|
+
static warn(message: any, ...optionalParams: [...any, string?]): void;
|
|
986
|
+
/**
|
|
987
|
+
* Write a 'debug' level log, if the configured level allows for it.
|
|
988
|
+
* Prints to `stdout` with newline.
|
|
989
|
+
*/
|
|
990
|
+
static debug(message: any, context?: string): void;
|
|
991
|
+
static debug(message: any, ...optionalParams: [...any, string?]): void;
|
|
992
|
+
/**
|
|
993
|
+
* Write a 'verbose' level log.
|
|
994
|
+
*/
|
|
995
|
+
static verbose(message: any, context?: string): void;
|
|
996
|
+
static verbose(message: any, ...optionalParams: [...any, string?]): void;
|
|
997
|
+
/**
|
|
998
|
+
* Write a 'fatal' level log.
|
|
999
|
+
*/
|
|
1000
|
+
static fatal(message: any, context?: string): void;
|
|
1001
|
+
static fatal(message: any, ...optionalParams: [...any, string?]): void;
|
|
1002
|
+
static getTimestamp(): string;
|
|
1003
|
+
static overrideLogger(logger: LoggerService | LogLevel[] | boolean): any;
|
|
1004
|
+
static isLevelEnabled(level: LogLevel): boolean;
|
|
1005
|
+
private registerLocalInstanceRef;
|
|
1006
|
+
}
|
|
1007
|
+
export { LoggerInstance }
|
|
1008
|
+
export { LoggerInstance as LoggerInstance_alias_1 }
|
|
1009
|
+
export { LoggerInstance as LoggerInstance_alias_2 }
|
|
1010
|
+
|
|
1011
|
+
declare const LoggerOptions: z.ZodOptional<z.ZodObject<{
|
|
1012
|
+
context: z.ZodOptional<z.ZodString>;
|
|
1013
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
1014
|
+
timestamp: z.ZodOptional<z.ZodBoolean>;
|
|
1015
|
+
}, "strip", z.ZodTypeAny, {
|
|
1016
|
+
timestamp?: boolean | undefined;
|
|
1017
|
+
}, {
|
|
1018
|
+
timestamp?: boolean | undefined;
|
|
1019
|
+
}>>;
|
|
1020
|
+
}, "strip", z.ZodTypeAny, {
|
|
1021
|
+
options?: {
|
|
1022
|
+
timestamp?: boolean | undefined;
|
|
1023
|
+
} | undefined;
|
|
1024
|
+
context?: string | undefined;
|
|
1025
|
+
}, {
|
|
1026
|
+
options?: {
|
|
1027
|
+
timestamp?: boolean | undefined;
|
|
1028
|
+
} | undefined;
|
|
1029
|
+
context?: string | undefined;
|
|
1030
|
+
}>>;
|
|
1031
|
+
export { LoggerOptions }
|
|
1032
|
+
export { LoggerOptions as LoggerOptions_alias_1 }
|
|
1033
|
+
export { LoggerOptions as LoggerOptions_alias_2 }
|
|
1034
|
+
|
|
1035
|
+
/**
|
|
1036
|
+
* @publicApi
|
|
1037
|
+
*/
|
|
1038
|
+
declare interface LoggerService {
|
|
1039
|
+
/**
|
|
1040
|
+
* Write a 'log' level log.
|
|
1041
|
+
*/
|
|
1042
|
+
log(message: any, ...optionalParams: any[]): any;
|
|
1043
|
+
/**
|
|
1044
|
+
* Write an 'error' level log.
|
|
1045
|
+
*/
|
|
1046
|
+
error(message: any, ...optionalParams: any[]): any;
|
|
1047
|
+
/**
|
|
1048
|
+
* Write a 'warn' level log.
|
|
1049
|
+
*/
|
|
1050
|
+
warn(message: any, ...optionalParams: any[]): any;
|
|
1051
|
+
/**
|
|
1052
|
+
* Write a 'debug' level log.
|
|
1053
|
+
*/
|
|
1054
|
+
debug?(message: any, ...optionalParams: any[]): any;
|
|
1055
|
+
/**
|
|
1056
|
+
* Write a 'verbose' level log.
|
|
1057
|
+
*/
|
|
1058
|
+
verbose?(message: any, ...optionalParams: any[]): any;
|
|
1059
|
+
/**
|
|
1060
|
+
* Write a 'fatal' level log.
|
|
1061
|
+
*/
|
|
1062
|
+
fatal?(message: any, ...optionalParams: any[]): any;
|
|
1063
|
+
/**
|
|
1064
|
+
* Set log levels.
|
|
1065
|
+
* @param levels log levels
|
|
1066
|
+
*/
|
|
1067
|
+
setLogLevels?(levels: LogLevel[]): any;
|
|
1068
|
+
}
|
|
1069
|
+
export { LoggerService }
|
|
1070
|
+
export { LoggerService as LoggerService_alias_1 }
|
|
1071
|
+
export { LoggerService as LoggerService_alias_2 }
|
|
1072
|
+
|
|
1073
|
+
/**
|
|
1074
|
+
* @publicApi
|
|
1075
|
+
*/
|
|
1076
|
+
declare type LogLevel = (typeof LOG_LEVELS)[number];
|
|
1077
|
+
export { LogLevel }
|
|
1078
|
+
export { LogLevel as LogLevel_alias_1 }
|
|
1079
|
+
export { LogLevel as LogLevel_alias_2 }
|
|
1080
|
+
|
|
1081
|
+
export declare function makeProxyServiceLocator(serviceLocator: ServiceLocator, ctx: ServiceLocatorAbstractFactoryContext): ServiceLocator;
|
|
1082
|
+
|
|
1083
|
+
declare function Module(metadata: ModuleOptions): (target: ClassType, context: ClassDecoratorContext) => ClassType;
|
|
1084
|
+
export { Module }
|
|
1085
|
+
export { Module as Module_alias_1 }
|
|
1086
|
+
export { Module as Module_alias_2 }
|
|
1087
|
+
|
|
1088
|
+
declare class ModuleLoaderService {
|
|
1089
|
+
private logger;
|
|
1090
|
+
private modulesMetadata;
|
|
1091
|
+
private loadedModules;
|
|
1092
|
+
private initialized;
|
|
1093
|
+
loadModules(appModule: ClassTypeWithInstance<NaviosModule>): Promise<void>;
|
|
1094
|
+
private traverseModules;
|
|
1095
|
+
private mergeMetadata;
|
|
1096
|
+
getAllModules(): Map<string, ModuleMetadata>;
|
|
1097
|
+
dispose(): void;
|
|
1098
|
+
}
|
|
1099
|
+
export { ModuleLoaderService }
|
|
1100
|
+
export { ModuleLoaderService as ModuleLoaderService_alias_1 }
|
|
1101
|
+
export { ModuleLoaderService as ModuleLoaderService_alias_2 }
|
|
1102
|
+
|
|
1103
|
+
declare interface ModuleMetadata {
|
|
1104
|
+
controllers: Set<ClassType>;
|
|
1105
|
+
imports: Set<ClassType>;
|
|
1106
|
+
guards: Set<ClassTypeWithInstance<CanActivate> | InjectionToken<CanActivate, undefined>>;
|
|
1107
|
+
customAttributes: Map<string | symbol, any>;
|
|
1108
|
+
}
|
|
1109
|
+
export { ModuleMetadata }
|
|
1110
|
+
export { ModuleMetadata as ModuleMetadata_alias_1 }
|
|
1111
|
+
export { ModuleMetadata as ModuleMetadata_alias_2 }
|
|
1112
|
+
|
|
1113
|
+
declare const ModuleMetadataKey: unique symbol;
|
|
1114
|
+
export { ModuleMetadataKey }
|
|
1115
|
+
export { ModuleMetadataKey as ModuleMetadataKey_alias_1 }
|
|
1116
|
+
export { ModuleMetadataKey as ModuleMetadataKey_alias_2 }
|
|
1117
|
+
|
|
1118
|
+
declare interface ModuleOptions {
|
|
1119
|
+
controllers?: ClassType[] | Set<ClassType>;
|
|
1120
|
+
imports?: ClassType[] | Set<ClassType>;
|
|
1121
|
+
guards?: ClassType[] | Set<ClassType>;
|
|
1122
|
+
}
|
|
1123
|
+
export { ModuleOptions }
|
|
1124
|
+
export { ModuleOptions as ModuleOptions_alias_1 }
|
|
1125
|
+
export { ModuleOptions as ModuleOptions_alias_2 }
|
|
1126
|
+
|
|
1127
|
+
declare class NaviosApplication {
|
|
1128
|
+
private moduleLoader;
|
|
1129
|
+
private controllerAdapter;
|
|
1130
|
+
private logger;
|
|
1131
|
+
private server;
|
|
1132
|
+
private corsOptions;
|
|
1133
|
+
private globalPrefix;
|
|
1134
|
+
private appModule;
|
|
1135
|
+
private options;
|
|
1136
|
+
isInitialized: boolean;
|
|
1137
|
+
setup(appModule: ClassTypeWithInstance<NaviosModule>, options?: NaviosApplicationOptions): void;
|
|
1138
|
+
init(): Promise<void>;
|
|
1139
|
+
private getFastifyInstance;
|
|
1140
|
+
private configureFastifyInstance;
|
|
1141
|
+
private initModules;
|
|
1142
|
+
enableCors(options: FastifyCorsOptions): void;
|
|
1143
|
+
setGlobalPrefix(prefix: string): void;
|
|
1144
|
+
getServer(): FastifyInstance;
|
|
1145
|
+
listen(options: FastifyListenOptions): Promise<void>;
|
|
1146
|
+
dispose(): Promise<void>;
|
|
1147
|
+
close(): Promise<void>;
|
|
1148
|
+
}
|
|
1149
|
+
export { NaviosApplication }
|
|
1150
|
+
export { NaviosApplication as NaviosApplication_alias_1 }
|
|
1151
|
+
|
|
1152
|
+
declare interface NaviosApplicationContextOptions {
|
|
1153
|
+
/**
|
|
1154
|
+
* Specifies the logger to use. Pass `false` to turn off logging.
|
|
1155
|
+
*/
|
|
1156
|
+
logger?: LoggerService | LogLevel[] | false;
|
|
1157
|
+
}
|
|
1158
|
+
export { NaviosApplicationContextOptions }
|
|
1159
|
+
export { NaviosApplicationContextOptions as NaviosApplicationContextOptions_alias_1 }
|
|
1160
|
+
|
|
1161
|
+
declare interface NaviosApplicationOptions extends Omit<FastifyServerOptions, 'logger'>, NaviosApplicationContextOptions {
|
|
1162
|
+
}
|
|
1163
|
+
export { NaviosApplicationOptions }
|
|
1164
|
+
export { NaviosApplicationOptions as NaviosApplicationOptions_alias_1 }
|
|
1165
|
+
|
|
1166
|
+
declare class NaviosFactory {
|
|
1167
|
+
static create(appModule: ClassTypeWithInstance<NaviosModule>, options?: NaviosApplicationOptions): Promise<NaviosApplication>;
|
|
1168
|
+
private static registerLoggerConfiguration;
|
|
1169
|
+
}
|
|
1170
|
+
export { NaviosFactory }
|
|
1171
|
+
export { NaviosFactory as NaviosFactory_alias_1 }
|
|
1172
|
+
|
|
1173
|
+
declare interface NaviosModule {
|
|
1174
|
+
onModuleInit?: () => Promise<void> | void;
|
|
1175
|
+
}
|
|
1176
|
+
export { NaviosModule }
|
|
1177
|
+
export { NaviosModule as NaviosModule_alias_1 }
|
|
1178
|
+
export { NaviosModule as NaviosModule_alias_2 }
|
|
1179
|
+
|
|
1180
|
+
declare const normalizePath: (path?: string) => string;
|
|
1181
|
+
export { normalizePath }
|
|
1182
|
+
export { normalizePath as normalizePath_alias_1 }
|
|
1183
|
+
export { normalizePath as normalizePath_alias_2 }
|
|
1184
|
+
export { normalizePath as normalizePath_alias_3 }
|
|
1185
|
+
|
|
1186
|
+
declare class NotFoundException extends HttpException {
|
|
1187
|
+
readonly response: string | object;
|
|
1188
|
+
readonly error?: Error | undefined;
|
|
1189
|
+
constructor(response: string | object, error?: Error | undefined);
|
|
1190
|
+
}
|
|
1191
|
+
export { NotFoundException }
|
|
1192
|
+
export { NotFoundException as NotFoundException_alias_1 }
|
|
1193
|
+
export { NotFoundException as NotFoundException_alias_2 }
|
|
1194
|
+
|
|
1195
|
+
/**
|
|
1196
|
+
* Useful for tests or when you want to override a service
|
|
1197
|
+
* with a different implementation.
|
|
1198
|
+
*/
|
|
1199
|
+
declare function override<T>(token: InjectionToken<T>, target: ClassType): () => void;
|
|
1200
|
+
export { override }
|
|
1201
|
+
export { override as override_alias_1 }
|
|
1202
|
+
export { override as override_alias_2 }
|
|
1203
|
+
|
|
1204
|
+
declare type Path<T> = keyof T extends string ? PathImpl2<T> extends infer P ? P extends string | keyof T ? P : keyof T : keyof T : never;
|
|
1205
|
+
export { Path }
|
|
1206
|
+
export { Path as Path_alias_1 }
|
|
1207
|
+
export { Path as Path_alias_2 }
|
|
1208
|
+
|
|
1209
|
+
declare type PathImpl<T, Key extends keyof T> = Key extends string ? Key extends ExcludedKeys ? never : IsAny<T[Key]> extends true ? never : T[Key] extends string ? never : T[Key] extends any[] ? never : T[Key] extends Record<string, any> ? Key extends ExcludedParts ? `${Key}.${Exclude<keyof T[Key], keyof any[]> & string}` : `${Key}.${PathImpl<T[Key], Exclude<keyof T[Key], keyof any[]>> & string}` | `${Key}.${Exclude<keyof T[Key], keyof any[]> & string}` : never : never;
|
|
1210
|
+
export { PathImpl }
|
|
1211
|
+
export { PathImpl as PathImpl_alias_1 }
|
|
1212
|
+
export { PathImpl as PathImpl_alias_2 }
|
|
1213
|
+
|
|
1214
|
+
declare type PathImpl2<T> = PathImpl<T, keyof T> | keyof T;
|
|
1215
|
+
export { PathImpl2 }
|
|
1216
|
+
export { PathImpl2 as PathImpl2_alias_1 }
|
|
1217
|
+
export { PathImpl2 as PathImpl2_alias_2 }
|
|
1218
|
+
|
|
1219
|
+
declare type PathValue<T, P extends Path<T>> = P extends `${infer Key}.${infer Rest}` ? Key extends keyof T ? Rest extends Path<T[Key]> ? PathValue<T[Key], Rest> : never : never : P extends keyof T ? T[P] : never;
|
|
1220
|
+
export { PathValue }
|
|
1221
|
+
export { PathValue as PathValue_alias_1 }
|
|
1222
|
+
export { PathValue as PathValue_alias_2 }
|
|
1223
|
+
|
|
1224
|
+
declare class PinoWrapper {
|
|
1225
|
+
protected readonly logger: LoggerService;
|
|
1226
|
+
constructor(logger: LoggerService);
|
|
1227
|
+
fatal(message: any, ...optionalParams: any[]): void;
|
|
1228
|
+
error(message: any, ...optionalParams: any[]): void;
|
|
1229
|
+
warn(message: any, ...optionalParams: any[]): void;
|
|
1230
|
+
info(): void;
|
|
1231
|
+
debug(message: any, ...optionalParams: any[]): void;
|
|
1232
|
+
trace(message: any, ...optionalParams: any[]): void;
|
|
1233
|
+
silent(): void;
|
|
1234
|
+
child(options: any): PinoWrapper;
|
|
1235
|
+
get level(): any;
|
|
1236
|
+
}
|
|
1237
|
+
export { PinoWrapper }
|
|
1238
|
+
export { PinoWrapper as PinoWrapper_alias_1 }
|
|
1239
|
+
export { PinoWrapper as PinoWrapper_alias_2 }
|
|
1240
|
+
|
|
1241
|
+
declare let promiseCollector: null | ((promise: Promise<any>) => void);
|
|
1242
|
+
|
|
1243
|
+
declare function provideConfig<ConfigMap extends Record<string, unknown>>(options: z.input<typeof ConfigProviderOptions>): InjectionToken<ConfigServiceInstance<ConfigMap>, undefined>;
|
|
1244
|
+
export { provideConfig }
|
|
1245
|
+
export { provideConfig as provideConfig_alias_1 }
|
|
1246
|
+
export { provideConfig as provideConfig_alias_2 }
|
|
1247
|
+
|
|
1248
|
+
declare function provideServiceLocator(locator: ServiceLocator): ServiceLocator;
|
|
1249
|
+
export { provideServiceLocator }
|
|
1250
|
+
export { provideServiceLocator as provideServiceLocator_alias_1 }
|
|
1251
|
+
export { provideServiceLocator as provideServiceLocator_alias_2 }
|
|
1252
|
+
|
|
1253
|
+
export declare class ProxyServiceLocator implements ServiceLocator {
|
|
1254
|
+
private readonly serviceLocator;
|
|
1255
|
+
private readonly ctx;
|
|
1256
|
+
constructor(serviceLocator: ServiceLocator, ctx: ServiceLocatorAbstractFactoryContext);
|
|
1257
|
+
get abstractFactories(): Map<InjectionToken<any, any>, (ctx: ServiceLocatorAbstractFactoryContext, args: any) => Promise<any>>;
|
|
1258
|
+
getEventBus(): ServiceLocatorEventBus;
|
|
1259
|
+
registerAbstractFactory<Instance, Schema extends AnyZodObject | undefined>(token: InjectionToken<Instance, Schema>, factory: (ctx: ServiceLocatorAbstractFactoryContext, values: Schema extends AnyZodObject ? output<Schema> : undefined) => Promise<Instance>): void;
|
|
1260
|
+
getInstance<Instance, Schema extends AnyZodObject | ZodOptional<AnyZodObject> | undefined>(token: InjectionToken<Instance, Schema>, args: Schema extends AnyZodObject ? z.input<Schema> : Schema extends ZodOptional<AnyZodObject> ? z.input<Schema> | undefined : undefined): Promise<[undefined, Instance] | [UnknownError | FactoryNotFound]>;
|
|
1261
|
+
getOrThrowInstance<Instance, Schema extends AnyZodObject | ZodOptional<AnyZodObject> | undefined>(token: InjectionToken<Instance, Schema>, args: Schema extends AnyZodObject ? z.input<Schema> : Schema extends ZodOptional<AnyZodObject> ? z.input<Schema> | undefined : undefined): Promise<Instance>;
|
|
1262
|
+
getSyncInstance<Instance, Schema extends AnyZodObject | ZodOptional<AnyZodObject> | undefined>(token: InjectionToken<Instance, Schema>, args: Schema extends AnyZodObject ? z.input<Schema> : Schema extends ZodOptional<AnyZodObject> ? z.input<Schema> | undefined : undefined): Instance | null;
|
|
1263
|
+
invalidate(service: string, round?: number): Promise<any>;
|
|
1264
|
+
ready(): Promise<null>;
|
|
1265
|
+
makeInstanceName(token: InjectionToken<any, any>, args: any): string;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
declare const Reply: InjectionToken<FastifyReply<RouteGenericInterface, RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, unknown, FastifySchema, FastifyTypeProviderDefault, unknown>, undefined>;
|
|
1269
|
+
export { Reply }
|
|
1270
|
+
export { Reply as Reply_alias_1 }
|
|
1271
|
+
export { Reply as Reply_alias_2 }
|
|
1272
|
+
|
|
1273
|
+
declare const Request_2: InjectionToken<FastifyRequest<RouteGenericInterface, RawServerDefault, IncomingMessage, FastifySchema, FastifyTypeProviderDefault, unknown, FastifyBaseLogger, ResolveFastifyRequestType<FastifyTypeProviderDefault, FastifySchema, RouteGenericInterface>>, undefined>;
|
|
1274
|
+
export { Request_2 as Request }
|
|
1275
|
+
export { Request_2 as Request_alias_1 }
|
|
1276
|
+
export { Request_2 as Request_alias_2 }
|
|
1277
|
+
|
|
1278
|
+
declare function resolveService<T extends ClassType>(ctx: ServiceLocatorAbstractFactoryContext, target: T, args?: any[]): Promise<InstanceType<T>>;
|
|
1279
|
+
export { resolveService }
|
|
1280
|
+
export { resolveService as resolveService_alias_1 }
|
|
1281
|
+
export { resolveService as resolveService_alias_2 }
|
|
1282
|
+
|
|
1283
|
+
declare class ServiceLocator {
|
|
1284
|
+
private readonly logger;
|
|
1285
|
+
private abstractFactories;
|
|
1286
|
+
private instanceFactories;
|
|
1287
|
+
private readonly eventBus;
|
|
1288
|
+
private readonly manager;
|
|
1289
|
+
constructor(logger?: Console | null);
|
|
1290
|
+
getEventBus(): ServiceLocatorEventBus;
|
|
1291
|
+
registerInstance<Instance>(token: InjectionToken<Instance, undefined>, instance: Instance): void;
|
|
1292
|
+
removeInstance<Instance>(token: InjectionToken<Instance, undefined>): Promise<any>;
|
|
1293
|
+
registerAbstractFactory<Instance, Schema extends AnyZodObject | ZodOptional<AnyZodObject> | undefined>(token: InjectionToken<Instance, Schema>, factory: (ctx: ServiceLocatorAbstractFactoryContext, values: Schema extends AnyZodObject ? z.output<Schema> : undefined) => Promise<Instance>, type?: InjectableScope): void;
|
|
1294
|
+
private resolveTokenArgs;
|
|
1295
|
+
getInstanceIdentifier<Instance, Schema extends AnyZodObject | ZodOptional<AnyZodObject> | undefined>(token: InjectionToken<Instance, Schema>, args: Schema extends AnyZodObject ? z.input<Schema> : Schema extends ZodOptional<AnyZodObject> ? z.input<Schema> | undefined : undefined): string;
|
|
1296
|
+
getInstance<Instance, Schema extends AnyZodObject | ZodOptional<AnyZodObject> | undefined>(token: InjectionToken<Instance, Schema>, args: Schema extends AnyZodObject ? z.input<Schema> : Schema extends ZodOptional<AnyZodObject> ? z.input<Schema> | undefined : undefined): Promise<[undefined, Instance] | [UnknownError | FactoryNotFound]>;
|
|
1297
|
+
getOrThrowInstance<Instance, Schema extends AnyZodObject | ZodOptional<AnyZodObject> | undefined>(token: InjectionToken<Instance, Schema>, args: Schema extends AnyZodObject ? z.input<Schema> : Schema extends ZodOptional<AnyZodObject> ? z.input<Schema> | undefined : undefined): Promise<Instance>;
|
|
1298
|
+
private notifyListeners;
|
|
1299
|
+
private createInstance;
|
|
1300
|
+
private createInstanceFromAbstractFactory;
|
|
1301
|
+
private createContextForAbstractFactory;
|
|
1302
|
+
getSyncInstance<Instance, Schema extends AnyZodObject | ZodOptional<AnyZodObject> | undefined>(token: InjectionToken<Instance, Schema>, args: Schema extends AnyZodObject ? z.input<Schema> : Schema extends ZodOptional<AnyZodObject> ? z.input<Schema> | undefined : undefined): Instance | null;
|
|
1303
|
+
invalidate(service: string, round?: number): Promise<any>;
|
|
1304
|
+
ready(): Promise<null>;
|
|
1305
|
+
makeInstanceName(token: InjectionToken<any, any>, args: any): string;
|
|
1306
|
+
}
|
|
1307
|
+
export { ServiceLocator }
|
|
1308
|
+
export { ServiceLocator as ServiceLocator_alias_1 }
|
|
1309
|
+
export { ServiceLocator as ServiceLocator_alias_2 }
|
|
1310
|
+
|
|
1311
|
+
declare interface ServiceLocatorAbstractFactoryContext {
|
|
1312
|
+
inject: typeof inject;
|
|
1313
|
+
addDependency: ((token: InjectionToken<any, undefined>) => void) | (<S extends AnyZodObject>(token: InjectionToken<any, S>, args: z.input<S>) => void);
|
|
1314
|
+
on: ServiceLocatorEventBus['on'];
|
|
1315
|
+
getDependencies: () => string[];
|
|
1316
|
+
invalidate: () => void;
|
|
1317
|
+
addEffect: (listener: () => void) => void;
|
|
1318
|
+
getDestroyListeners: () => (() => void)[];
|
|
1319
|
+
setTtl: (ttl: number) => void;
|
|
1320
|
+
getTtl: () => number;
|
|
1321
|
+
}
|
|
1322
|
+
export { ServiceLocatorAbstractFactoryContext }
|
|
1323
|
+
export { ServiceLocatorAbstractFactoryContext as ServiceLocatorAbstractFactoryContext_alias_1 }
|
|
1324
|
+
export { ServiceLocatorAbstractFactoryContext as ServiceLocatorAbstractFactoryContext_alias_2 }
|
|
1325
|
+
|
|
1326
|
+
declare class ServiceLocatorEventBus {
|
|
1327
|
+
private readonly logger;
|
|
1328
|
+
private listeners;
|
|
1329
|
+
constructor(logger?: Console | null);
|
|
1330
|
+
on<Event extends string | `pre:${string}` | `post:${string}`>(ns: string, event: Event, listener: (event: Event) => void): () => void;
|
|
1331
|
+
emit(key: string, event: string): Promise<PromiseSettledResult<any>[] | undefined>;
|
|
1332
|
+
}
|
|
1333
|
+
export { ServiceLocatorEventBus }
|
|
1334
|
+
export { ServiceLocatorEventBus as ServiceLocatorEventBus_alias_1 }
|
|
1335
|
+
export { ServiceLocatorEventBus as ServiceLocatorEventBus_alias_2 }
|
|
1336
|
+
|
|
1337
|
+
declare type ServiceLocatorInstanceDestroyListener = () => void | Promise<void>;
|
|
1338
|
+
export { ServiceLocatorInstanceDestroyListener }
|
|
1339
|
+
export { ServiceLocatorInstanceDestroyListener as ServiceLocatorInstanceDestroyListener_alias_1 }
|
|
1340
|
+
export { ServiceLocatorInstanceDestroyListener as ServiceLocatorInstanceDestroyListener_alias_2 }
|
|
1341
|
+
|
|
1342
|
+
declare type ServiceLocatorInstanceEffect = () => void;
|
|
1343
|
+
export { ServiceLocatorInstanceEffect }
|
|
1344
|
+
export { ServiceLocatorInstanceEffect as ServiceLocatorInstanceEffect_alias_1 }
|
|
1345
|
+
export { ServiceLocatorInstanceEffect as ServiceLocatorInstanceEffect_alias_2 }
|
|
1346
|
+
|
|
1347
|
+
declare type ServiceLocatorInstanceHolder<Instance = unknown> = ServiceLocatorInstanceHolderCreating<Instance> | ServiceLocatorInstanceHolderCreated<Instance> | ServiceLocatorInstanceHolderDestroying<Instance>;
|
|
1348
|
+
export { ServiceLocatorInstanceHolder }
|
|
1349
|
+
export { ServiceLocatorInstanceHolder as ServiceLocatorInstanceHolder_alias_1 }
|
|
1350
|
+
export { ServiceLocatorInstanceHolder as ServiceLocatorInstanceHolder_alias_2 }
|
|
1351
|
+
|
|
1352
|
+
declare interface ServiceLocatorInstanceHolderCreated<Instance> {
|
|
1353
|
+
status: ServiceLocatorInstanceHolderStatus.Created;
|
|
1354
|
+
name: string;
|
|
1355
|
+
instance: Instance;
|
|
1356
|
+
creationPromise: null;
|
|
1357
|
+
destroyPromise: null;
|
|
1358
|
+
kind: ServiceLocatorInstanceHolderKind;
|
|
1359
|
+
effects: ServiceLocatorInstanceEffect[];
|
|
1360
|
+
deps: string[];
|
|
1361
|
+
destroyListeners: ServiceLocatorInstanceDestroyListener[];
|
|
1362
|
+
createdAt: number;
|
|
1363
|
+
ttl: number;
|
|
1364
|
+
}
|
|
1365
|
+
export { ServiceLocatorInstanceHolderCreated }
|
|
1366
|
+
export { ServiceLocatorInstanceHolderCreated as ServiceLocatorInstanceHolderCreated_alias_1 }
|
|
1367
|
+
export { ServiceLocatorInstanceHolderCreated as ServiceLocatorInstanceHolderCreated_alias_2 }
|
|
1368
|
+
|
|
1369
|
+
declare interface ServiceLocatorInstanceHolderCreating<Instance> {
|
|
1370
|
+
status: ServiceLocatorInstanceHolderStatus.Creating;
|
|
1371
|
+
name: string;
|
|
1372
|
+
instance: null;
|
|
1373
|
+
creationPromise: Promise<[undefined, Instance]> | null;
|
|
1374
|
+
destroyPromise: null;
|
|
1375
|
+
kind: ServiceLocatorInstanceHolderKind;
|
|
1376
|
+
effects: ServiceLocatorInstanceEffect[];
|
|
1377
|
+
deps: string[];
|
|
1378
|
+
destroyListeners: ServiceLocatorInstanceDestroyListener[];
|
|
1379
|
+
createdAt: number;
|
|
1380
|
+
ttl: number;
|
|
1381
|
+
}
|
|
1382
|
+
export { ServiceLocatorInstanceHolderCreating }
|
|
1383
|
+
export { ServiceLocatorInstanceHolderCreating as ServiceLocatorInstanceHolderCreating_alias_1 }
|
|
1384
|
+
export { ServiceLocatorInstanceHolderCreating as ServiceLocatorInstanceHolderCreating_alias_2 }
|
|
1385
|
+
|
|
1386
|
+
declare interface ServiceLocatorInstanceHolderDestroying<Instance> {
|
|
1387
|
+
status: ServiceLocatorInstanceHolderStatus.Destroying;
|
|
1388
|
+
name: string;
|
|
1389
|
+
instance: Instance | null;
|
|
1390
|
+
creationPromise: null;
|
|
1391
|
+
destroyPromise: Promise<void>;
|
|
1392
|
+
kind: ServiceLocatorInstanceHolderKind;
|
|
1393
|
+
effects: ServiceLocatorInstanceEffect[];
|
|
1394
|
+
deps: string[];
|
|
1395
|
+
destroyListeners: ServiceLocatorInstanceDestroyListener[];
|
|
1396
|
+
createdAt: number;
|
|
1397
|
+
ttl: number;
|
|
1398
|
+
}
|
|
1399
|
+
export { ServiceLocatorInstanceHolderDestroying }
|
|
1400
|
+
export { ServiceLocatorInstanceHolderDestroying as ServiceLocatorInstanceHolderDestroying_alias_1 }
|
|
1401
|
+
export { ServiceLocatorInstanceHolderDestroying as ServiceLocatorInstanceHolderDestroying_alias_2 }
|
|
1402
|
+
|
|
1403
|
+
declare enum ServiceLocatorInstanceHolderKind {
|
|
1404
|
+
Instance = "instance",
|
|
1405
|
+
Factory = "factory",
|
|
1406
|
+
AbstractFactory = "abstractFactory"
|
|
1407
|
+
}
|
|
1408
|
+
export { ServiceLocatorInstanceHolderKind }
|
|
1409
|
+
export { ServiceLocatorInstanceHolderKind as ServiceLocatorInstanceHolderKind_alias_1 }
|
|
1410
|
+
export { ServiceLocatorInstanceHolderKind as ServiceLocatorInstanceHolderKind_alias_2 }
|
|
1411
|
+
|
|
1412
|
+
declare enum ServiceLocatorInstanceHolderStatus {
|
|
1413
|
+
Created = "created",
|
|
1414
|
+
Creating = "creating",
|
|
1415
|
+
Destroying = "destroying"
|
|
1416
|
+
}
|
|
1417
|
+
export { ServiceLocatorInstanceHolderStatus }
|
|
1418
|
+
export { ServiceLocatorInstanceHolderStatus as ServiceLocatorInstanceHolderStatus_alias_1 }
|
|
1419
|
+
export { ServiceLocatorInstanceHolderStatus as ServiceLocatorInstanceHolderStatus_alias_2 }
|
|
1420
|
+
|
|
1421
|
+
declare class ServiceLocatorManager {
|
|
1422
|
+
private readonly logger;
|
|
1423
|
+
private readonly instancesHolders;
|
|
1424
|
+
constructor(logger?: Console | null);
|
|
1425
|
+
get(name: string): [InstanceExpired | InstanceDestroying, ServiceLocatorInstanceHolder] | [InstanceNotFound] | [undefined, ServiceLocatorInstanceHolder];
|
|
1426
|
+
set(name: string, holder: ServiceLocatorInstanceHolder): void;
|
|
1427
|
+
has(name: string): [InstanceExpired | InstanceDestroying] | [undefined, boolean];
|
|
1428
|
+
delete(name: string): boolean;
|
|
1429
|
+
filter(predicate: (value: ServiceLocatorInstanceHolder<any>, key: string) => boolean): Map<string, ServiceLocatorInstanceHolder>;
|
|
1430
|
+
}
|
|
1431
|
+
export { ServiceLocatorManager }
|
|
1432
|
+
export { ServiceLocatorManager as ServiceLocatorManager_alias_1 }
|
|
1433
|
+
export { ServiceLocatorManager as ServiceLocatorManager_alias_2 }
|
|
1434
|
+
|
|
1435
|
+
declare function setPromiseCollector(collector: null | ((promise: Promise<any>) => void)): typeof promiseCollector;
|
|
1436
|
+
export { setPromiseCollector }
|
|
1437
|
+
export { setPromiseCollector as setPromiseCollector_alias_1 }
|
|
1438
|
+
export { setPromiseCollector as setPromiseCollector_alias_2 }
|
|
1439
|
+
|
|
1440
|
+
declare const stripEndSlash: (path: string) => string;
|
|
1441
|
+
export { stripEndSlash }
|
|
1442
|
+
export { stripEndSlash as stripEndSlash_alias_1 }
|
|
1443
|
+
export { stripEndSlash as stripEndSlash_alias_2 }
|
|
1444
|
+
export { stripEndSlash as stripEndSlash_alias_3 }
|
|
1445
|
+
|
|
1446
|
+
declare function syncInject<T extends ClassType>(token: T): InstanceType<T>;
|
|
1447
|
+
|
|
1448
|
+
declare function syncInject<T, S extends AnyZodObject>(token: InjectionToken<T, S>, args: z.input<S>): T;
|
|
1449
|
+
|
|
1450
|
+
declare function syncInject<T, S extends ZodOptional<AnyZodObject>>(token: InjectionToken<T, S>, args: z.input<S>): T;
|
|
1451
|
+
|
|
1452
|
+
declare function syncInject<T>(token: InjectionToken<T, undefined>): T;
|
|
1453
|
+
export { syncInject }
|
|
1454
|
+
export { syncInject as syncInject_alias_1 }
|
|
1455
|
+
export { syncInject as syncInject_alias_2 }
|
|
1456
|
+
|
|
1457
|
+
declare class UnauthorizedException extends HttpException {
|
|
1458
|
+
constructor(message: string | object, error?: Error);
|
|
1459
|
+
}
|
|
1460
|
+
export { UnauthorizedException }
|
|
1461
|
+
export { UnauthorizedException as UnauthorizedException_alias_1 }
|
|
1462
|
+
export { UnauthorizedException as UnauthorizedException_alias_2 }
|
|
1463
|
+
|
|
1464
|
+
declare class UnknownError extends Error {
|
|
1465
|
+
code: ErrorsEnum;
|
|
1466
|
+
parent?: Error;
|
|
1467
|
+
constructor(message: string | Error);
|
|
1468
|
+
}
|
|
1469
|
+
export { UnknownError }
|
|
1470
|
+
export { UnknownError as UnknownError_alias_1 }
|
|
1471
|
+
export { UnknownError as UnknownError_alias_2 }
|
|
1472
|
+
export { UnknownError as UnknownError_alias_3 }
|
|
1473
|
+
|
|
1474
|
+
declare function UseGuards(...guards: (ClassTypeWithInstance<CanActivate> | InjectionToken<CanActivate, undefined>)[]): <T extends Function>(target: T, context: ClassMethodDecoratorContext | ClassDecoratorContext) => T;
|
|
1475
|
+
export { UseGuards }
|
|
1476
|
+
export { UseGuards as UseGuards_alias_1 }
|
|
1477
|
+
export { UseGuards as UseGuards_alias_2 }
|
|
1478
|
+
|
|
1479
|
+
declare const yellow: (text: string) => string;
|
|
1480
|
+
export { yellow }
|
|
1481
|
+
export { yellow as yellow_alias_1 }
|
|
1482
|
+
export { yellow as yellow_alias_2 }
|
|
1483
|
+
export { yellow as yellow_alias_3 }
|
|
1484
|
+
|
|
1485
|
+
export { }
|