UNPKG

2.97 kBTypeScriptView Raw
1import { BindingKey } from '@loopback/context';
2import { Application, ApplicationConfig, ApplicationMetadata, ControllerClass } from './application';
3import { LifeCycleObserverOptions, LifeCycleObserverRegistry } from './lifecycle-registry';
4/**
5 * Namespace for core binding keys
6 */
7export declare namespace CoreBindings {
8 /**
9 * Binding key for application instance itself
10 */
11 const APPLICATION_INSTANCE: BindingKey<Application>;
12 /**
13 * Binding key for application configuration
14 */
15 const APPLICATION_CONFIG: BindingKey<ApplicationConfig>;
16 /**
17 * Binding key for the content of `package.json`
18 */
19 const APPLICATION_METADATA: BindingKey<ApplicationMetadata>;
20 /**
21 * Binding key for servers
22 */
23 const SERVERS = "servers";
24 /**
25 * Binding key for components
26 */
27 const COMPONENTS = "components";
28 const CONTROLLERS = "controllers";
29 /**
30 * Binding key for the controller class resolved in the current request
31 * context
32 */
33 const CONTROLLER_CLASS: BindingKey<ControllerClass>;
34 /**
35 * Binding key for the controller method resolved in the current request
36 * context
37 */
38 const CONTROLLER_METHOD_NAME: BindingKey<string>;
39 /**
40 * Binding key for the controller method metadata resolved in the current
41 * request context
42 */
43 const CONTROLLER_METHOD_META = "controller.method.meta";
44 /**
45 * Binding key for the controller instance resolved in the current request
46 * context
47 */
48 const CONTROLLER_CURRENT: BindingKey<unknown>;
49 const LIFE_CYCLE_OBSERVERS = "lifeCycleObservers";
50 /**
51 * Binding key for life cycle observer options
52 */
53 const LIFE_CYCLE_OBSERVER_REGISTRY: BindingKey<LifeCycleObserverRegistry>;
54 /**
55 * Binding key for life cycle observer options
56 */
57 const LIFE_CYCLE_OBSERVER_OPTIONS: BindingKey<LifeCycleObserverOptions>;
58}
59export declare namespace CoreTags {
60 /**
61 * Binding tag for components
62 */
63 const COMPONENT = "component";
64 /**
65 * Binding tag for servers
66 */
67 const SERVER = "server";
68 /**
69 * Binding tag for controllers
70 */
71 const CONTROLLER = "controller";
72 /**
73 * Binding tag for services
74 */
75 const SERVICE = "service";
76 /**
77 * Binding tag for the service interface
78 */
79 const SERVICE_INTERFACE = "serviceInterface";
80 /**
81 * Binding tag for life cycle observers
82 */
83 const LIFE_CYCLE_OBSERVER = "lifeCycleObserver";
84 /**
85 * Binding tag for group name of life cycle observers
86 */
87 const LIFE_CYCLE_OBSERVER_GROUP = "lifeCycleObserverGroup";
88 /**
89 * Binding tag for extensions to specify name of the extension point that an
90 * extension contributes to.
91 */
92 const EXTENSION_FOR = "extensionFor";
93 /**
94 * Binding tag for an extension point to specify name of the extension point
95 */
96 const EXTENSION_POINT = "extensionPoint";
97}