@navios/core 0.1.15 → 0.2.1

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 (67) hide show
  1. package/dist/_tsup-dts-rollup.d.mts +96 -425
  2. package/dist/_tsup-dts-rollup.d.ts +96 -425
  3. package/dist/index.d.mts +54 -44
  4. package/dist/index.d.ts +54 -44
  5. package/dist/index.js +111 -1023
  6. package/dist/index.mjs +113 -982
  7. package/package.json +5 -4
  8. package/src/adapters/endpoint-adapter.service.mts +3 -6
  9. package/src/adapters/handler-adapter.interface.mts +1 -1
  10. package/src/adapters/multipart-adapter.service.mts +2 -1
  11. package/src/adapters/stream-adapter.service.mts +3 -7
  12. package/src/attribute.factory.mts +1 -1
  13. package/src/config/config.provider.mts +13 -11
  14. package/src/decorators/controller.decorator.mts +3 -6
  15. package/src/decorators/endpoint.decorator.mts +17 -10
  16. package/src/decorators/module.decorator.mts +3 -6
  17. package/src/decorators/multipart.decorator.mts +17 -10
  18. package/src/decorators/stream.decorator.mts +17 -10
  19. package/src/decorators/use-guards.decorator.mts +3 -2
  20. package/src/index.mts +1 -1
  21. package/src/logger/console-logger.service.mts +3 -2
  22. package/src/logger/logger.factory.mts +4 -5
  23. package/src/logger/logger.service.mts +2 -1
  24. package/src/metadata/controller.metadata.mts +3 -2
  25. package/src/metadata/handler.metadata.mts +1 -4
  26. package/src/metadata/index.mts +0 -1
  27. package/src/metadata/module.metadata.mts +3 -2
  28. package/src/navios.application.mts +9 -8
  29. package/src/navios.factory.mts +4 -2
  30. package/src/services/controller-adapter.service.mts +13 -12
  31. package/src/services/guard-runner.service.mts +4 -6
  32. package/src/services/module-loader.service.mts +4 -2
  33. package/src/tokens/application.token.mts +1 -1
  34. package/src/tokens/execution-context.token.mts +2 -1
  35. package/src/tokens/reply.token.mts +1 -1
  36. package/src/tokens/request.token.mts +1 -1
  37. package/src/metadata/injectable.metadata.mts +0 -11
  38. package/src/service-locator/__tests__/injectable.spec.mts +0 -171
  39. package/src/service-locator/__tests__/injection-token.spec.mts +0 -129
  40. package/src/service-locator/decorators/get-injectable-token.mts +0 -19
  41. package/src/service-locator/decorators/index.mts +0 -2
  42. package/src/service-locator/decorators/injectable.decorator.mts +0 -113
  43. package/src/service-locator/enums/index.mts +0 -1
  44. package/src/service-locator/enums/injectable-scope.enum.mts +0 -10
  45. package/src/service-locator/errors/errors.enum.mts +0 -8
  46. package/src/service-locator/errors/factory-not-found.mts +0 -8
  47. package/src/service-locator/errors/factory-token-not-resolved.mts +0 -10
  48. package/src/service-locator/errors/index.mts +0 -7
  49. package/src/service-locator/errors/instance-destroying.mts +0 -8
  50. package/src/service-locator/errors/instance-expired.mts +0 -8
  51. package/src/service-locator/errors/instance-not-found.mts +0 -8
  52. package/src/service-locator/errors/unknown-error.mts +0 -15
  53. package/src/service-locator/event-emitter.mts +0 -107
  54. package/src/service-locator/index.mts +0 -15
  55. package/src/service-locator/inject.mts +0 -42
  56. package/src/service-locator/injection-token.mts +0 -92
  57. package/src/service-locator/injector.mts +0 -18
  58. package/src/service-locator/interfaces/factory.interface.mts +0 -11
  59. package/src/service-locator/override.mts +0 -22
  60. package/src/service-locator/proxy-service-locator.mts +0 -99
  61. package/src/service-locator/resolve-service.mts +0 -46
  62. package/src/service-locator/service-locator-abstract-factory-context.mts +0 -23
  63. package/src/service-locator/service-locator-event-bus.mts +0 -96
  64. package/src/service-locator/service-locator-instance-holder.mts +0 -63
  65. package/src/service-locator/service-locator-manager.mts +0 -89
  66. package/src/service-locator/service-locator.mts +0 -535
  67. package/src/service-locator/sync-injector.mts +0 -66
@@ -1,7 +1,25 @@
1
1
  import type { AnyZodObject } from 'zod';
2
2
  import type { BaseEndpointConfig } from '@navios/common';
3
3
  import type { BaseStreamConfig } from '@navios/common';
4
+ import { BoundInjectionToken } from '@navios/di';
5
+ import { ChannelEmitter } from '@navios/di';
6
+ import { ClassType } from '@navios/di';
7
+ import { ClassTypeWithInstance } from '@navios/di';
8
+ import { CreateInjectorsOptions } from '@navios/di';
4
9
  import type { EndpointFunctionArgs } from '@navios/common';
10
+ import { ErrorsEnum } from '@navios/di';
11
+ import { EventEmitter } from '@navios/di';
12
+ import { EventEmitterInterface } from '@navios/di';
13
+ import { EventsArgs } from '@navios/di';
14
+ import { EventsConfig } from '@navios/di';
15
+ import { EventsNames } from '@navios/di';
16
+ import { Factory } from '@navios/di';
17
+ import { FactoryContext } from '@navios/di';
18
+ import { FactoryInjectionToken } from '@navios/di';
19
+ import { FactoryNotFound } from '@navios/di';
20
+ import { FactoryRecord } from '@navios/di';
21
+ import { FactoryTokenNotResolved } from '@navios/di';
22
+ import { FactoryWithArgs } from '@navios/di';
5
23
  import { FastifyBaseLogger } from 'fastify';
6
24
  import type { FastifyCorsOptions } from '@fastify/cors';
7
25
  import type { FastifyInstance } from 'fastify';
@@ -12,19 +30,54 @@ import type { FastifyRequest } from 'fastify';
12
30
  import { FastifySchema } from 'fastify';
13
31
  import type { FastifyServerOptions } from 'fastify';
14
32
  import { FastifyTypeProviderDefault } from 'fastify';
33
+ import { getGlobalServiceLocator } from '@navios/di';
34
+ import { getInjectableToken } from '@navios/di';
35
+ import { getInjectors } from '@navios/di';
36
+ import { globalRegistry } from '@navios/di';
15
37
  import type { HttpHeader } from 'fastify/types/utils.js';
16
38
  import type { HttpMethod } from '@navios/common';
17
39
  import { IncomingMessage } from 'http';
40
+ import { inject } from '@navios/di';
41
+ import { Injectable } from '@navios/di';
42
+ import { InjectableOptions } from '@navios/di';
43
+ import { InjectableScope } from '@navios/di';
44
+ import { InjectableTokenMeta } from '@navios/di';
45
+ import { InjectableType } from '@navios/di';
46
+ import { InjectionFactory } from '@navios/di';
47
+ import { InjectionToken } from '@navios/di';
48
+ import { Injectors } from '@navios/di';
49
+ import { InjectorsBase } from '@navios/di';
18
50
  import type { InspectOptions } from 'util';
51
+ import { InstanceDestroying } from '@navios/di';
52
+ import { InstanceExpired } from '@navios/di';
53
+ import { InstanceNotFound } from '@navios/di';
19
54
  import { LoggerInstance as LoggerInstance_2 } from '../logger/logger.service.mjs';
20
- import type { output } from 'zod';
55
+ import { makeProxyServiceLocator } from '@navios/di';
56
+ import { provideServiceLocator } from '@navios/di';
57
+ import { ProxyServiceLocator } from '@navios/di';
21
58
  import { RawServerDefault } from 'fastify';
59
+ import { Registry } from '@navios/di';
22
60
  import { ResolveFastifyRequestType } from 'fastify/types/type-provider.js';
61
+ import { resolveService } from '@navios/di';
23
62
  import { RouteGenericInterface } from 'fastify';
24
63
  import { ServerResponse } from 'http';
64
+ import { ServiceLocator } from '@navios/di';
65
+ import { ServiceLocatorEventBus } from '@navios/di';
66
+ import { ServiceLocatorInstanceDestroyListener } from '@navios/di';
67
+ import { ServiceLocatorInstanceEffect } from '@navios/di';
68
+ import { ServiceLocatorInstanceHolder } from '@navios/di';
69
+ import { ServiceLocatorInstanceHolderCreated } from '@navios/di';
70
+ import { ServiceLocatorInstanceHolderCreating } from '@navios/di';
71
+ import { ServiceLocatorInstanceHolderDestroying } from '@navios/di';
72
+ import { ServiceLocatorInstanceHolderKind } from '@navios/di';
73
+ import { ServiceLocatorInstanceHolderStatus } from '@navios/di';
74
+ import { ServiceLocatorManager } from '@navios/di';
75
+ import { syncInject } from '@navios/di';
76
+ import { UnknownError } from '@navios/di';
77
+ import type { Util_FlatObject } from '@navios/common';
78
+ import { wrapSyncInit } from '@navios/di';
25
79
  import { z } from 'zod';
26
80
  import { ZodDiscriminatedUnion } from 'zod';
27
- import { ZodOptional } from 'zod';
28
81
  import type { ZodType } from 'zod';
29
82
 
30
83
  declare const addLeadingSlash: (path?: string) => string;
@@ -60,14 +113,7 @@ export { BadRequestException }
60
113
  export { BadRequestException as BadRequestException_alias_1 }
61
114
  export { BadRequestException as BadRequestException_alias_2 }
62
115
 
63
- declare class BoundInjectionToken<T, S extends AnyZodObject | ZodOptional<AnyZodObject>> extends InjectionToken<T, undefined> {
64
- readonly token: InjectionToken<T, S>;
65
- readonly value: z.input<S>;
66
- constructor(token: InjectionToken<T, S>, value: z.input<S>);
67
- }
68
116
  export { BoundInjectionToken }
69
- export { BoundInjectionToken as BoundInjectionToken_alias_1 }
70
- export { BoundInjectionToken as BoundInjectionToken_alias_2 }
71
117
 
72
118
  declare interface CanActivate {
73
119
  canActivate(executionContext: ExecutionContext): Promise<boolean> | boolean;
@@ -76,12 +122,7 @@ export { CanActivate }
76
122
  export { CanActivate as CanActivate_alias_1 }
77
123
  export { CanActivate as CanActivate_alias_2 }
78
124
 
79
- declare type ChannelEmitter<Events extends EventsConfig, Ns extends string, E extends EventsNames<Events>> = {
80
- emit<Args extends EventsArgs<Events, E>>(ns: Ns, event: E, ...args: Args): Promise<any>;
81
- };
82
125
  export { ChannelEmitter }
83
- export { ChannelEmitter as ChannelEmitter_alias_1 }
84
- export { ChannelEmitter as ChannelEmitter_alias_2 }
85
126
 
86
127
  declare type ClassAttribute = (() => <T>(target: T, context: ClassDecoratorContext | ClassMethodDecoratorContext) => T) & {
87
128
  token: symbol;
@@ -96,15 +137,9 @@ declare type ClassSchemaAttribute<T extends ZodType> = ((value: z.input<T>) => <
96
137
  export { ClassSchemaAttribute }
97
138
  export { ClassSchemaAttribute as ClassSchemaAttribute_alias_1 }
98
139
 
99
- declare type ClassType = new (...args: any[]) => any;
100
140
  export { ClassType }
101
- export { ClassType as ClassType_alias_1 }
102
- export { ClassType as ClassType_alias_2 }
103
141
 
104
- declare type ClassTypeWithInstance<T> = new (...args: any[]) => T;
105
142
  export { ClassTypeWithInstance }
106
- export { ClassTypeWithInstance as ClassTypeWithInstance_alias_1 }
107
- export { ClassTypeWithInstance as ClassTypeWithInstance_alias_2 }
108
143
 
109
144
  declare const clc: {
110
145
  bold: (text: string) => string;
@@ -414,6 +449,8 @@ export { ControllerOptions }
414
449
  export { ControllerOptions as ControllerOptions_alias_1 }
415
450
  export { ControllerOptions as ControllerOptions_alias_2 }
416
451
 
452
+ export { CreateInjectorsOptions }
453
+
417
454
  declare function Endpoint<Method extends HttpMethod = HttpMethod, Url extends string = string, QuerySchema = undefined, ResponseSchema extends ZodType = ZodType, RequestSchema = ZodType>(endpoint: {
418
455
  config: BaseEndpointConfig<Method, Url, QuerySchema, ResponseSchema, RequestSchema>;
419
456
  }): (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>>;
@@ -442,7 +479,7 @@ export { EndpointMetadataKey as EndpointMetadataKey_alias_2 }
442
479
 
443
480
  declare type EndpointParams<EndpointDeclaration extends {
444
481
  config: BaseEndpointConfig<any, any, any, any, any>;
445
- }, 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>;
482
+ }, Url extends string = EndpointDeclaration['config']['url'], QuerySchema = EndpointDeclaration['config']['querySchema']> = QuerySchema extends AnyZodObject ? EndpointDeclaration['config']['requestSchema'] extends ZodType ? Util_FlatObject<EndpointFunctionArgs<Url, QuerySchema, EndpointDeclaration['config']['requestSchema'], true>> : Util_FlatObject<EndpointFunctionArgs<Url, QuerySchema, undefined, true>> : EndpointDeclaration['config']['requestSchema'] extends ZodType ? Util_FlatObject<EndpointFunctionArgs<Url, undefined, EndpointDeclaration['config']['requestSchema'], true>> : Util_FlatObject<EndpointFunctionArgs<Url, undefined, undefined, true>>;
446
483
  export { EndpointParams }
447
484
  export { EndpointParams as EndpointParams_alias_1 }
448
485
  export { EndpointParams as EndpointParams_alias_2 }
@@ -466,56 +503,17 @@ export { envString as envString_alias_1 }
466
503
  export { envString as envString_alias_2 }
467
504
  export { envString as envString_alias_3 }
468
505
 
469
- declare enum ErrorsEnum {
470
- InstanceExpired = "InstanceExpired",
471
- InstanceNotFound = "InstanceNotFound",
472
- InstanceDestroying = "InstanceDestroying",
473
- UnknownError = "UnknownError",
474
- FactoryNotFound = "FactoryNotFound",
475
- FactoryTokenNotResolved = "FactoryTokenNotResolved"
476
- }
477
506
  export { ErrorsEnum }
478
- export { ErrorsEnum as ErrorsEnum_alias_1 }
479
- export { ErrorsEnum as ErrorsEnum_alias_2 }
480
- export { ErrorsEnum as ErrorsEnum_alias_3 }
481
-
482
- declare class EventEmitter<Events extends EventsConfig = {}> implements EventEmitterInterface<Events> {
483
- private listeners;
484
- on<E extends EventsNames<Events>, Args extends EventsArgs<Events, E>>(event: E, listener: (...args: Args) => void): () => void;
485
- off<E extends EventsNames<Events>, Args extends EventsArgs<Events, E>>(event: E, listener: (...args: Args) => void): void;
486
- once<E extends EventsNames<Events>, Args extends EventsArgs<Events, E>>(event: E, listener: (...args: Args) => void): () => void;
487
- emit<E extends EventsNames<Events>, Args extends EventsArgs<Events, E>>(event: E, ...args: Args): Promise<any>;
488
- addChannel<E extends EventsNames<Events>, Ns extends string, Emitter extends ChannelEmitter<Events, Ns, E>>(ns: Ns, event: E, target: Emitter): () => void;
489
- }
507
+
490
508
  export { EventEmitter }
491
- export { EventEmitter as EventEmitter_alias_1 }
492
- export { EventEmitter as EventEmitter_alias_2 }
493
509
 
494
- declare interface EventEmitterInterface<Events extends EventsConfig> {
495
- on<E extends EventsNames<Events>, Args extends EventsArgs<Events, E>>(event: E, listener: (...args: Args) => void): () => void;
496
- emit<E extends EventsNames<Events>, Args extends EventsArgs<Events, E>>(event: E, ...args: Args): void;
497
- addChannel<E extends EventsNames<Events>, Ns extends string, Emmiter extends ChannelEmitter<Events, Ns, E>>(ns: Ns, event: E, target: Emmiter): () => void;
498
- }
499
510
  export { EventEmitterInterface }
500
- export { EventEmitterInterface as EventEmitterInterface_alias_1 }
501
- export { EventEmitterInterface as EventEmitterInterface_alias_2 }
502
511
 
503
- declare type EventsArgs<Events extends EventsConfig, Name extends EventsNames<Events>> = Events[Name] extends any[] ? Events[Name] : [];
504
512
  export { EventsArgs }
505
- export { EventsArgs as EventsArgs_alias_1 }
506
- export { EventsArgs as EventsArgs_alias_2 }
507
513
 
508
- declare type EventsConfig = {
509
- [event: string]: any[];
510
- };
511
514
  export { EventsConfig }
512
- export { EventsConfig as EventsConfig_alias_1 }
513
- export { EventsConfig as EventsConfig_alias_2 }
514
515
 
515
- declare type EventsNames<Events extends EventsConfig> = Exclude<keyof Events, symbol | number>;
516
516
  export { EventsNames }
517
- export { EventsNames as EventsNames_alias_1 }
518
- export { EventsNames as EventsNames_alias_2 }
519
517
 
520
518
  declare type ExcludedKeys = 'computedTimeRates' | 'aiModelsRates' | 'aiModel';
521
519
 
@@ -560,44 +558,19 @@ export { extractModuleMetadata }
560
558
  export { extractModuleMetadata as extractModuleMetadata_alias_1 }
561
559
  export { extractModuleMetadata as extractModuleMetadata_alias_2 }
562
560
 
563
- export declare interface Factory<T> {
564
- create(ctx?: any): Promise<T> | T;
565
- }
561
+ export { Factory }
562
+
563
+ export { FactoryContext }
566
564
 
567
- declare class FactoryInjectionToken<T, S extends AnyZodObject | ZodOptional<AnyZodObject>> extends InjectionToken<T, S> {
568
- readonly token: InjectionToken<T, S>;
569
- readonly factory: () => Promise<z.input<S>>;
570
- value?: z.input<S>;
571
- resolved: boolean;
572
- constructor(token: InjectionToken<T, S>, factory: () => Promise<z.input<S>>);
573
- resolve(): Promise<z.input<S>>;
574
- }
575
565
  export { FactoryInjectionToken }
576
- export { FactoryInjectionToken as FactoryInjectionToken_alias_1 }
577
- export { FactoryInjectionToken as FactoryInjectionToken_alias_2 }
578
566
 
579
- declare class FactoryNotFound extends Error {
580
- name: string;
581
- code: ErrorsEnum;
582
- constructor(name: string);
583
- }
584
567
  export { FactoryNotFound }
585
- export { FactoryNotFound as FactoryNotFound_alias_1 }
586
- export { FactoryNotFound as FactoryNotFound_alias_2 }
587
- export { FactoryNotFound as FactoryNotFound_alias_3 }
588
568
 
589
- declare class FactoryTokenNotResolved extends Error {
590
- code: ErrorsEnum;
591
- constructor(name: string | symbol | ClassType);
592
- }
569
+ export { FactoryRecord }
570
+
593
571
  export { FactoryTokenNotResolved }
594
- export { FactoryTokenNotResolved as FactoryTokenNotResolved_alias_1 }
595
- export { FactoryTokenNotResolved as FactoryTokenNotResolved_alias_2 }
596
- export { FactoryTokenNotResolved as FactoryTokenNotResolved_alias_3 }
597
572
 
598
- export declare interface FactoryWithArgs<T, A extends AnyZodObject> {
599
- create(ctx: any, args: z.output<A>): Promise<T> | T;
600
- }
573
+ export { FactoryWithArgs }
601
574
 
602
575
  /**
603
576
  * @publicApi
@@ -630,23 +603,18 @@ export { getEndpointMetadata }
630
603
  export { getEndpointMetadata as getEndpointMetadata_alias_1 }
631
604
  export { getEndpointMetadata as getEndpointMetadata_alias_2 }
632
605
 
633
- declare function getInjectableToken<R>(target: ClassType): R extends {
634
- create(...args: any[]): infer V;
635
- } ? InjectionToken<V> : InjectionToken<R>;
606
+ export { getGlobalServiceLocator }
607
+
636
608
  export { getInjectableToken }
637
- export { getInjectableToken as getInjectableToken_alias_1 }
638
- export { getInjectableToken as getInjectableToken_alias_2 }
639
- export { getInjectableToken as getInjectableToken_alias_3 }
609
+
610
+ export { getInjectors }
640
611
 
641
612
  declare function getModuleMetadata(target: ClassType, context: ClassDecoratorContext): ModuleMetadata;
642
613
  export { getModuleMetadata }
643
614
  export { getModuleMetadata as getModuleMetadata_alias_1 }
644
615
  export { getModuleMetadata as getModuleMetadata_alias_2 }
645
616
 
646
- declare function getServiceLocator(): ServiceLocator;
647
- export { getServiceLocator }
648
- export { getServiceLocator as getServiceLocator_alias_1 }
649
- export { getServiceLocator as getServiceLocator_alias_2 }
617
+ export { globalRegistry }
650
618
 
651
619
  declare class GuardRunnerService {
652
620
  runGuards(allGuards: Set<ClassTypeWithInstance<CanActivate> | InjectionToken<CanActivate, undefined>>, executionContext: ExecutionContext): Promise<boolean>;
@@ -711,150 +679,31 @@ export { HttpException }
711
679
  export { HttpException as HttpException_alias_1 }
712
680
  export { HttpException as HttpException_alias_2 }
713
681
 
714
- declare function inject<T extends ClassType>(token: T): Promise<InstanceType<T>>;
715
-
716
- declare function inject<T, S extends AnyZodObject>(token: InjectionToken<T, S>, args: z.input<S>): Promise<T>;
717
-
718
- declare function inject<T, S extends ZodOptional<AnyZodObject>>(token: InjectionToken<T, S>, args?: z.input<S>): Promise<T>;
719
-
720
- declare function inject<T>(token: InjectionToken<T, undefined>): Promise<T>;
721
682
  export { inject }
722
- export { inject as inject_alias_1 }
723
- export { inject as inject_alias_2 }
724
-
725
- declare function Injectable(): <T extends ClassType>(target: T, context: ClassDecoratorContext) => T & {
726
- [InjectableTokenMeta]: InjectionToken<InstanceType<T>, undefined>;
727
- };
728
-
729
- declare function Injectable<T extends ClassType>(options: {
730
- scope?: InjectableScope;
731
- token: InjectionToken<T, undefined>;
732
- }): (target: T, context: ClassDecoratorContext) => T & {
733
- [InjectableTokenMeta]: InjectionToken<InstanceType<T>, undefined>;
734
- };
735
683
 
736
- declare function Injectable<R>(options: {
737
- scope?: InjectableScope;
738
- type: InjectableType.Factory;
739
- }): <T extends ClassTypeWithInstance<Factory<R>>>(target: T, context: ClassDecoratorContext) => T & {
740
- [InjectableTokenMeta]: InjectionToken<R, undefined>;
741
- };
742
-
743
- declare function Injectable<R, S extends AnyZodObject>(options: {
744
- scope?: InjectableScope;
745
- type: InjectableType.Factory;
746
- token: InjectionToken<R, S>;
747
- }): <T extends ClassTypeWithInstance<FactoryWithArgs<R, S>>>(target: T, context: ClassDecoratorContext) => T & {
748
- [InjectableTokenMeta]: InjectionToken<R, S>;
749
- };
750
-
751
- declare function Injectable<R>(options: {
752
- scope?: InjectableScope;
753
- type: InjectableType.Factory;
754
- token: InjectionToken<R, undefined>;
755
- }): <T extends ClassTypeWithInstance<Factory<R>>>(target: T, context: ClassDecoratorContext) => T & {
756
- [InjectableTokenMeta]: InjectionToken<R, undefined>;
757
- };
758
684
  export { Injectable }
759
- export { Injectable as Injectable_alias_1 }
760
- export { Injectable as Injectable_alias_2 }
761
- export { Injectable as Injectable_alias_3 }
762
-
763
- declare interface InjectableMetadata<Instance = any, Schema = any> {
764
- type: InjectableType;
765
- scope: InjectableScope;
766
- token: InjectionToken<Instance, Schema>;
767
- }
768
- export { InjectableMetadata }
769
- export { InjectableMetadata as InjectableMetadata_alias_1 }
770
- export { InjectableMetadata as InjectableMetadata_alias_2 }
771
-
772
- declare interface InjectableOptions {
773
- scope?: InjectableScope;
774
- type?: InjectableType;
775
- token?: InjectionToken<any, any>;
776
- }
685
+
777
686
  export { InjectableOptions }
778
- export { InjectableOptions as InjectableOptions_alias_1 }
779
- export { InjectableOptions as InjectableOptions_alias_2 }
780
- export { InjectableOptions as InjectableOptions_alias_3 }
781
687
 
782
- declare enum InjectableScope {
783
- /**
784
- * Singleton scope: The instance is created once and shared across the application.
785
- */
786
- Singleton = "Singleton",
787
- /**
788
- * Instance scope: A new instance is created for each injection.
789
- */
790
- Instance = "Instance"
791
- }
792
688
  export { InjectableScope }
793
- export { InjectableScope as InjectableScope_alias_1 }
794
- export { InjectableScope as InjectableScope_alias_2 }
795
- export { InjectableScope as InjectableScope_alias_3 }
796
689
 
797
- declare const InjectableTokenMeta: unique symbol;
798
690
  export { InjectableTokenMeta }
799
- export { InjectableTokenMeta as InjectableTokenMeta_alias_1 }
800
- export { InjectableTokenMeta as InjectableTokenMeta_alias_2 }
801
- export { InjectableTokenMeta as InjectableTokenMeta_alias_3 }
802
691
 
803
- declare enum InjectableType {
804
- Class = "Class",
805
- Factory = "Factory"
806
- }
807
692
  export { InjectableType }
808
- export { InjectableType as InjectableType_alias_1 }
809
- export { InjectableType as InjectableType_alias_2 }
810
- export { InjectableType as InjectableType_alias_3 }
811
-
812
- declare class InjectionToken<T, S extends AnyZodObject | ZodOptional<AnyZodObject> | unknown = unknown> {
813
- readonly name: string | symbol | ClassType;
814
- readonly schema: AnyZodObject | undefined;
815
- id: `${string}-${string}-${string}-${string}-${string}`;
816
- constructor(name: string | symbol | ClassType, schema: AnyZodObject | undefined);
817
- static create<T extends ClassType>(name: T): InjectionToken<InstanceType<T>, undefined>;
818
- static create<T extends ClassType, Schema extends AnyZodObject | ZodOptional<AnyZodObject>>(name: T, schema: Schema): InjectionToken<InstanceType<T>, Schema>;
819
- static create<T>(name: string | symbol): InjectionToken<T, undefined>;
820
- static create<T, Schema extends AnyZodObject | ZodOptional<AnyZodObject>>(name: string | any, schema: Schema): InjectionToken<T, Schema>;
821
- static bound<T, S extends AnyZodObject | ZodOptional<AnyZodObject>>(token: InjectionToken<T, S>, value: z.input<S>): BoundInjectionToken<T, S>;
822
- static factory<T, S extends AnyZodObject | ZodOptional<AnyZodObject>>(token: InjectionToken<T, S>, factory: () => Promise<z.input<S>>): FactoryInjectionToken<T, S>;
823
- static refineType<T>(token: BoundInjectionToken<any, any>): BoundInjectionToken<T, any>;
824
- }
693
+
694
+ export { InjectionFactory }
695
+
825
696
  export { InjectionToken }
826
- export { InjectionToken as InjectionToken_alias_1 }
827
- export { InjectionToken as InjectionToken_alias_2 }
828
697
 
829
- declare class InstanceDestroying extends Error {
830
- name: string;
831
- code: ErrorsEnum;
832
- constructor(name: string);
833
- }
698
+ export { Injectors }
699
+
700
+ export { InjectorsBase }
701
+
834
702
  export { InstanceDestroying }
835
- export { InstanceDestroying as InstanceDestroying_alias_1 }
836
- export { InstanceDestroying as InstanceDestroying_alias_2 }
837
- export { InstanceDestroying as InstanceDestroying_alias_3 }
838
-
839
- declare class InstanceExpired extends Error {
840
- name: string;
841
- code: ErrorsEnum;
842
- constructor(name: string);
843
- }
703
+
844
704
  export { InstanceExpired }
845
- export { InstanceExpired as InstanceExpired_alias_1 }
846
- export { InstanceExpired as InstanceExpired_alias_2 }
847
- export { InstanceExpired as InstanceExpired_alias_3 }
848
-
849
- declare class InstanceNotFound extends Error {
850
- name: string;
851
- code: ErrorsEnum;
852
- constructor(name: string);
853
- }
705
+
854
706
  export { InstanceNotFound }
855
- export { InstanceNotFound as InstanceNotFound_alias_1 }
856
- export { InstanceNotFound as InstanceNotFound_alias_2 }
857
- export { InstanceNotFound as InstanceNotFound_alias_3 }
858
707
 
859
708
  declare class InternalServerErrorException extends HttpException {
860
709
  constructor(message: string | object, error?: Error);
@@ -1146,7 +995,7 @@ export { LogLevel }
1146
995
  export { LogLevel as LogLevel_alias_1 }
1147
996
  export { LogLevel as LogLevel_alias_2 }
1148
997
 
1149
- export declare function makeProxyServiceLocator(serviceLocator: ServiceLocator, ctx: ServiceLocatorAbstractFactoryContext): ServiceLocator;
998
+ export { makeProxyServiceLocator }
1150
999
 
1151
1000
  declare function Module({ controllers, imports, guards }?: ModuleOptions): (target: ClassType, context: ClassDecoratorContext) => any;
1152
1001
  export { Module }
@@ -1216,7 +1065,7 @@ export { MultipartAdapterToken as MultipartAdapterToken_alias_2 }
1216
1065
 
1217
1066
  declare type MultipartParams<EndpointDeclaration extends {
1218
1067
  config: BaseEndpointConfig<any, any, any, any, any>;
1219
- }, 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>;
1068
+ }, Url extends string = EndpointDeclaration['config']['url'], QuerySchema = EndpointDeclaration['config']['querySchema']> = QuerySchema extends AnyZodObject ? EndpointDeclaration['config']['requestSchema'] extends ZodType ? Util_FlatObject<EndpointFunctionArgs<Url, QuerySchema, EndpointDeclaration['config']['requestSchema'], true>> : Util_FlatObject<EndpointFunctionArgs<Url, QuerySchema, undefined, true>> : EndpointDeclaration['config']['requestSchema'] extends ZodType ? Util_FlatObject<EndpointFunctionArgs<Url, undefined, EndpointDeclaration['config']['requestSchema'], true>> : Util_FlatObject<EndpointFunctionArgs<Url, undefined, undefined, true>>;
1220
1069
  export { MultipartParams }
1221
1070
  export { MultipartParams as MultipartParams_alias_1 }
1222
1071
  export { MultipartParams as MultipartParams_alias_2 }
@@ -1299,15 +1148,6 @@ export { NotFoundException }
1299
1148
  export { NotFoundException as NotFoundException_alias_1 }
1300
1149
  export { NotFoundException as NotFoundException_alias_2 }
1301
1150
 
1302
- /**
1303
- * Useful for tests or when you want to override a service
1304
- * with a different implementation.
1305
- */
1306
- declare function override<T>(token: InjectionToken<T>, target: ClassType): () => void;
1307
- export { override }
1308
- export { override as override_alias_1 }
1309
- export { override as override_alias_2 }
1310
-
1311
1151
  declare type Path<T> = keyof T extends string ? PathImpl2<T> extends infer P ? P extends string | keyof T ? P : keyof T : keyof T : never;
1312
1152
  export { Path }
1313
1153
  export { Path as Path_alias_1 }
@@ -1345,32 +1185,16 @@ export { PinoWrapper }
1345
1185
  export { PinoWrapper as PinoWrapper_alias_1 }
1346
1186
  export { PinoWrapper as PinoWrapper_alias_2 }
1347
1187
 
1348
- declare let promiseCollector: null | ((promise: Promise<any>) => void);
1349
-
1350
- declare function provideConfig<ConfigMap extends Record<string, unknown>>(options: z.input<typeof ConfigProviderOptions>): InjectionToken<ConfigServiceInstance<ConfigMap>, undefined>;
1188
+ declare function provideConfig<ConfigMap extends Record<string, unknown>>(options: z.input<typeof ConfigProviderOptions>): BoundInjectionToken<ConfigServiceInstance<ConfigMap>, typeof ConfigProviderOptions>;
1351
1189
  export { provideConfig }
1352
1190
  export { provideConfig as provideConfig_alias_1 }
1353
1191
  export { provideConfig as provideConfig_alias_2 }
1354
1192
 
1355
- declare function provideServiceLocator(locator: ServiceLocator): ServiceLocator;
1356
1193
  export { provideServiceLocator }
1357
- export { provideServiceLocator as provideServiceLocator_alias_1 }
1358
- export { provideServiceLocator as provideServiceLocator_alias_2 }
1359
-
1360
- export declare class ProxyServiceLocator implements ServiceLocator {
1361
- private readonly serviceLocator;
1362
- private readonly ctx;
1363
- constructor(serviceLocator: ServiceLocator, ctx: ServiceLocatorAbstractFactoryContext);
1364
- get abstractFactories(): Map<InjectionToken<any, any>, (ctx: ServiceLocatorAbstractFactoryContext, args: any) => Promise<any>>;
1365
- getEventBus(): ServiceLocatorEventBus;
1366
- registerAbstractFactory<Instance, Schema extends AnyZodObject | undefined>(token: InjectionToken<Instance, Schema>, factory: (ctx: ServiceLocatorAbstractFactoryContext, values: Schema extends AnyZodObject ? output<Schema> : undefined) => Promise<Instance>): void;
1367
- 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]>;
1368
- 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>;
1369
- 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;
1370
- invalidate(service: string, round?: number): Promise<any>;
1371
- ready(): Promise<null>;
1372
- makeInstanceName(token: InjectionToken<any, any>, args: any): string;
1373
- }
1194
+
1195
+ export { ProxyServiceLocator }
1196
+
1197
+ export { Registry }
1374
1198
 
1375
1199
  declare const Reply: InjectionToken<FastifyReply<RouteGenericInterface, RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, unknown, FastifySchema, FastifyTypeProviderDefault, unknown>, undefined>;
1376
1200
  export { Reply }
@@ -1382,167 +1206,29 @@ export { Request_2 as Request }
1382
1206
  export { Request_2 as Request_alias_1 }
1383
1207
  export { Request_2 as Request_alias_2 }
1384
1208
 
1385
- declare function resolveService<T extends ClassType>(ctx: ServiceLocatorAbstractFactoryContext, target: T, args?: any[]): Promise<InstanceType<T>>;
1386
1209
  export { resolveService }
1387
- export { resolveService as resolveService_alias_1 }
1388
- export { resolveService as resolveService_alias_2 }
1389
-
1390
- declare class ServiceLocator {
1391
- private readonly logger;
1392
- private abstractFactories;
1393
- private instanceFactories;
1394
- private readonly eventBus;
1395
- private readonly manager;
1396
- constructor(logger?: Console | null);
1397
- getEventBus(): ServiceLocatorEventBus;
1398
- registerInstance<Instance>(token: InjectionToken<Instance, undefined>, instance: Instance): void;
1399
- removeInstance<Instance>(token: InjectionToken<Instance, undefined>): Promise<any>;
1400
- 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;
1401
- private resolveTokenArgs;
1402
- 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;
1403
- 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]>;
1404
- 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>;
1405
- private notifyListeners;
1406
- private createInstance;
1407
- private createInstanceFromAbstractFactory;
1408
- private createContextForAbstractFactory;
1409
- 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;
1410
- invalidate(service: string, round?: number): Promise<any>;
1411
- ready(): Promise<null>;
1412
- makeInstanceName(token: InjectionToken<any, any>, args: any): string;
1413
- }
1210
+
1414
1211
  export { ServiceLocator }
1415
- export { ServiceLocator as ServiceLocator_alias_1 }
1416
- export { ServiceLocator as ServiceLocator_alias_2 }
1417
-
1418
- declare interface ServiceLocatorAbstractFactoryContext {
1419
- inject: typeof inject;
1420
- addDependency: ((token: InjectionToken<any, undefined>) => void) | (<S extends AnyZodObject>(token: InjectionToken<any, S>, args: z.input<S>) => void);
1421
- on: ServiceLocatorEventBus['on'];
1422
- getDependencies: () => string[];
1423
- invalidate: () => void;
1424
- addEffect: (listener: () => void) => void;
1425
- getDestroyListeners: () => (() => void)[];
1426
- setTtl: (ttl: number) => void;
1427
- getTtl: () => number;
1428
- }
1429
- export { ServiceLocatorAbstractFactoryContext }
1430
- export { ServiceLocatorAbstractFactoryContext as ServiceLocatorAbstractFactoryContext_alias_1 }
1431
- export { ServiceLocatorAbstractFactoryContext as ServiceLocatorAbstractFactoryContext_alias_2 }
1432
-
1433
- declare class ServiceLocatorEventBus {
1434
- private readonly logger;
1435
- private listeners;
1436
- constructor(logger?: Console | null);
1437
- on<Event extends string | `pre:${string}` | `post:${string}`>(ns: string, event: Event, listener: (event: Event) => void): () => void;
1438
- emit(key: string, event: string): Promise<PromiseSettledResult<any>[] | undefined>;
1439
- }
1212
+
1440
1213
  export { ServiceLocatorEventBus }
1441
- export { ServiceLocatorEventBus as ServiceLocatorEventBus_alias_1 }
1442
- export { ServiceLocatorEventBus as ServiceLocatorEventBus_alias_2 }
1443
1214
 
1444
- declare type ServiceLocatorInstanceDestroyListener = () => void | Promise<void>;
1445
1215
  export { ServiceLocatorInstanceDestroyListener }
1446
- export { ServiceLocatorInstanceDestroyListener as ServiceLocatorInstanceDestroyListener_alias_1 }
1447
- export { ServiceLocatorInstanceDestroyListener as ServiceLocatorInstanceDestroyListener_alias_2 }
1448
1216
 
1449
- declare type ServiceLocatorInstanceEffect = () => void;
1450
1217
  export { ServiceLocatorInstanceEffect }
1451
- export { ServiceLocatorInstanceEffect as ServiceLocatorInstanceEffect_alias_1 }
1452
- export { ServiceLocatorInstanceEffect as ServiceLocatorInstanceEffect_alias_2 }
1453
1218
 
1454
- declare type ServiceLocatorInstanceHolder<Instance = unknown> = ServiceLocatorInstanceHolderCreating<Instance> | ServiceLocatorInstanceHolderCreated<Instance> | ServiceLocatorInstanceHolderDestroying<Instance>;
1455
1219
  export { ServiceLocatorInstanceHolder }
1456
- export { ServiceLocatorInstanceHolder as ServiceLocatorInstanceHolder_alias_1 }
1457
- export { ServiceLocatorInstanceHolder as ServiceLocatorInstanceHolder_alias_2 }
1458
-
1459
- declare interface ServiceLocatorInstanceHolderCreated<Instance> {
1460
- status: ServiceLocatorInstanceHolderStatus.Created;
1461
- name: string;
1462
- instance: Instance;
1463
- creationPromise: null;
1464
- destroyPromise: null;
1465
- kind: ServiceLocatorInstanceHolderKind;
1466
- effects: ServiceLocatorInstanceEffect[];
1467
- deps: string[];
1468
- destroyListeners: ServiceLocatorInstanceDestroyListener[];
1469
- createdAt: number;
1470
- ttl: number;
1471
- }
1220
+
1472
1221
  export { ServiceLocatorInstanceHolderCreated }
1473
- export { ServiceLocatorInstanceHolderCreated as ServiceLocatorInstanceHolderCreated_alias_1 }
1474
- export { ServiceLocatorInstanceHolderCreated as ServiceLocatorInstanceHolderCreated_alias_2 }
1475
-
1476
- declare interface ServiceLocatorInstanceHolderCreating<Instance> {
1477
- status: ServiceLocatorInstanceHolderStatus.Creating;
1478
- name: string;
1479
- instance: null;
1480
- creationPromise: Promise<[undefined, Instance]> | null;
1481
- destroyPromise: null;
1482
- kind: ServiceLocatorInstanceHolderKind;
1483
- effects: ServiceLocatorInstanceEffect[];
1484
- deps: string[];
1485
- destroyListeners: ServiceLocatorInstanceDestroyListener[];
1486
- createdAt: number;
1487
- ttl: number;
1488
- }
1222
+
1489
1223
  export { ServiceLocatorInstanceHolderCreating }
1490
- export { ServiceLocatorInstanceHolderCreating as ServiceLocatorInstanceHolderCreating_alias_1 }
1491
- export { ServiceLocatorInstanceHolderCreating as ServiceLocatorInstanceHolderCreating_alias_2 }
1492
-
1493
- declare interface ServiceLocatorInstanceHolderDestroying<Instance> {
1494
- status: ServiceLocatorInstanceHolderStatus.Destroying;
1495
- name: string;
1496
- instance: Instance | null;
1497
- creationPromise: null;
1498
- destroyPromise: Promise<void>;
1499
- kind: ServiceLocatorInstanceHolderKind;
1500
- effects: ServiceLocatorInstanceEffect[];
1501
- deps: string[];
1502
- destroyListeners: ServiceLocatorInstanceDestroyListener[];
1503
- createdAt: number;
1504
- ttl: number;
1505
- }
1224
+
1506
1225
  export { ServiceLocatorInstanceHolderDestroying }
1507
- export { ServiceLocatorInstanceHolderDestroying as ServiceLocatorInstanceHolderDestroying_alias_1 }
1508
- export { ServiceLocatorInstanceHolderDestroying as ServiceLocatorInstanceHolderDestroying_alias_2 }
1509
1226
 
1510
- declare enum ServiceLocatorInstanceHolderKind {
1511
- Instance = "instance",
1512
- Factory = "factory",
1513
- AbstractFactory = "abstractFactory"
1514
- }
1515
1227
  export { ServiceLocatorInstanceHolderKind }
1516
- export { ServiceLocatorInstanceHolderKind as ServiceLocatorInstanceHolderKind_alias_1 }
1517
- export { ServiceLocatorInstanceHolderKind as ServiceLocatorInstanceHolderKind_alias_2 }
1518
1228
 
1519
- declare enum ServiceLocatorInstanceHolderStatus {
1520
- Created = "created",
1521
- Creating = "creating",
1522
- Destroying = "destroying"
1523
- }
1524
1229
  export { ServiceLocatorInstanceHolderStatus }
1525
- export { ServiceLocatorInstanceHolderStatus as ServiceLocatorInstanceHolderStatus_alias_1 }
1526
- export { ServiceLocatorInstanceHolderStatus as ServiceLocatorInstanceHolderStatus_alias_2 }
1527
-
1528
- declare class ServiceLocatorManager {
1529
- private readonly logger;
1530
- private readonly instancesHolders;
1531
- constructor(logger?: Console | null);
1532
- get(name: string): [InstanceExpired | InstanceDestroying, ServiceLocatorInstanceHolder] | [InstanceNotFound] | [undefined, ServiceLocatorInstanceHolder];
1533
- set(name: string, holder: ServiceLocatorInstanceHolder): void;
1534
- has(name: string): [InstanceExpired | InstanceDestroying] | [undefined, boolean];
1535
- delete(name: string): boolean;
1536
- filter(predicate: (value: ServiceLocatorInstanceHolder<any>, key: string) => boolean): Map<string, ServiceLocatorInstanceHolder>;
1537
- }
1538
- export { ServiceLocatorManager }
1539
- export { ServiceLocatorManager as ServiceLocatorManager_alias_1 }
1540
- export { ServiceLocatorManager as ServiceLocatorManager_alias_2 }
1541
1230
 
1542
- declare function setPromiseCollector(collector: null | ((promise: Promise<any>) => void)): typeof promiseCollector;
1543
- export { setPromiseCollector }
1544
- export { setPromiseCollector as setPromiseCollector_alias_1 }
1545
- export { setPromiseCollector as setPromiseCollector_alias_2 }
1231
+ export { ServiceLocatorManager }
1546
1232
 
1547
1233
  declare function Stream<Method extends HttpMethod = HttpMethod, Url extends string = string, QuerySchema = undefined, RequestSchema = ZodType>(endpoint: {
1548
1234
  config: BaseStreamConfig<Method, Url, QuerySchema, RequestSchema>;
@@ -1568,7 +1254,7 @@ export { StreamAdapterToken as StreamAdapterToken_alias_2 }
1568
1254
 
1569
1255
  declare type StreamParams<EndpointDeclaration extends {
1570
1256
  config: BaseStreamConfig<any, any, any, any>;
1571
- }, 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>;
1257
+ }, Url extends string = EndpointDeclaration['config']['url'], QuerySchema = EndpointDeclaration['config']['querySchema']> = QuerySchema extends AnyZodObject ? EndpointDeclaration['config']['requestSchema'] extends ZodType ? Util_FlatObject<EndpointFunctionArgs<Url, QuerySchema, EndpointDeclaration['config']['requestSchema'], true>> : Util_FlatObject<EndpointFunctionArgs<Url, QuerySchema, undefined, true>> : EndpointDeclaration['config']['requestSchema'] extends ZodType ? Util_FlatObject<EndpointFunctionArgs<Url, undefined, EndpointDeclaration['config']['requestSchema'], true>> : Util_FlatObject<EndpointFunctionArgs<Url, undefined, undefined, true>>;
1572
1258
  export { StreamParams }
1573
1259
  export { StreamParams as StreamParams_alias_1 }
1574
1260
  export { StreamParams as StreamParams_alias_2 }
@@ -1579,16 +1265,7 @@ export { stripEndSlash as stripEndSlash_alias_1 }
1579
1265
  export { stripEndSlash as stripEndSlash_alias_2 }
1580
1266
  export { stripEndSlash as stripEndSlash_alias_3 }
1581
1267
 
1582
- declare function syncInject<T extends ClassType>(token: T): InstanceType<T>;
1583
-
1584
- declare function syncInject<T, S extends AnyZodObject>(token: InjectionToken<T, S>, args: z.input<S>): T;
1585
-
1586
- declare function syncInject<T, S extends ZodOptional<AnyZodObject>>(token: InjectionToken<T, S>, args: z.input<S>): T;
1587
-
1588
- declare function syncInject<T>(token: InjectionToken<T, undefined>): T;
1589
1268
  export { syncInject }
1590
- export { syncInject as syncInject_alias_1 }
1591
- export { syncInject as syncInject_alias_2 }
1592
1269
 
1593
1270
  declare class UnauthorizedException extends HttpException {
1594
1271
  constructor(message: string | object, error?: Error);
@@ -1597,21 +1274,15 @@ export { UnauthorizedException }
1597
1274
  export { UnauthorizedException as UnauthorizedException_alias_1 }
1598
1275
  export { UnauthorizedException as UnauthorizedException_alias_2 }
1599
1276
 
1600
- declare class UnknownError extends Error {
1601
- code: ErrorsEnum;
1602
- parent?: Error;
1603
- constructor(message: string | Error);
1604
- }
1605
1277
  export { UnknownError }
1606
- export { UnknownError as UnknownError_alias_1 }
1607
- export { UnknownError as UnknownError_alias_2 }
1608
- export { UnknownError as UnknownError_alias_3 }
1609
1278
 
1610
1279
  declare function UseGuards(...guards: (ClassTypeWithInstance<CanActivate> | InjectionToken<CanActivate, undefined>)[]): <T extends Function>(target: T, context: ClassMethodDecoratorContext | ClassDecoratorContext) => T;
1611
1280
  export { UseGuards }
1612
1281
  export { UseGuards as UseGuards_alias_1 }
1613
1282
  export { UseGuards as UseGuards_alias_2 }
1614
1283
 
1284
+ export { wrapSyncInit }
1285
+
1615
1286
  declare const yellow: (text: string) => string;
1616
1287
  export { yellow }
1617
1288
  export { yellow as yellow_alias_1 }