@loopback/docs 5.0.0 → 5.1.0
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/CHANGELOG.md +13 -0
- package/LICENSE +2 -2
- package/package.json +5 -5
- package/site/Copyright-generator.md +8 -7
- package/site/Discovering-models.md +5 -0
- package/site/{Polymorphic-relations.md → Polymorphic-relation.md} +1 -1
- package/site/Rest-Crud-generator.md +7 -1
- package/site/apidocs/boot.bootmixin.md +44 -44
- package/site/apidocs/context.config.getter.md +1 -1
- package/site/apidocs/context.config.view.md +1 -1
- package/site/apidocs/context.inject.binding.md +1 -1
- package/site/apidocs/context.inject.getter.md +1 -1
- package/site/apidocs/context.inject.setter.md +1 -1
- package/site/apidocs/context.inject.tag.md +1 -1
- package/site/apidocs/context.inject.view.md +1 -1
- package/site/apidocs/context.intercept.md +2 -2
- package/site/apidocs/express.middlewaremixin.md +28 -28
- package/site/apidocs/openapi-v3.deprecated.md +2 -2
- package/site/apidocs/openapi-v3.param.query.md +1 -1
- package/site/apidocs/openapi-v3.requestbody.array.md +3 -3
- package/site/apidocs/openapi-v3.requestbody.file.md +3 -3
- package/site/apidocs/openapi-v3.tags.md +2 -2
- package/site/apidocs/openapi-v3.visibility.md +2 -2
- package/site/apidocs/repository.repositorymixin.md +50 -50
- package/site/apidocs/{rest-crud.crudrestcontroller.create.md → rest-crud.crudrestcontroller.find.md} +8 -8
- package/site/apidocs/rest-crud.crudrestcontroller.md +1 -1
- package/site/apidocs/rest-crud.crudrestcontrolleroptions.md +1 -0
- package/site/apidocs/rest-crud.crudrestcontrolleroptions.readonly.md +23 -0
- package/site/apidocs/rest-crud.modelcrudrestapiconfig.md +1 -0
- package/site/apidocs/rest-crud.modelcrudrestapiconfig.readonly.md +23 -0
- package/site/apidocs/service-proxy.servicemixin.md +43 -43
- package/site/apidocs/service-proxy.serviceproxy.md +2 -2
- package/site/apidocs/typeorm.typeormmixin.md +61 -61
- package/site/changelogs/bodyparsers/rest-msgpack/CHANGELOG.md +14 -0
- package/site/changelogs/examples/access-control-migration/CHANGELOG.md +14 -0
- package/site/changelogs/examples/binding-resolution/CHANGELOG.md +14 -0
- package/site/changelogs/examples/context/CHANGELOG.md +14 -0
- package/site/changelogs/examples/express-composition/CHANGELOG.md +14 -0
- package/site/changelogs/examples/file-transfer/CHANGELOG.md +14 -0
- package/site/changelogs/examples/graphql/CHANGELOG.md +14 -0
- package/site/changelogs/examples/greeter-extension/CHANGELOG.md +14 -0
- package/site/changelogs/examples/greeting-app/CHANGELOG.md +14 -0
- package/site/changelogs/examples/hello-world/CHANGELOG.md +14 -0
- package/site/changelogs/examples/lb3-application/CHANGELOG.md +14 -0
- package/site/changelogs/examples/log-extension/CHANGELOG.md +14 -0
- package/site/changelogs/examples/metrics-prometheus/CHANGELOG.md +14 -0
- package/site/changelogs/examples/multi-tenancy/CHANGELOG.md +14 -0
- package/site/changelogs/examples/passport-login/CHANGELOG.md +14 -0
- package/site/changelogs/examples/references-many/CHANGELOG.md +13 -0
- package/site/changelogs/examples/rest-crud/CHANGELOG.md +14 -0
- package/site/changelogs/examples/rpc-server/CHANGELOG.md +14 -0
- package/site/changelogs/examples/soap-calculator/CHANGELOG.md +14 -0
- package/site/changelogs/examples/socketio/CHANGELOG.md +14 -0
- package/site/changelogs/examples/todo/CHANGELOG.md +14 -0
- package/site/changelogs/examples/todo-jwt/CHANGELOG.md +14 -0
- package/site/changelogs/examples/todo-list/CHANGELOG.md +14 -0
- package/site/changelogs/examples/validation-app/CHANGELOG.md +14 -0
- package/site/changelogs/examples/webpack/CHANGELOG.md +14 -0
- package/site/changelogs/extensions/apiconnect/CHANGELOG.md +14 -0
- package/site/changelogs/extensions/authentication-jwt/CHANGELOG.md +14 -0
- package/site/changelogs/extensions/authentication-passport/CHANGELOG.md +14 -0
- package/site/changelogs/extensions/context-explorer/CHANGELOG.md +14 -0
- package/site/changelogs/extensions/cron/CHANGELOG.md +14 -0
- package/site/changelogs/extensions/graphql/CHANGELOG.md +14 -0
- package/site/changelogs/extensions/health/CHANGELOG.md +14 -0
- package/site/changelogs/extensions/logging/CHANGELOG.md +14 -0
- package/site/changelogs/extensions/metrics/CHANGELOG.md +14 -0
- package/site/changelogs/extensions/pooling/CHANGELOG.md +14 -0
- package/site/changelogs/extensions/socketio/CHANGELOG.md +14 -0
- package/site/changelogs/extensions/typeorm/CHANGELOG.md +16 -0
- package/site/changelogs/fixtures/mock-oauth2-provider/CHANGELOG.md +293 -0
- package/site/changelogs/packages/authentication/CHANGELOG.md +14 -0
- package/site/changelogs/packages/authorization/CHANGELOG.md +14 -0
- package/site/changelogs/packages/boot/CHANGELOG.md +14 -0
- package/site/changelogs/packages/booter-lb3app/CHANGELOG.md +14 -0
- package/site/changelogs/packages/build/CHANGELOG.md +8 -0
- package/site/changelogs/packages/cli/CHANGELOG.md +20 -0
- package/site/changelogs/packages/context/CHANGELOG.md +14 -0
- package/site/changelogs/packages/core/CHANGELOG.md +14 -0
- package/site/changelogs/packages/eslint-config/CHANGELOG.md +11 -0
- package/site/changelogs/packages/express/CHANGELOG.md +14 -0
- package/site/changelogs/packages/filter/CHANGELOG.md +23 -0
- package/site/changelogs/packages/http-caching-proxy/CHANGELOG.md +14 -0
- package/site/changelogs/packages/http-server/CHANGELOG.md +19 -0
- package/site/changelogs/packages/metadata/CHANGELOG.md +14 -0
- package/site/changelogs/packages/model-api-builder/CHANGELOG.md +14 -0
- package/site/changelogs/packages/monorepo/CHANGELOG.md +8 -0
- package/site/changelogs/packages/openapi-spec-builder/CHANGELOG.md +14 -0
- package/site/changelogs/packages/openapi-v3/CHANGELOG.md +20 -0
- package/site/changelogs/packages/repository/CHANGELOG.md +16 -0
- package/site/changelogs/packages/repository-json-schema/CHANGELOG.md +14 -0
- package/site/changelogs/packages/repository-tests/CHANGELOG.md +15 -0
- package/site/changelogs/packages/rest/CHANGELOG.md +14 -0
- package/site/changelogs/packages/rest-crud/CHANGELOG.md +14 -0
- package/site/changelogs/packages/rest-explorer/CHANGELOG.md +14 -0
- package/site/changelogs/packages/security/CHANGELOG.md +14 -0
- package/site/changelogs/packages/service-proxy/CHANGELOG.md +14 -0
- package/site/changelogs/packages/testlab/CHANGELOG.md +8 -0
- package/site/changelogs/packages/tsdocs/CHANGELOG.md +14 -0
- package/site/readmes/loopback-next/packages/rest-crud/README.md +2 -1
- package/site/sidebars/lb4_sidebar.yml +4 -0
|
@@ -18,43 +18,43 @@ permalink: /doc/en/lb4/apidocs.express.middlewaremixin.html
|
|
|
18
18
|
```typescript
|
|
19
19
|
export declare function MiddlewareMixin<T extends MixinTarget<Context>>(superClass: T): {
|
|
20
20
|
new (...args: any[]): {
|
|
21
|
-
expressMiddleware(key: BindingAddress, middleware: ExpressRequestHandler | ExpressRequestHandler[], options?: MiddlewareBindingOptions
|
|
22
|
-
expressMiddleware<CFG>(middlewareFactory: ExpressMiddlewareFactory<CFG>, middlewareConfig?: CFG | undefined, options?: MiddlewareBindingOptions
|
|
23
|
-
expressMiddleware<CFG_1>(factoryOrKey: BindingAddress<Middleware> | ExpressMiddlewareFactory<CFG_1>, configOrHandler: ExpressRequestHandler | ExpressRequestHandler[] | CFG_1, options?: MiddlewareBindingOptions
|
|
21
|
+
expressMiddleware(key: BindingAddress, middleware: ExpressRequestHandler | ExpressRequestHandler[], options?: MiddlewareBindingOptions): Binding<Middleware>;
|
|
22
|
+
expressMiddleware<CFG>(middlewareFactory: ExpressMiddlewareFactory<CFG>, middlewareConfig?: CFG | undefined, options?: MiddlewareBindingOptions): Binding<Middleware>;
|
|
23
|
+
expressMiddleware<CFG_1>(factoryOrKey: BindingAddress<Middleware> | ExpressMiddlewareFactory<CFG_1>, configOrHandler: ExpressRequestHandler | ExpressRequestHandler[] | CFG_1, options?: MiddlewareBindingOptions): Binding<Middleware>;
|
|
24
24
|
middleware(middleware: Middleware | Constructor<Provider<Middleware>>, options?: MiddlewareBindingOptions): Binding<Middleware>;
|
|
25
25
|
readonly name: string;
|
|
26
|
-
readonly subscriptionManager:
|
|
27
|
-
scope:
|
|
26
|
+
readonly subscriptionManager: import("@loopback/core").ContextSubscriptionManager;
|
|
27
|
+
scope: import("@loopback/core").BindingScope;
|
|
28
28
|
readonly parent: Context | undefined;
|
|
29
|
-
emitEvent: <T_1 extends
|
|
29
|
+
emitEvent: <T_1 extends import("@loopback/core").ContextEvent>(type: string, event: T_1) => void;
|
|
30
30
|
emitError: (err: unknown) => void;
|
|
31
31
|
bind: <ValueType = any>(key: BindingAddress<ValueType>) => Binding<ValueType>;
|
|
32
32
|
add: (binding: Binding<unknown>) => Context;
|
|
33
33
|
configure: <ConfigValueType = any>(key?: BindingAddress<unknown> | undefined) => Binding<ConfigValueType>;
|
|
34
|
-
getConfigAsValueOrPromise: <ConfigValueType_1>(key: BindingAddress<unknown>, propertyPath?: string | undefined, resolutionOptions?:
|
|
35
|
-
getConfig: <ConfigValueType_2>(key: BindingAddress<unknown>, propertyPath?: string | undefined, resolutionOptions?:
|
|
36
|
-
getConfigSync: <ConfigValueType_3>(key: BindingAddress<unknown>, propertyPath?: string | undefined, resolutionOptions?:
|
|
34
|
+
getConfigAsValueOrPromise: <ConfigValueType_1>(key: BindingAddress<unknown>, propertyPath?: string | undefined, resolutionOptions?: import("@loopback/core").ResolutionOptions | undefined) => import("@loopback/core").ValueOrPromise<ConfigValueType_1 | undefined>;
|
|
35
|
+
getConfig: <ConfigValueType_2>(key: BindingAddress<unknown>, propertyPath?: string | undefined, resolutionOptions?: import("@loopback/core").ResolutionOptions | undefined) => Promise<ConfigValueType_2 | undefined>;
|
|
36
|
+
getConfigSync: <ConfigValueType_3>(key: BindingAddress<unknown>, propertyPath?: string | undefined, resolutionOptions?: import("@loopback/core").ResolutionOptions | undefined) => ConfigValueType_3 | undefined;
|
|
37
37
|
unbind: (key: BindingAddress<unknown>) => boolean;
|
|
38
|
-
subscribe: (observer:
|
|
39
|
-
unsubscribe: (observer:
|
|
38
|
+
subscribe: (observer: import("@loopback/core").ContextEventObserver) => import("@loopback/core").Subscription;
|
|
39
|
+
unsubscribe: (observer: import("@loopback/core").ContextEventObserver) => boolean;
|
|
40
40
|
close: () => void;
|
|
41
|
-
isSubscribed: (observer:
|
|
42
|
-
createView: <T_2 = unknown>(filter:
|
|
41
|
+
isSubscribed: (observer: import("@loopback/core").ContextObserver) => boolean;
|
|
42
|
+
createView: <T_2 = unknown>(filter: import("@loopback/core").BindingFilter, comparator?: import("@loopback/core").BindingComparator | undefined, options?: Omit<import("@loopback/core").ResolutionOptions, "session"> | undefined) => import("@loopback/core").ContextView<T_2>;
|
|
43
43
|
contains: (key: BindingAddress<unknown>) => boolean;
|
|
44
44
|
isBound: (key: BindingAddress<unknown>) => boolean;
|
|
45
45
|
getOwnerContext: (keyOrBinding: BindingAddress<unknown> | Readonly<Binding<unknown>>) => Context | undefined;
|
|
46
|
-
getScopedContext: (scope:
|
|
46
|
+
getScopedContext: (scope: import("@loopback/core").BindingScope.APPLICATION | import("@loopback/core").BindingScope.SERVER | import("@loopback/core").BindingScope.REQUEST) => Context | undefined;
|
|
47
47
|
getResolutionContext: (binding: Readonly<Binding<unknown>>) => Context | undefined;
|
|
48
48
|
isVisibleTo: (ctx: Context) => boolean;
|
|
49
|
-
find: <ValueType_1 = any>(pattern?: string | RegExp |
|
|
50
|
-
findByTag: <ValueType_2 = any>(tagFilter: RegExp |
|
|
49
|
+
find: <ValueType_1 = any>(pattern?: string | RegExp | import("@loopback/core").BindingFilter | undefined) => Readonly<Binding<ValueType_1>>[];
|
|
50
|
+
findByTag: <ValueType_2 = any>(tagFilter: RegExp | import("@loopback/core").BindingTag) => Readonly<Binding<ValueType_2>>[];
|
|
51
51
|
get: {
|
|
52
|
-
<ValueType_3>(keyWithPath: BindingAddress<ValueType_3>, session?:
|
|
53
|
-
<ValueType_4>(keyWithPath: BindingAddress<ValueType_4>, options:
|
|
52
|
+
<ValueType_3>(keyWithPath: BindingAddress<ValueType_3>, session?: import("@loopback/core").ResolutionSession | undefined): Promise<ValueType_3>;
|
|
53
|
+
<ValueType_4>(keyWithPath: BindingAddress<ValueType_4>, options: import("@loopback/core").ResolutionOptions): Promise<ValueType_4 | undefined>;
|
|
54
54
|
};
|
|
55
55
|
getSync: {
|
|
56
|
-
<ValueType_5>(keyWithPath: BindingAddress<ValueType_5>, session?:
|
|
57
|
-
<ValueType_6>(keyWithPath: BindingAddress<ValueType_6>, options?:
|
|
56
|
+
<ValueType_5>(keyWithPath: BindingAddress<ValueType_5>, session?: import("@loopback/core").ResolutionSession | undefined): ValueType_5;
|
|
57
|
+
<ValueType_6>(keyWithPath: BindingAddress<ValueType_6>, options?: import("@loopback/core").ResolutionOptions | undefined): ValueType_6 | undefined;
|
|
58
58
|
};
|
|
59
59
|
getBinding: {
|
|
60
60
|
<ValueType_7 = any>(key: BindingAddress<ValueType_7>): Binding<ValueType_7>;
|
|
@@ -62,16 +62,16 @@ export declare function MiddlewareMixin<T extends MixinTarget<Context>>(superCla
|
|
|
62
62
|
optional?: boolean | undefined;
|
|
63
63
|
} | undefined): Binding<ValueType_8> | undefined;
|
|
64
64
|
};
|
|
65
|
-
findOrCreateBinding: <T_3>(key: BindingAddress<T_3>, policy?:
|
|
66
|
-
getValueOrPromise: <ValueType_9>(keyWithPath: BindingAddress<ValueType_9>, optionsOrSession?:
|
|
67
|
-
toJSON: () =>
|
|
68
|
-
inspect: (options?:
|
|
65
|
+
findOrCreateBinding: <T_3>(key: BindingAddress<T_3>, policy?: import("@loopback/core").BindingCreationPolicy | undefined) => Binding<T_3>;
|
|
66
|
+
getValueOrPromise: <ValueType_9>(keyWithPath: BindingAddress<ValueType_9>, optionsOrSession?: import("@loopback/core").ResolutionOptionsOrSession | undefined) => import("@loopback/core").ValueOrPromise<ValueType_9 | undefined>;
|
|
67
|
+
toJSON: () => import("@loopback/core").JSONObject;
|
|
68
|
+
inspect: (options?: import("@loopback/core").ContextInspectOptions | undefined) => import("@loopback/core").JSONObject;
|
|
69
69
|
on: {
|
|
70
|
-
(eventName: "bind" | "unbind", listener:
|
|
70
|
+
(eventName: "bind" | "unbind", listener: import("@loopback/core").ContextEventListener): Context;
|
|
71
71
|
(event: string | symbol, listener: (...args: any[]) => void): Context;
|
|
72
72
|
};
|
|
73
73
|
once: {
|
|
74
|
-
(eventName: "bind" | "unbind", listener:
|
|
74
|
+
(eventName: "bind" | "unbind", listener: import("@loopback/core").ContextEventListener): Context;
|
|
75
75
|
(event: string | symbol, listener: (...args: any[]) => void): Context;
|
|
76
76
|
};
|
|
77
77
|
addListener: (event: string | symbol, listener: (...args: any[]) => void) => Context;
|
|
@@ -83,7 +83,7 @@ export declare function MiddlewareMixin<T extends MixinTarget<Context>>(superCla
|
|
|
83
83
|
listeners: (event: string | symbol) => Function[];
|
|
84
84
|
rawListeners: (event: string | symbol) => Function[];
|
|
85
85
|
emit: (event: string | symbol, ...args: any[]) => boolean;
|
|
86
|
-
listenerCount: (
|
|
86
|
+
listenerCount: (event: string | symbol) => number;
|
|
87
87
|
prependListener: (event: string | symbol, listener: (...args: any[]) => void) => Context;
|
|
88
88
|
prependOnceListener: (event: string | symbol, listener: (...args: any[]) => void) => Context;
|
|
89
89
|
eventNames: () => (string | symbol)[];
|
|
@@ -99,6 +99,6 @@ export declare function MiddlewareMixin<T extends MixinTarget<Context>>(superCla
|
|
|
99
99
|
|
|
100
100
|
<b>Returns:</b>
|
|
101
101
|
|
|
102
|
-
{ new (...args: any\[\]): { expressMiddleware(key: [BindingAddress](./context.bindingaddress.md)<!-- -->, middleware: [ExpressRequestHandler](./express.expressrequesthandler.md) \| [ExpressRequestHandler](./express.expressrequesthandler.md)<!-- -->\[\], options?: [MiddlewareBindingOptions](./express.middlewarebindingoptions.md) \| undefined): [Binding](./context.binding.md)<!-- --><[Middleware](./express.middleware.md)<!-- -->>; expressMiddleware<CFG>(middlewareFactory: [ExpressMiddlewareFactory](./express.expressmiddlewarefactory.md)<!-- --><CFG>, middlewareConfig?: CFG \| undefined, options?: [MiddlewareBindingOptions](./express.middlewarebindingoptions.md) \| undefined): [Binding](./context.binding.md)<!-- --><[Middleware](./express.middleware.md)<!-- -->>; expressMiddleware<CFG\_1>(factoryOrKey: [BindingAddress](./context.bindingaddress.md)<!-- --><[Middleware](./express.middleware.md)<!-- -->> \| [ExpressMiddlewareFactory](./express.expressmiddlewarefactory.md)<!-- --><CFG\_1>, configOrHandler: [ExpressRequestHandler](./express.expressrequesthandler.md) \| [ExpressRequestHandler](./express.expressrequesthandler.md)<!-- -->\[\] \| CFG\_1, options?: [MiddlewareBindingOptions](./express.middlewarebindingoptions.md) \| undefined): [Binding](./context.binding.md)<!-- --><[Middleware](./express.middleware.md)<!-- -->>; middleware(middleware: [Middleware](./express.middleware.md) \| [Constructor](./context.constructor.md)<!-- --><[Provider](./context.provider.md)<!-- --><[Middleware](./express.middleware.md)<!-- -->>>, options?: [MiddlewareBindingOptions](./express.middlewarebindingoptions.md)<!-- -->): [Binding](./context.binding.md)<!-- --><[Middleware](./express.middleware.md)<!-- -->>; readonly name: string; readonly subscriptionManager: loopbackContext.[ContextSubscriptionManager](./context.contextsubscriptionmanager.md)<!-- -->; scope: loopbackContext.[BindingScope](./context.bindingscope.md)<!-- -->; readonly parent: [Context](./context.context.md) \| undefined; emitEvent: <T\_1 extends loopbackContext.[ContextEvent](./context.contextevent.md)<!-- -->>(type: string, event: T\_1) => void; emitError: (err: unknown) => void; bind: <ValueType = any>(key: [BindingAddress](./context.bindingaddress.md)<!-- --><ValueType>) => [Binding](./context.binding.md)<!-- --><ValueType>; add: (binding: [Binding](./context.binding.md)<!-- --><unknown>) => [Context](./context.context.md)<!-- -->; configure: <ConfigValueType = any>(key?: [BindingAddress](./context.bindingaddress.md)<!-- --><unknown> \| undefined) => [Binding](./context.binding.md)<!-- --><ConfigValueType>; getConfigAsValueOrPromise: <ConfigValueType\_1>(key: [BindingAddress](./context.bindingaddress.md)<!-- --><unknown>, propertyPath?: string \| undefined, resolutionOptions?: loopbackContext.[ResolutionOptions](./context.resolutionoptions.md) \| undefined) => loopbackContext.[ValueOrPromise](./context.valueorpromise.md)<!-- --><ConfigValueType\_1 \| undefined>; getConfig: <ConfigValueType\_2>(key: [BindingAddress](./context.bindingaddress.md)<!-- --><unknown>, propertyPath?: string \| undefined, resolutionOptions?: loopbackContext.[ResolutionOptions](./context.resolutionoptions.md) \| undefined) => Promise<ConfigValueType\_2 \| undefined>; getConfigSync: <ConfigValueType\_3>(key: [BindingAddress](./context.bindingaddress.md)<!-- --><unknown>, propertyPath?: string \| undefined, resolutionOptions?: loopbackContext.[ResolutionOptions](./context.resolutionoptions.md) \| undefined) => ConfigValueType\_3 \| undefined; unbind: (key: [BindingAddress](./context.bindingaddress.md)<!-- --><unknown>) => boolean; subscribe: (observer: loopbackContext.[ContextEventObserver](./context.contexteventobserver.md)<!-- -->) => loopbackContext.[Subscription](./context.subscription.md)<!-- -->; unsubscribe: (observer: loopbackContext.[ContextEventObserver](./context.contexteventobserver.md)<!-- -->) => boolean; close: () => void; isSubscribed: (observer: loopbackContext.[ContextObserver](./context.contextobserver.md)<!-- -->) => boolean; createView: <T\_2 = unknown>(filter: loopbackContext.[BindingFilter](./context.bindingfilter.md)<!-- -->, comparator?: loopbackContext.[BindingComparator](./context.bindingcomparator.md) \| undefined, options?: Omit<loopbackContext.[ResolutionOptions](./context.resolutionoptions.md)<!-- -->, "session"> \| undefined) => loopbackContext.[ContextView](./context.contextview.md)<!-- --><T\_2>; contains: (key: [BindingAddress](./context.bindingaddress.md)<!-- --><unknown>) => boolean; isBound: (key: [BindingAddress](./context.bindingaddress.md)<!-- --><unknown>) => boolean; getOwnerContext: (keyOrBinding: [BindingAddress](./context.bindingaddress.md)<!-- --><unknown> \| Readonly<[Binding](./context.binding.md)<!-- --><unknown>>) => [Context](./context.context.md) \| undefined; getScopedContext: (scope: loopbackContext.[BindingScope.APPLICATION](./context.bindingscope.md) \| loopbackContext.[BindingScope.SERVER](./context.bindingscope.md) \| loopbackContext.[BindingScope.REQUEST](./context.bindingscope.md)<!-- -->) => [Context](./context.context.md) \| undefined; getResolutionContext: (binding: Readonly<[Binding](./context.binding.md)<!-- --><unknown>>) => [Context](./context.context.md) \| undefined; isVisibleTo: (ctx: [Context](./context.context.md)<!-- -->) => boolean; find: <ValueType\_1 = any>(pattern?: string \| RegExp \| loopbackContext.[BindingFilter](./context.bindingfilter.md) \| undefined) => Readonly<[Binding](./context.binding.md)<!-- --><ValueType\_1>>\[\]; findByTag: <ValueType\_2 = any>(tagFilter: RegExp \| loopbackContext.[BindingTag](./context.bindingtag.md)<!-- -->) => Readonly<[Binding](./context.binding.md)<!-- --><ValueType\_2>>\[\]; get: { <ValueType\_3>(keyWithPath: [BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_3>, session?: loopbackContext.[ResolutionSession](./context.resolutionsession.md) \| undefined): Promise<ValueType\_3>; <ValueType\_4>(keyWithPath: [BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_4>, options: loopbackContext.[ResolutionOptions](./context.resolutionoptions.md)<!-- -->): Promise<ValueType\_4 \| undefined>; }; getSync: { <ValueType\_5>(keyWithPath: [BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_5>, session?: loopbackContext.[ResolutionSession](./context.resolutionsession.md) \| undefined): ValueType\_5; <ValueType\_6>(keyWithPath: [BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_6>, options?: loopbackContext.[ResolutionOptions](./context.resolutionoptions.md) \| undefined): ValueType\_6 \| undefined; }; getBinding: { <ValueType\_7 = any>(key: [BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_7>): [Binding](./context.binding.md)<!-- --><ValueType\_7>; <ValueType\_8>(key: [BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_8>, options?: { optional?: boolean \| undefined; } \| undefined): [Binding](./context.binding.md)<!-- --><ValueType\_8> \| undefined; }; findOrCreateBinding: <T\_3>(key: [BindingAddress](./context.bindingaddress.md)<!-- --><T\_3>, policy?: loopbackContext.[BindingCreationPolicy](./context.bindingcreationpolicy.md) \| undefined) => [Binding](./context.binding.md)<!-- --><T\_3>; getValueOrPromise: <ValueType\_9>(keyWithPath: [BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_9>, optionsOrSession?: loopbackContext.[ResolutionOptionsOrSession](./context.resolutionoptionsorsession.md) \| undefined) => loopbackContext.[ValueOrPromise](./context.valueorpromise.md)<!-- --><ValueType\_9 \| undefined>; toJSON: () => loopbackContext.[JSONObject](./context.jsonobject.md)<!-- -->; inspect: (options?: loopbackContext.[ContextInspectOptions](./context.contextinspectoptions.md) \| undefined) => loopbackContext.[JSONObject](./context.jsonobject.md)<!-- -->; on: { (eventName: "bind" \| "unbind", listener: loopbackContext.[ContextEventListener](./context.contexteventlistener.md)<!-- -->): [Context](./context.context.md)<!-- -->; (event: string \| symbol, listener: (...args: any\[\]) => void): [Context](./context.context.md)<!-- -->; }; once: { (eventName: "bind" \| "unbind", listener: loopbackContext.[ContextEventListener](./context.contexteventlistener.md)<!-- -->): [Context](./context.context.md)<!-- -->; (event: string \| symbol, listener: (...args: any\[\]) => void): [Context](./context.context.md)<!-- -->; }; addListener: (event: string \| symbol, listener: (...args: any\[\]) => void) => [Context](./context.context.md)<!-- -->; removeListener: (event: string \| symbol, listener: (...args: any\[\]) => void) => [Context](./context.context.md)<!-- -->; off: (event: string \| symbol, listener: (...args: any\[\]) => void) => [Context](./context.context.md)<!-- -->; removeAllListeners: (event?: string \| symbol \| undefined) => [Context](./context.context.md)<!-- -->; setMaxListeners: (n: number) => [Context](./context.context.md)<!-- -->; getMaxListeners: () => number; listeners: (event: string \| symbol) => Function\[\]; rawListeners: (event: string \| symbol) => Function\[\]; emit: (event: string \| symbol, ...args: any\[\]) => boolean; listenerCount: (type: string \| symbol) => number; prependListener: (event: string \| symbol, listener: (...args: any\[\]) => void) => [Context](./context.context.md)<!-- -->; prependOnceListener: (event: string \| symbol, listener: (...args: any\[\]) => void) => [Context](./context.context.md)<!-- -->; eventNames: () => (string \| symbol)\[\]; }; } & T
|
|
102
|
+
{ new (...args: any\[\]): { expressMiddleware(key: [BindingAddress](./context.bindingaddress.md)<!-- -->, middleware: [ExpressRequestHandler](./express.expressrequesthandler.md) \| [ExpressRequestHandler](./express.expressrequesthandler.md)<!-- -->\[\], options?: [MiddlewareBindingOptions](./express.middlewarebindingoptions.md)<!-- -->): [Binding](./context.binding.md)<!-- --><[Middleware](./express.middleware.md)<!-- -->>; expressMiddleware<CFG>(middlewareFactory: [ExpressMiddlewareFactory](./express.expressmiddlewarefactory.md)<!-- --><CFG>, middlewareConfig?: CFG \| undefined, options?: [MiddlewareBindingOptions](./express.middlewarebindingoptions.md)<!-- -->): [Binding](./context.binding.md)<!-- --><[Middleware](./express.middleware.md)<!-- -->>; expressMiddleware<CFG\_1>(factoryOrKey: [BindingAddress](./context.bindingaddress.md)<!-- --><[Middleware](./express.middleware.md)<!-- -->> \| [ExpressMiddlewareFactory](./express.expressmiddlewarefactory.md)<!-- --><CFG\_1>, configOrHandler: [ExpressRequestHandler](./express.expressrequesthandler.md) \| [ExpressRequestHandler](./express.expressrequesthandler.md)<!-- -->\[\] \| CFG\_1, options?: [MiddlewareBindingOptions](./express.middlewarebindingoptions.md)<!-- -->): [Binding](./context.binding.md)<!-- --><[Middleware](./express.middleware.md)<!-- -->>; middleware(middleware: [Middleware](./express.middleware.md) \| [Constructor](./context.constructor.md)<!-- --><[Provider](./context.provider.md)<!-- --><[Middleware](./express.middleware.md)<!-- -->>>, options?: [MiddlewareBindingOptions](./express.middlewarebindingoptions.md)<!-- -->): [Binding](./context.binding.md)<!-- --><[Middleware](./express.middleware.md)<!-- -->>; readonly name: string; readonly subscriptionManager: import("@loopback/core").[ContextSubscriptionManager](./context.contextsubscriptionmanager.md)<!-- -->; scope: import("@loopback/core").[BindingScope](./context.bindingscope.md)<!-- -->; readonly parent: [Context](./context.context.md) \| undefined; emitEvent: <T\_1 extends import("@loopback/core").[ContextEvent](./context.contextevent.md)<!-- -->>(type: string, event: T\_1) => void; emitError: (err: unknown) => void; bind: <ValueType = any>(key: [BindingAddress](./context.bindingaddress.md)<!-- --><ValueType>) => [Binding](./context.binding.md)<!-- --><ValueType>; add: (binding: [Binding](./context.binding.md)<!-- --><unknown>) => [Context](./context.context.md)<!-- -->; configure: <ConfigValueType = any>(key?: [BindingAddress](./context.bindingaddress.md)<!-- --><unknown> \| undefined) => [Binding](./context.binding.md)<!-- --><ConfigValueType>; getConfigAsValueOrPromise: <ConfigValueType\_1>(key: [BindingAddress](./context.bindingaddress.md)<!-- --><unknown>, propertyPath?: string \| undefined, resolutionOptions?: import("@loopback/core").[ResolutionOptions](./context.resolutionoptions.md) \| undefined) => import("@loopback/core").[ValueOrPromise](./context.valueorpromise.md)<!-- --><ConfigValueType\_1 \| undefined>; getConfig: <ConfigValueType\_2>(key: [BindingAddress](./context.bindingaddress.md)<!-- --><unknown>, propertyPath?: string \| undefined, resolutionOptions?: import("@loopback/core").[ResolutionOptions](./context.resolutionoptions.md) \| undefined) => Promise<ConfigValueType\_2 \| undefined>; getConfigSync: <ConfigValueType\_3>(key: [BindingAddress](./context.bindingaddress.md)<!-- --><unknown>, propertyPath?: string \| undefined, resolutionOptions?: import("@loopback/core").[ResolutionOptions](./context.resolutionoptions.md) \| undefined) => ConfigValueType\_3 \| undefined; unbind: (key: [BindingAddress](./context.bindingaddress.md)<!-- --><unknown>) => boolean; subscribe: (observer: import("@loopback/core").[ContextEventObserver](./context.contexteventobserver.md)<!-- -->) => import("@loopback/core").[Subscription](./context.subscription.md)<!-- -->; unsubscribe: (observer: import("@loopback/core").[ContextEventObserver](./context.contexteventobserver.md)<!-- -->) => boolean; close: () => void; isSubscribed: (observer: import("@loopback/core").[ContextObserver](./context.contextobserver.md)<!-- -->) => boolean; createView: <T\_2 = unknown>(filter: import("@loopback/core").[BindingFilter](./context.bindingfilter.md)<!-- -->, comparator?: import("@loopback/core").[BindingComparator](./context.bindingcomparator.md) \| undefined, options?: Omit<import("@loopback/core").[ResolutionOptions](./context.resolutionoptions.md)<!-- -->, "session"> \| undefined) => import("@loopback/core").[ContextView](./context.contextview.md)<!-- --><T\_2>; contains: (key: [BindingAddress](./context.bindingaddress.md)<!-- --><unknown>) => boolean; isBound: (key: [BindingAddress](./context.bindingaddress.md)<!-- --><unknown>) => boolean; getOwnerContext: (keyOrBinding: [BindingAddress](./context.bindingaddress.md)<!-- --><unknown> \| Readonly<[Binding](./context.binding.md)<!-- --><unknown>>) => [Context](./context.context.md) \| undefined; getScopedContext: (scope: import("@loopback/core").[BindingScope.APPLICATION](./context.bindingscope.md) \| import("@loopback/core").[BindingScope.SERVER](./context.bindingscope.md) \| import("@loopback/core").[BindingScope.REQUEST](./context.bindingscope.md)<!-- -->) => [Context](./context.context.md) \| undefined; getResolutionContext: (binding: Readonly<[Binding](./context.binding.md)<!-- --><unknown>>) => [Context](./context.context.md) \| undefined; isVisibleTo: (ctx: [Context](./context.context.md)<!-- -->) => boolean; find: <ValueType\_1 = any>(pattern?: string \| RegExp \| import("@loopback/core").[BindingFilter](./context.bindingfilter.md) \| undefined) => Readonly<[Binding](./context.binding.md)<!-- --><ValueType\_1>>\[\]; findByTag: <ValueType\_2 = any>(tagFilter: RegExp \| import("@loopback/core").[BindingTag](./context.bindingtag.md)<!-- -->) => Readonly<[Binding](./context.binding.md)<!-- --><ValueType\_2>>\[\]; get: { <ValueType\_3>(keyWithPath: [BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_3>, session?: import("@loopback/core").[ResolutionSession](./context.resolutionsession.md) \| undefined): Promise<ValueType\_3>; <ValueType\_4>(keyWithPath: [BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_4>, options: import("@loopback/core").[ResolutionOptions](./context.resolutionoptions.md)<!-- -->): Promise<ValueType\_4 \| undefined>; }; getSync: { <ValueType\_5>(keyWithPath: [BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_5>, session?: import("@loopback/core").[ResolutionSession](./context.resolutionsession.md) \| undefined): ValueType\_5; <ValueType\_6>(keyWithPath: [BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_6>, options?: import("@loopback/core").[ResolutionOptions](./context.resolutionoptions.md) \| undefined): ValueType\_6 \| undefined; }; getBinding: { <ValueType\_7 = any>(key: [BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_7>): [Binding](./context.binding.md)<!-- --><ValueType\_7>; <ValueType\_8>(key: [BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_8>, options?: { optional?: boolean \| undefined; } \| undefined): [Binding](./context.binding.md)<!-- --><ValueType\_8> \| undefined; }; findOrCreateBinding: <T\_3>(key: [BindingAddress](./context.bindingaddress.md)<!-- --><T\_3>, policy?: import("@loopback/core").[BindingCreationPolicy](./context.bindingcreationpolicy.md) \| undefined) => [Binding](./context.binding.md)<!-- --><T\_3>; getValueOrPromise: <ValueType\_9>(keyWithPath: [BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_9>, optionsOrSession?: import("@loopback/core").[ResolutionOptionsOrSession](./context.resolutionoptionsorsession.md) \| undefined) => import("@loopback/core").[ValueOrPromise](./context.valueorpromise.md)<!-- --><ValueType\_9 \| undefined>; toJSON: () => import("@loopback/core").[JSONObject](./context.jsonobject.md)<!-- -->; inspect: (options?: import("@loopback/core").[ContextInspectOptions](./context.contextinspectoptions.md) \| undefined) => import("@loopback/core").[JSONObject](./context.jsonobject.md)<!-- -->; on: { (eventName: "bind" \| "unbind", listener: import("@loopback/core").[ContextEventListener](./context.contexteventlistener.md)<!-- -->): [Context](./context.context.md)<!-- -->; (event: string \| symbol, listener: (...args: any\[\]) => void): [Context](./context.context.md)<!-- -->; }; once: { (eventName: "bind" \| "unbind", listener: import("@loopback/core").[ContextEventListener](./context.contexteventlistener.md)<!-- -->): [Context](./context.context.md)<!-- -->; (event: string \| symbol, listener: (...args: any\[\]) => void): [Context](./context.context.md)<!-- -->; }; addListener: (event: string \| symbol, listener: (...args: any\[\]) => void) => [Context](./context.context.md)<!-- -->; removeListener: (event: string \| symbol, listener: (...args: any\[\]) => void) => [Context](./context.context.md)<!-- -->; off: (event: string \| symbol, listener: (...args: any\[\]) => void) => [Context](./context.context.md)<!-- -->; removeAllListeners: (event?: string \| symbol \| undefined) => [Context](./context.context.md)<!-- -->; setMaxListeners: (n: number) => [Context](./context.context.md)<!-- -->; getMaxListeners: () => number; listeners: (event: string \| symbol) => Function\[\]; rawListeners: (event: string \| symbol) => Function\[\]; emit: (event: string \| symbol, ...args: any\[\]) => boolean; listenerCount: (event: string \| symbol) => number; prependListener: (event: string \| symbol, listener: (...args: any\[\]) => void) => [Context](./context.context.md)<!-- -->; prependOnceListener: (event: string \| symbol, listener: (...args: any\[\]) => void) => [Context](./context.context.md)<!-- -->; eventNames: () => (string \| symbol)\[\]; }; } & T
|
|
103
103
|
|
|
104
104
|
|
|
@@ -20,7 +20,7 @@ You can optionally mark all controllers in a class as deprecated, but use `@depr
|
|
|
20
20
|
<b>Signature:</b>
|
|
21
21
|
|
|
22
22
|
```typescript
|
|
23
|
-
export declare function deprecated(isDeprecated?: boolean): (target: any, method?: string
|
|
23
|
+
export declare function deprecated(isDeprecated?: boolean): (target: any, method?: string, methodDescriptor?: TypedPropertyDescriptor<any>) => any;
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
## Parameters
|
|
@@ -31,7 +31,7 @@ export declare function deprecated(isDeprecated?: boolean): (target: any, method
|
|
|
31
31
|
|
|
32
32
|
<b>Returns:</b>
|
|
33
33
|
|
|
34
|
-
(target: any, method?: string
|
|
34
|
+
(target: any, method?: string, methodDescriptor?: TypedPropertyDescriptor<any>) => any
|
|
35
35
|
|
|
36
36
|
## Example
|
|
37
37
|
|
|
@@ -31,7 +31,7 @@ query: {
|
|
|
31
31
|
date: (name: string, spec?: Partial<ParameterObject> | undefined) => (target: object, member: string, index: number) => void;
|
|
32
32
|
dateTime: (name: string, spec?: Partial<ParameterObject> | undefined) => (target: object, member: string, index: number) => void;
|
|
33
33
|
password: (name: string, spec?: Partial<ParameterObject> | undefined) => (target: object, member: string, index: number) => void;
|
|
34
|
-
object: (name: string, schema?: SchemaObject | ReferenceObject, spec?: Partial<ParameterObject>
|
|
34
|
+
object: (name: string, schema?: SchemaObject | ReferenceObject, spec?: Partial<ParameterObject>) => (target: object, member: string, index: number) => void;
|
|
35
35
|
}
|
|
36
36
|
```
|
|
37
37
|
|
|
@@ -19,9 +19,9 @@ Define a requestBody of `array` type.
|
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
21
|
array: (itemSpec: SchemaObject | ReferenceObject, properties?: {
|
|
22
|
-
description?: string
|
|
23
|
-
required?: boolean
|
|
24
|
-
}
|
|
22
|
+
description?: string;
|
|
23
|
+
required?: boolean;
|
|
24
|
+
}) => (target: object, member: string, index: number) => void
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## Example
|
|
@@ -21,9 +21,9 @@ Define a requestBody of `file` type. This is used to support multipart/form-data
|
|
|
21
21
|
|
|
22
22
|
```typescript
|
|
23
23
|
file: (properties?: {
|
|
24
|
-
description?: string
|
|
25
|
-
required?: boolean
|
|
26
|
-
}
|
|
24
|
+
description?: string;
|
|
25
|
+
required?: boolean;
|
|
26
|
+
}) => (target: object, member: string, index: number) => void
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
## Example
|
|
@@ -18,7 +18,7 @@ Add tags for an endpoint. When applied to a class, this decorator adds the tags
|
|
|
18
18
|
<b>Signature:</b>
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
|
-
export declare function tags(...tagNames: string[]): (target: any, method?: string
|
|
21
|
+
export declare function tags(...tagNames: string[]): (target: any, method?: string, methodDescriptor?: TypedPropertyDescriptor<any>) => any;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Parameters
|
|
@@ -29,7 +29,7 @@ export declare function tags(...tagNames: string[]): (target: any, method?: stri
|
|
|
29
29
|
|
|
30
30
|
<b>Returns:</b>
|
|
31
31
|
|
|
32
|
-
(target: any, method?: string
|
|
32
|
+
(target: any, method?: string, methodDescriptor?: TypedPropertyDescriptor<any>) => any
|
|
33
33
|
|
|
34
34
|
## Example
|
|
35
35
|
|
|
@@ -20,7 +20,7 @@ You can optionally mark all controllers in a class with `@visibility('undocument
|
|
|
20
20
|
<b>Signature:</b>
|
|
21
21
|
|
|
22
22
|
```typescript
|
|
23
|
-
export declare function visibility(visibilityType: OperationVisibility): (target: any, method?: string
|
|
23
|
+
export declare function visibility(visibilityType: OperationVisibility): (target: any, method?: string, methodDescriptor?: TypedPropertyDescriptor<any>) => any;
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
## Parameters
|
|
@@ -31,7 +31,7 @@ export declare function visibility(visibilityType: OperationVisibility): (target
|
|
|
31
31
|
|
|
32
32
|
<b>Returns:</b>
|
|
33
33
|
|
|
34
|
-
(target: any, method?: string
|
|
34
|
+
(target: any, method?: string, methodDescriptor?: TypedPropertyDescriptor<any>) => any
|
|
35
35
|
|
|
36
36
|
## Example
|
|
37
37
|
|
|
@@ -20,80 +20,80 @@ A mixin class for Application that creates a .repository() function to register
|
|
|
20
20
|
```typescript
|
|
21
21
|
export declare function RepositoryMixin<T extends MixinTarget<Application>>(superClass: T): {
|
|
22
22
|
new (...args: any[]): {
|
|
23
|
-
repository<R extends Repository<any>>(repoClass: Class<R>, nameOrOptions?: string | BindingFromClassOptions
|
|
23
|
+
repository<R extends Repository<any>>(repoClass: Class<R>, nameOrOptions?: string | BindingFromClassOptions): Binding<R>;
|
|
24
24
|
getRepository<R_1 extends Repository<any>>(repo: Class<R_1>): Promise<R_1>;
|
|
25
|
-
dataSource<D extends juggler.DataSource>(dataSource: D | Class<D>, nameOrOptions?: string | BindingFromClassOptions
|
|
25
|
+
dataSource<D extends juggler.DataSource>(dataSource: D | Class<D>, nameOrOptions?: string | BindingFromClassOptions): Binding<D>;
|
|
26
26
|
model<M extends Class<unknown>>(modelClass: M): Binding<M>;
|
|
27
|
-
component<C extends Component = Component>(componentCtor: Constructor<C>, nameOrOptions?: string | BindingFromClassOptions
|
|
27
|
+
component<C extends Component = Component>(componentCtor: Constructor<C>, nameOrOptions?: string | BindingFromClassOptions): Binding<C>;
|
|
28
28
|
mountComponentRepositories(componentInstanceOrClass: Class<unknown> | RepositoryComponent): void;
|
|
29
29
|
mountComponentModels(component: RepositoryComponent): void;
|
|
30
30
|
migrateSchema(options?: SchemaMigrationOptions): Promise<void>;
|
|
31
|
-
readonly options:
|
|
31
|
+
readonly options: import("@loopback/core").ApplicationConfig;
|
|
32
32
|
readonly state: string;
|
|
33
|
-
controller: <T_1>(controllerCtor:
|
|
34
|
-
server: <T_2 extends
|
|
35
|
-
servers: <T_3 extends
|
|
36
|
-
getServer: <T_4 extends
|
|
33
|
+
controller: <T_1>(controllerCtor: import("@loopback/core").ControllerClass<T_1>, nameOrOptions?: string | BindingFromClassOptions | undefined) => Binding<T_1>;
|
|
34
|
+
server: <T_2 extends import("@loopback/core").Server>(ctor: Constructor<T_2>, nameOrOptions?: string | BindingFromClassOptions | undefined) => Binding<T_2>;
|
|
35
|
+
servers: <T_3 extends import("@loopback/core").Server>(ctors: Constructor<T_3>[]) => Binding<any>[];
|
|
36
|
+
getServer: <T_4 extends import("@loopback/core").Server>(target: string | Constructor<T_4>) => Promise<T_4>;
|
|
37
37
|
init: () => Promise<void>;
|
|
38
|
-
onInit: (fn: () =>
|
|
38
|
+
onInit: (fn: () => import("@loopback/core").ValueOrPromise<void>) => Binding<import("@loopback/core").LifeCycleObserver>;
|
|
39
39
|
start: () => Promise<void>;
|
|
40
|
-
onStart: (fn: () =>
|
|
40
|
+
onStart: (fn: () => import("@loopback/core").ValueOrPromise<void>) => Binding<import("@loopback/core").LifeCycleObserver>;
|
|
41
41
|
stop: () => Promise<void>;
|
|
42
|
-
onStop: (fn: () =>
|
|
43
|
-
setMetadata: (metadata:
|
|
44
|
-
lifeCycleObserver: <T_5 extends
|
|
45
|
-
service: <S>(cls:
|
|
46
|
-
interceptor: (interceptor:
|
|
42
|
+
onStop: (fn: () => import("@loopback/core").ValueOrPromise<void>) => Binding<import("@loopback/core").LifeCycleObserver>;
|
|
43
|
+
setMetadata: (metadata: import("@loopback/core").ApplicationMetadata) => void;
|
|
44
|
+
lifeCycleObserver: <T_5 extends import("@loopback/core").LifeCycleObserver>(ctor: Constructor<T_5>, nameOrOptions?: string | BindingFromClassOptions | undefined) => Binding<T_5>;
|
|
45
|
+
service: <S>(cls: import("@loopback/core").ServiceOrProviderClass<S>, nameOrOptions?: string | import("@loopback/core").ServiceOptions | undefined) => Binding<S>;
|
|
46
|
+
interceptor: (interceptor: import("@loopback/core").Interceptor | Constructor<import("@loopback/core").Provider<import("@loopback/core").Interceptor>>, nameOrOptions?: string | import("@loopback/core").InterceptorBindingOptions | undefined) => Binding<import("@loopback/core").Interceptor>;
|
|
47
47
|
readonly name: string;
|
|
48
|
-
readonly subscriptionManager:
|
|
48
|
+
readonly subscriptionManager: import("@loopback/core").ContextSubscriptionManager;
|
|
49
49
|
scope: BindingScope;
|
|
50
|
-
readonly parent:
|
|
51
|
-
emitEvent: <T_6 extends
|
|
50
|
+
readonly parent: import("@loopback/core").Context | undefined;
|
|
51
|
+
emitEvent: <T_6 extends import("@loopback/core").ContextEvent>(type: string, event: T_6) => void;
|
|
52
52
|
emitError: (err: unknown) => void;
|
|
53
|
-
bind: <ValueType = any>(key:
|
|
53
|
+
bind: <ValueType = any>(key: import("@loopback/core").BindingAddress<ValueType>) => Binding<ValueType>;
|
|
54
54
|
add: (binding: Binding<unknown>) => Application;
|
|
55
|
-
configure: <ConfigValueType = any>(key?:
|
|
56
|
-
getConfigAsValueOrPromise: <ConfigValueType_1>(key:
|
|
57
|
-
getConfig: <ConfigValueType_2>(key:
|
|
58
|
-
getConfigSync: <ConfigValueType_3>(key:
|
|
59
|
-
unbind: (key:
|
|
60
|
-
subscribe: (observer:
|
|
61
|
-
unsubscribe: (observer:
|
|
55
|
+
configure: <ConfigValueType = any>(key?: import("@loopback/core").BindingAddress<unknown> | undefined) => Binding<ConfigValueType>;
|
|
56
|
+
getConfigAsValueOrPromise: <ConfigValueType_1>(key: import("@loopback/core").BindingAddress<unknown>, propertyPath?: string | undefined, resolutionOptions?: import("@loopback/core").ResolutionOptions | undefined) => import("@loopback/core").ValueOrPromise<ConfigValueType_1 | undefined>;
|
|
57
|
+
getConfig: <ConfigValueType_2>(key: import("@loopback/core").BindingAddress<unknown>, propertyPath?: string | undefined, resolutionOptions?: import("@loopback/core").ResolutionOptions | undefined) => Promise<ConfigValueType_2 | undefined>;
|
|
58
|
+
getConfigSync: <ConfigValueType_3>(key: import("@loopback/core").BindingAddress<unknown>, propertyPath?: string | undefined, resolutionOptions?: import("@loopback/core").ResolutionOptions | undefined) => ConfigValueType_3 | undefined;
|
|
59
|
+
unbind: (key: import("@loopback/core").BindingAddress<unknown>) => boolean;
|
|
60
|
+
subscribe: (observer: import("@loopback/core").ContextEventObserver) => import("@loopback/core").Subscription;
|
|
61
|
+
unsubscribe: (observer: import("@loopback/core").ContextEventObserver) => boolean;
|
|
62
62
|
close: () => void;
|
|
63
|
-
isSubscribed: (observer:
|
|
64
|
-
createView: <T_7 = unknown>(filter:
|
|
65
|
-
contains: (key:
|
|
66
|
-
isBound: (key:
|
|
67
|
-
getOwnerContext: (keyOrBinding:
|
|
68
|
-
getScopedContext: (scope: BindingScope.APPLICATION | BindingScope.SERVER | BindingScope.REQUEST) =>
|
|
69
|
-
getResolutionContext: (binding: Readonly<Binding<unknown>>) =>
|
|
70
|
-
isVisibleTo: (ctx:
|
|
71
|
-
find: <ValueType_1 = any>(pattern?: string | RegExp |
|
|
72
|
-
findByTag: <ValueType_2 = any>(tagFilter: RegExp |
|
|
63
|
+
isSubscribed: (observer: import("@loopback/core").ContextObserver) => boolean;
|
|
64
|
+
createView: <T_7 = unknown>(filter: import("@loopback/core").BindingFilter, comparator?: import("@loopback/core").BindingComparator | undefined, options?: Omit<import("@loopback/core").ResolutionOptions, "session"> | undefined) => import("@loopback/core").ContextView<T_7>;
|
|
65
|
+
contains: (key: import("@loopback/core").BindingAddress<unknown>) => boolean;
|
|
66
|
+
isBound: (key: import("@loopback/core").BindingAddress<unknown>) => boolean;
|
|
67
|
+
getOwnerContext: (keyOrBinding: import("@loopback/core").BindingAddress<unknown> | Readonly<Binding<unknown>>) => import("@loopback/core").Context | undefined;
|
|
68
|
+
getScopedContext: (scope: BindingScope.APPLICATION | BindingScope.SERVER | BindingScope.REQUEST) => import("@loopback/core").Context | undefined;
|
|
69
|
+
getResolutionContext: (binding: Readonly<Binding<unknown>>) => import("@loopback/core").Context | undefined;
|
|
70
|
+
isVisibleTo: (ctx: import("@loopback/core").Context) => boolean;
|
|
71
|
+
find: <ValueType_1 = any>(pattern?: string | RegExp | import("@loopback/core").BindingFilter | undefined) => Readonly<Binding<ValueType_1>>[];
|
|
72
|
+
findByTag: <ValueType_2 = any>(tagFilter: RegExp | import("@loopback/core").BindingTag) => Readonly<Binding<ValueType_2>>[];
|
|
73
73
|
get: {
|
|
74
|
-
<ValueType_3>(keyWithPath:
|
|
75
|
-
<ValueType_4>(keyWithPath:
|
|
74
|
+
<ValueType_3>(keyWithPath: import("@loopback/core").BindingAddress<ValueType_3>, session?: import("@loopback/core").ResolutionSession | undefined): Promise<ValueType_3>;
|
|
75
|
+
<ValueType_4>(keyWithPath: import("@loopback/core").BindingAddress<ValueType_4>, options: import("@loopback/core").ResolutionOptions): Promise<ValueType_4 | undefined>;
|
|
76
76
|
};
|
|
77
77
|
getSync: {
|
|
78
|
-
<ValueType_5>(keyWithPath:
|
|
79
|
-
<ValueType_6>(keyWithPath:
|
|
78
|
+
<ValueType_5>(keyWithPath: import("@loopback/core").BindingAddress<ValueType_5>, session?: import("@loopback/core").ResolutionSession | undefined): ValueType_5;
|
|
79
|
+
<ValueType_6>(keyWithPath: import("@loopback/core").BindingAddress<ValueType_6>, options?: import("@loopback/core").ResolutionOptions | undefined): ValueType_6 | undefined;
|
|
80
80
|
};
|
|
81
81
|
getBinding: {
|
|
82
|
-
<ValueType_7 = any>(key:
|
|
83
|
-
<ValueType_8>(key:
|
|
82
|
+
<ValueType_7 = any>(key: import("@loopback/core").BindingAddress<ValueType_7>): Binding<ValueType_7>;
|
|
83
|
+
<ValueType_8>(key: import("@loopback/core").BindingAddress<ValueType_8>, options?: {
|
|
84
84
|
optional?: boolean | undefined;
|
|
85
85
|
} | undefined): Binding<ValueType_8> | undefined;
|
|
86
86
|
};
|
|
87
|
-
findOrCreateBinding: <T_8>(key:
|
|
88
|
-
getValueOrPromise: <ValueType_9>(keyWithPath:
|
|
89
|
-
toJSON: () =>
|
|
90
|
-
inspect: (options?:
|
|
87
|
+
findOrCreateBinding: <T_8>(key: import("@loopback/core").BindingAddress<T_8>, policy?: import("@loopback/core").BindingCreationPolicy | undefined) => Binding<T_8>;
|
|
88
|
+
getValueOrPromise: <ValueType_9>(keyWithPath: import("@loopback/core").BindingAddress<ValueType_9>, optionsOrSession?: import("@loopback/core").ResolutionOptionsOrSession | undefined) => import("@loopback/core").ValueOrPromise<ValueType_9 | undefined>;
|
|
89
|
+
toJSON: () => import("@loopback/core").JSONObject;
|
|
90
|
+
inspect: (options?: import("@loopback/core").ContextInspectOptions | undefined) => import("@loopback/core").JSONObject;
|
|
91
91
|
on: {
|
|
92
|
-
(eventName: "bind" | "unbind", listener:
|
|
92
|
+
(eventName: "bind" | "unbind", listener: import("@loopback/core").ContextEventListener): Application;
|
|
93
93
|
(event: string | symbol, listener: (...args: any[]) => void): Application;
|
|
94
94
|
};
|
|
95
95
|
once: {
|
|
96
|
-
(eventName: "bind" | "unbind", listener:
|
|
96
|
+
(eventName: "bind" | "unbind", listener: import("@loopback/core").ContextEventListener): Application;
|
|
97
97
|
(event: string | symbol, listener: (...args: any[]) => void): Application;
|
|
98
98
|
};
|
|
99
99
|
addListener: (event: string | symbol, listener: (...args: any[]) => void) => Application;
|
|
@@ -105,7 +105,7 @@ export declare function RepositoryMixin<T extends MixinTarget<Application>>(supe
|
|
|
105
105
|
listeners: (event: string | symbol) => Function[];
|
|
106
106
|
rawListeners: (event: string | symbol) => Function[];
|
|
107
107
|
emit: (event: string | symbol, ...args: any[]) => boolean;
|
|
108
|
-
listenerCount: (
|
|
108
|
+
listenerCount: (event: string | symbol) => number;
|
|
109
109
|
prependListener: (event: string | symbol, listener: (...args: any[]) => void) => Application;
|
|
110
110
|
prependOnceListener: (event: string | symbol, listener: (...args: any[]) => void) => Application;
|
|
111
111
|
eventNames: () => (string | symbol)[];
|
|
@@ -121,7 +121,7 @@ export declare function RepositoryMixin<T extends MixinTarget<Application>>(supe
|
|
|
121
121
|
|
|
122
122
|
<b>Returns:</b>
|
|
123
123
|
|
|
124
|
-
{ new (...args: any\[\]): { repository<R extends [Repository](./repository.repository.md)<!-- --><any>>(repoClass: [Class](./repository.class.md)<!-- --><R>, nameOrOptions?: string \| [BindingFromClassOptions](./context.bindingfromclassoptions.md) \| undefined): [Binding](./context.binding.md)<!-- --><R>; getRepository<R\_1 extends [Repository](./repository.repository.md)<!-- --><any>>(repo: [Class](./repository.class.md)<!-- --><R\_1>): Promise<R\_1>; dataSource<D extends juggler.DataSource>(dataSource: D \| [Class](./repository.class.md)<!-- --><D>, nameOrOptions?: string \| [BindingFromClassOptions](./context.bindingfromclassoptions.md) \| undefined): [Binding](./context.binding.md)<!-- --><D>; model<M extends [Class](./repository.class.md)<!-- --><unknown>>(modelClass: M): [Binding](./context.binding.md)<!-- --><M>; component<C extends [Component](./core.component.md) = [Component](./core.component.md)<!-- -->>(componentCtor: [Constructor](./context.constructor.md)<!-- --><C>, nameOrOptions?: string \| [BindingFromClassOptions](./context.bindingfromclassoptions.md) \| undefined): [Binding](./context.binding.md)<!-- --><C>; mountComponentRepositories(componentInstanceOrClass: [Class](./repository.class.md)<!-- --><unknown> \| [RepositoryComponent](./repository.repositorycomponent.md)<!-- -->): void; mountComponentModels(component: [RepositoryComponent](./repository.repositorycomponent.md)<!-- -->): void; migrateSchema(options?: [SchemaMigrationOptions](./repository.schemamigrationoptions.md)<!-- -->): Promise<void>; readonly options: loopbackContext.[ApplicationConfig](./core.applicationconfig.md)<!-- -->; readonly state: string; controller: <T\_1>(controllerCtor: loopbackContext.[ControllerClass](./core.controllerclass.md)<!-- --><T\_1>, nameOrOptions?: string \| [BindingFromClassOptions](./context.bindingfromclassoptions.md) \| undefined) => [Binding](./context.binding.md)<!-- --><T\_1>; server: <T\_2 extends loopbackContext.[Server](./core.server.md)<!-- -->>(ctor: [Constructor](./context.constructor.md)<!-- --><T\_2>, nameOrOptions?: string \| [BindingFromClassOptions](./context.bindingfromclassoptions.md) \| undefined) => [Binding](./context.binding.md)<!-- --><T\_2>; servers: <T\_3 extends loopbackContext.[Server](./core.server.md)<!-- -->>(ctors: [Constructor](./context.constructor.md)<!-- --><T\_3>\[\]) => [Binding](./context.binding.md)<!-- --><any>\[\]; getServer: <T\_4 extends loopbackContext.[Server](./core.server.md)<!-- -->>(target: string \| [Constructor](./context.constructor.md)<!-- --><T\_4>) => Promise<T\_4>; init: () => Promise<void>; onInit: (fn: () => loopbackContext.[ValueOrPromise](./context.valueorpromise.md)<!-- --><void>) => [Binding](./context.binding.md)<!-- --><loopbackContext.[LifeCycleObserver](./core.lifecycleobserver.md)<!-- -->>; start: () => Promise<void>; onStart: (fn: () => loopbackContext.[ValueOrPromise](./context.valueorpromise.md)<!-- --><void>) => [Binding](./context.binding.md)<!-- --><loopbackContext.[LifeCycleObserver](./core.lifecycleobserver.md)<!-- -->>; stop: () => Promise<void>; onStop: (fn: () => loopbackContext.[ValueOrPromise](./context.valueorpromise.md)<!-- --><void>) => [Binding](./context.binding.md)<!-- --><loopbackContext.[LifeCycleObserver](./core.lifecycleobserver.md)<!-- -->>; setMetadata: (metadata: loopbackContext.[ApplicationMetadata](./core.applicationmetadata.md)<!-- -->) => void; lifeCycleObserver: <T\_5 extends loopbackContext.[LifeCycleObserver](./core.lifecycleobserver.md)<!-- -->>(ctor: [Constructor](./context.constructor.md)<!-- --><T\_5>, nameOrOptions?: string \| [BindingFromClassOptions](./context.bindingfromclassoptions.md) \| undefined) => [Binding](./context.binding.md)<!-- --><T\_5>; service: <S>(cls: loopbackContext.[ServiceOrProviderClass](./core.serviceorproviderclass.md)<!-- --><S>, nameOrOptions?: string \| loopbackContext.[ServiceOptions](./core.serviceoptions.md) \| undefined) => [Binding](./context.binding.md)<!-- --><S>; interceptor: (interceptor: loopbackContext.[Interceptor](./context.interceptor.md) \| [Constructor](./context.constructor.md)<!-- --><loopbackContext.[Provider](./context.provider.md)<!-- --><loopbackContext.[Interceptor](./context.interceptor.md)<!-- -->>>, nameOrOptions?: string \| loopbackContext.[InterceptorBindingOptions](./context.interceptorbindingoptions.md) \| undefined) => [Binding](./context.binding.md)<!-- --><loopbackContext.[Interceptor](./context.interceptor.md)<!-- -->>; readonly name: string; readonly subscriptionManager: loopbackContext.[ContextSubscriptionManager](./context.contextsubscriptionmanager.md)<!-- -->; scope: [BindingScope](./context.bindingscope.md)<!-- -->; readonly parent: loopbackContext.[Context](./context.context.md) \| undefined; emitEvent: <T\_6 extends loopbackContext.[ContextEvent](./context.contextevent.md)<!-- -->>(type: string, event: T\_6) => void; emitError: (err: unknown) => void; bind: <ValueType = any>(key: loopbackContext.[BindingAddress](./context.bindingaddress.md)<!-- --><ValueType>) => [Binding](./context.binding.md)<!-- --><ValueType>; add: (binding: [Binding](./context.binding.md)<!-- --><unknown>) => [Application](./core.application.md)<!-- -->; configure: <ConfigValueType = any>(key?: loopbackContext.[BindingAddress](./context.bindingaddress.md)<!-- --><unknown> \| undefined) => [Binding](./context.binding.md)<!-- --><ConfigValueType>; getConfigAsValueOrPromise: <ConfigValueType\_1>(key: loopbackContext.[BindingAddress](./context.bindingaddress.md)<!-- --><unknown>, propertyPath?: string \| undefined, resolutionOptions?: loopbackContext.[ResolutionOptions](./context.resolutionoptions.md) \| undefined) => loopbackContext.[ValueOrPromise](./context.valueorpromise.md)<!-- --><ConfigValueType\_1 \| undefined>; getConfig: <ConfigValueType\_2>(key: loopbackContext.[BindingAddress](./context.bindingaddress.md)<!-- --><unknown>, propertyPath?: string \| undefined, resolutionOptions?: loopbackContext.[ResolutionOptions](./context.resolutionoptions.md) \| undefined) => Promise<ConfigValueType\_2 \| undefined>; getConfigSync: <ConfigValueType\_3>(key: loopbackContext.[BindingAddress](./context.bindingaddress.md)<!-- --><unknown>, propertyPath?: string \| undefined, resolutionOptions?: loopbackContext.[ResolutionOptions](./context.resolutionoptions.md) \| undefined) => ConfigValueType\_3 \| undefined; unbind: (key: loopbackContext.[BindingAddress](./context.bindingaddress.md)<!-- --><unknown>) => boolean; subscribe: (observer: loopbackContext.[ContextEventObserver](./context.contexteventobserver.md)<!-- -->) => loopbackContext.[Subscription](./context.subscription.md)<!-- -->; unsubscribe: (observer: loopbackContext.[ContextEventObserver](./context.contexteventobserver.md)<!-- -->) => boolean; close: () => void; isSubscribed: (observer: loopbackContext.[ContextObserver](./context.contextobserver.md)<!-- -->) => boolean; createView: <T\_7 = unknown>(filter: loopbackContext.[BindingFilter](./context.bindingfilter.md)<!-- -->, comparator?: loopbackContext.[BindingComparator](./context.bindingcomparator.md) \| undefined, options?: Omit<loopbackContext.[ResolutionOptions](./context.resolutionoptions.md)<!-- -->, "session"> \| undefined) => loopbackContext.[ContextView](./context.contextview.md)<!-- --><T\_7>; contains: (key: loopbackContext.[BindingAddress](./context.bindingaddress.md)<!-- --><unknown>) => boolean; isBound: (key: loopbackContext.[BindingAddress](./context.bindingaddress.md)<!-- --><unknown>) => boolean; getOwnerContext: (keyOrBinding: loopbackContext.[BindingAddress](./context.bindingaddress.md)<!-- --><unknown> \| Readonly<[Binding](./context.binding.md)<!-- --><unknown>>) => loopbackContext.[Context](./context.context.md) \| undefined; getScopedContext: (scope: [BindingScope.APPLICATION](./context.bindingscope.md) \| [BindingScope.SERVER](./context.bindingscope.md) \| [BindingScope.REQUEST](./context.bindingscope.md)<!-- -->) => loopbackContext.[Context](./context.context.md) \| undefined; getResolutionContext: (binding: Readonly<[Binding](./context.binding.md)<!-- --><unknown>>) => loopbackContext.[Context](./context.context.md) \| undefined; isVisibleTo: (ctx: loopbackContext.[Context](./context.context.md)<!-- -->) => boolean; find: <ValueType\_1 = any>(pattern?: string \| RegExp \| loopbackContext.[BindingFilter](./context.bindingfilter.md) \| undefined) => Readonly<[Binding](./context.binding.md)<!-- --><ValueType\_1>>\[\]; findByTag: <ValueType\_2 = any>(tagFilter: RegExp \| loopbackContext.[BindingTag](./context.bindingtag.md)<!-- -->) => Readonly<[Binding](./context.binding.md)<!-- --><ValueType\_2>>\[\]; get: { <ValueType\_3>(keyWithPath: loopbackContext.[BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_3>, session?: loopbackContext.[ResolutionSession](./context.resolutionsession.md) \| undefined): Promise<ValueType\_3>; <ValueType\_4>(keyWithPath: loopbackContext.[BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_4>, options: loopbackContext.[ResolutionOptions](./context.resolutionoptions.md)<!-- -->): Promise<ValueType\_4 \| undefined>; }; getSync: { <ValueType\_5>(keyWithPath: loopbackContext.[BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_5>, session?: loopbackContext.[ResolutionSession](./context.resolutionsession.md) \| undefined): ValueType\_5; <ValueType\_6>(keyWithPath: loopbackContext.[BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_6>, options?: loopbackContext.[ResolutionOptions](./context.resolutionoptions.md) \| undefined): ValueType\_6 \| undefined; }; getBinding: { <ValueType\_7 = any>(key: loopbackContext.[BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_7>): [Binding](./context.binding.md)<!-- --><ValueType\_7>; <ValueType\_8>(key: loopbackContext.[BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_8>, options?: { optional?: boolean \| undefined; } \| undefined): [Binding](./context.binding.md)<!-- --><ValueType\_8> \| undefined; }; findOrCreateBinding: <T\_8>(key: loopbackContext.[BindingAddress](./context.bindingaddress.md)<!-- --><T\_8>, policy?: loopbackContext.[BindingCreationPolicy](./context.bindingcreationpolicy.md) \| undefined) => [Binding](./context.binding.md)<!-- --><T\_8>; getValueOrPromise: <ValueType\_9>(keyWithPath: loopbackContext.[BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_9>, optionsOrSession?: loopbackContext.[ResolutionOptionsOrSession](./context.resolutionoptionsorsession.md) \| undefined) => loopbackContext.[ValueOrPromise](./context.valueorpromise.md)<!-- --><ValueType\_9 \| undefined>; toJSON: () => loopbackContext.[JSONObject](./context.jsonobject.md)<!-- -->; inspect: (options?: loopbackContext.[ContextInspectOptions](./context.contextinspectoptions.md) \| undefined) => loopbackContext.[JSONObject](./context.jsonobject.md)<!-- -->; on: { (eventName: "bind" \| "unbind", listener: loopbackContext.[ContextEventListener](./context.contexteventlistener.md)<!-- -->): [Application](./core.application.md)<!-- -->; (event: string \| symbol, listener: (...args: any\[\]) => void): [Application](./core.application.md)<!-- -->; }; once: { (eventName: "bind" \| "unbind", listener: loopbackContext.[ContextEventListener](./context.contexteventlistener.md)<!-- -->): [Application](./core.application.md)<!-- -->; (event: string \| symbol, listener: (...args: any\[\]) => void): [Application](./core.application.md)<!-- -->; }; addListener: (event: string \| symbol, listener: (...args: any\[\]) => void) => [Application](./core.application.md)<!-- -->; removeListener: (event: string \| symbol, listener: (...args: any\[\]) => void) => [Application](./core.application.md)<!-- -->; off: (event: string \| symbol, listener: (...args: any\[\]) => void) => [Application](./core.application.md)<!-- -->; removeAllListeners: (event?: string \| symbol \| undefined) => [Application](./core.application.md)<!-- -->; setMaxListeners: (n: number) => [Application](./core.application.md)<!-- -->; getMaxListeners: () => number; listeners: (event: string \| symbol) => Function\[\]; rawListeners: (event: string \| symbol) => Function\[\]; emit: (event: string \| symbol, ...args: any\[\]) => boolean; listenerCount: (type: string \| symbol) => number; prependListener: (event: string \| symbol, listener: (...args: any\[\]) => void) => [Application](./core.application.md)<!-- -->; prependOnceListener: (event: string \| symbol, listener: (...args: any\[\]) => void) => [Application](./core.application.md)<!-- -->; eventNames: () => (string \| symbol)\[\]; }; } & T
|
|
124
|
+
{ new (...args: any\[\]): { repository<R extends [Repository](./repository.repository.md)<!-- --><any>>(repoClass: [Class](./repository.class.md)<!-- --><R>, nameOrOptions?: string \| [BindingFromClassOptions](./context.bindingfromclassoptions.md)<!-- -->): [Binding](./context.binding.md)<!-- --><R>; getRepository<R\_1 extends [Repository](./repository.repository.md)<!-- --><any>>(repo: [Class](./repository.class.md)<!-- --><R\_1>): Promise<R\_1>; dataSource<D extends juggler.DataSource>(dataSource: D \| [Class](./repository.class.md)<!-- --><D>, nameOrOptions?: string \| [BindingFromClassOptions](./context.bindingfromclassoptions.md)<!-- -->): [Binding](./context.binding.md)<!-- --><D>; model<M extends [Class](./repository.class.md)<!-- --><unknown>>(modelClass: M): [Binding](./context.binding.md)<!-- --><M>; component<C extends [Component](./core.component.md) = [Component](./core.component.md)<!-- -->>(componentCtor: [Constructor](./context.constructor.md)<!-- --><C>, nameOrOptions?: string \| [BindingFromClassOptions](./context.bindingfromclassoptions.md)<!-- -->): [Binding](./context.binding.md)<!-- --><C>; mountComponentRepositories(componentInstanceOrClass: [Class](./repository.class.md)<!-- --><unknown> \| [RepositoryComponent](./repository.repositorycomponent.md)<!-- -->): void; mountComponentModels(component: [RepositoryComponent](./repository.repositorycomponent.md)<!-- -->): void; migrateSchema(options?: [SchemaMigrationOptions](./repository.schemamigrationoptions.md)<!-- -->): Promise<void>; readonly options: import("@loopback/core").[ApplicationConfig](./core.applicationconfig.md)<!-- -->; readonly state: string; controller: <T\_1>(controllerCtor: import("@loopback/core").[ControllerClass](./core.controllerclass.md)<!-- --><T\_1>, nameOrOptions?: string \| [BindingFromClassOptions](./context.bindingfromclassoptions.md) \| undefined) => [Binding](./context.binding.md)<!-- --><T\_1>; server: <T\_2 extends import("@loopback/core").[Server](./core.server.md)<!-- -->>(ctor: [Constructor](./context.constructor.md)<!-- --><T\_2>, nameOrOptions?: string \| [BindingFromClassOptions](./context.bindingfromclassoptions.md) \| undefined) => [Binding](./context.binding.md)<!-- --><T\_2>; servers: <T\_3 extends import("@loopback/core").[Server](./core.server.md)<!-- -->>(ctors: [Constructor](./context.constructor.md)<!-- --><T\_3>\[\]) => [Binding](./context.binding.md)<!-- --><any>\[\]; getServer: <T\_4 extends import("@loopback/core").[Server](./core.server.md)<!-- -->>(target: string \| [Constructor](./context.constructor.md)<!-- --><T\_4>) => Promise<T\_4>; init: () => Promise<void>; onInit: (fn: () => import("@loopback/core").[ValueOrPromise](./context.valueorpromise.md)<!-- --><void>) => [Binding](./context.binding.md)<!-- --><import("@loopback/core").[LifeCycleObserver](./core.lifecycleobserver.md)<!-- -->>; start: () => Promise<void>; onStart: (fn: () => import("@loopback/core").[ValueOrPromise](./context.valueorpromise.md)<!-- --><void>) => [Binding](./context.binding.md)<!-- --><import("@loopback/core").[LifeCycleObserver](./core.lifecycleobserver.md)<!-- -->>; stop: () => Promise<void>; onStop: (fn: () => import("@loopback/core").[ValueOrPromise](./context.valueorpromise.md)<!-- --><void>) => [Binding](./context.binding.md)<!-- --><import("@loopback/core").[LifeCycleObserver](./core.lifecycleobserver.md)<!-- -->>; setMetadata: (metadata: import("@loopback/core").[ApplicationMetadata](./core.applicationmetadata.md)<!-- -->) => void; lifeCycleObserver: <T\_5 extends import("@loopback/core").[LifeCycleObserver](./core.lifecycleobserver.md)<!-- -->>(ctor: [Constructor](./context.constructor.md)<!-- --><T\_5>, nameOrOptions?: string \| [BindingFromClassOptions](./context.bindingfromclassoptions.md) \| undefined) => [Binding](./context.binding.md)<!-- --><T\_5>; service: <S>(cls: import("@loopback/core").[ServiceOrProviderClass](./core.serviceorproviderclass.md)<!-- --><S>, nameOrOptions?: string \| import("@loopback/core").[ServiceOptions](./core.serviceoptions.md) \| undefined) => [Binding](./context.binding.md)<!-- --><S>; interceptor: (interceptor: import("@loopback/core").[Interceptor](./context.interceptor.md) \| [Constructor](./context.constructor.md)<!-- --><import("@loopback/core").[Provider](./context.provider.md)<!-- --><import("@loopback/core").[Interceptor](./context.interceptor.md)<!-- -->>>, nameOrOptions?: string \| import("@loopback/core").[InterceptorBindingOptions](./context.interceptorbindingoptions.md) \| undefined) => [Binding](./context.binding.md)<!-- --><import("@loopback/core").[Interceptor](./context.interceptor.md)<!-- -->>; readonly name: string; readonly subscriptionManager: import("@loopback/core").[ContextSubscriptionManager](./context.contextsubscriptionmanager.md)<!-- -->; scope: [BindingScope](./context.bindingscope.md)<!-- -->; readonly parent: import("@loopback/core").[Context](./context.context.md) \| undefined; emitEvent: <T\_6 extends import("@loopback/core").[ContextEvent](./context.contextevent.md)<!-- -->>(type: string, event: T\_6) => void; emitError: (err: unknown) => void; bind: <ValueType = any>(key: import("@loopback/core").[BindingAddress](./context.bindingaddress.md)<!-- --><ValueType>) => [Binding](./context.binding.md)<!-- --><ValueType>; add: (binding: [Binding](./context.binding.md)<!-- --><unknown>) => [Application](./core.application.md)<!-- -->; configure: <ConfigValueType = any>(key?: import("@loopback/core").[BindingAddress](./context.bindingaddress.md)<!-- --><unknown> \| undefined) => [Binding](./context.binding.md)<!-- --><ConfigValueType>; getConfigAsValueOrPromise: <ConfigValueType\_1>(key: import("@loopback/core").[BindingAddress](./context.bindingaddress.md)<!-- --><unknown>, propertyPath?: string \| undefined, resolutionOptions?: import("@loopback/core").[ResolutionOptions](./context.resolutionoptions.md) \| undefined) => import("@loopback/core").[ValueOrPromise](./context.valueorpromise.md)<!-- --><ConfigValueType\_1 \| undefined>; getConfig: <ConfigValueType\_2>(key: import("@loopback/core").[BindingAddress](./context.bindingaddress.md)<!-- --><unknown>, propertyPath?: string \| undefined, resolutionOptions?: import("@loopback/core").[ResolutionOptions](./context.resolutionoptions.md) \| undefined) => Promise<ConfigValueType\_2 \| undefined>; getConfigSync: <ConfigValueType\_3>(key: import("@loopback/core").[BindingAddress](./context.bindingaddress.md)<!-- --><unknown>, propertyPath?: string \| undefined, resolutionOptions?: import("@loopback/core").[ResolutionOptions](./context.resolutionoptions.md) \| undefined) => ConfigValueType\_3 \| undefined; unbind: (key: import("@loopback/core").[BindingAddress](./context.bindingaddress.md)<!-- --><unknown>) => boolean; subscribe: (observer: import("@loopback/core").[ContextEventObserver](./context.contexteventobserver.md)<!-- -->) => import("@loopback/core").[Subscription](./context.subscription.md)<!-- -->; unsubscribe: (observer: import("@loopback/core").[ContextEventObserver](./context.contexteventobserver.md)<!-- -->) => boolean; close: () => void; isSubscribed: (observer: import("@loopback/core").[ContextObserver](./context.contextobserver.md)<!-- -->) => boolean; createView: <T\_7 = unknown>(filter: import("@loopback/core").[BindingFilter](./context.bindingfilter.md)<!-- -->, comparator?: import("@loopback/core").[BindingComparator](./context.bindingcomparator.md) \| undefined, options?: Omit<import("@loopback/core").[ResolutionOptions](./context.resolutionoptions.md)<!-- -->, "session"> \| undefined) => import("@loopback/core").[ContextView](./context.contextview.md)<!-- --><T\_7>; contains: (key: import("@loopback/core").[BindingAddress](./context.bindingaddress.md)<!-- --><unknown>) => boolean; isBound: (key: import("@loopback/core").[BindingAddress](./context.bindingaddress.md)<!-- --><unknown>) => boolean; getOwnerContext: (keyOrBinding: import("@loopback/core").[BindingAddress](./context.bindingaddress.md)<!-- --><unknown> \| Readonly<[Binding](./context.binding.md)<!-- --><unknown>>) => import("@loopback/core").[Context](./context.context.md) \| undefined; getScopedContext: (scope: [BindingScope.APPLICATION](./context.bindingscope.md) \| [BindingScope.SERVER](./context.bindingscope.md) \| [BindingScope.REQUEST](./context.bindingscope.md)<!-- -->) => import("@loopback/core").[Context](./context.context.md) \| undefined; getResolutionContext: (binding: Readonly<[Binding](./context.binding.md)<!-- --><unknown>>) => import("@loopback/core").[Context](./context.context.md) \| undefined; isVisibleTo: (ctx: import("@loopback/core").[Context](./context.context.md)<!-- -->) => boolean; find: <ValueType\_1 = any>(pattern?: string \| RegExp \| import("@loopback/core").[BindingFilter](./context.bindingfilter.md) \| undefined) => Readonly<[Binding](./context.binding.md)<!-- --><ValueType\_1>>\[\]; findByTag: <ValueType\_2 = any>(tagFilter: RegExp \| import("@loopback/core").[BindingTag](./context.bindingtag.md)<!-- -->) => Readonly<[Binding](./context.binding.md)<!-- --><ValueType\_2>>\[\]; get: { <ValueType\_3>(keyWithPath: import("@loopback/core").[BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_3>, session?: import("@loopback/core").[ResolutionSession](./context.resolutionsession.md) \| undefined): Promise<ValueType\_3>; <ValueType\_4>(keyWithPath: import("@loopback/core").[BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_4>, options: import("@loopback/core").[ResolutionOptions](./context.resolutionoptions.md)<!-- -->): Promise<ValueType\_4 \| undefined>; }; getSync: { <ValueType\_5>(keyWithPath: import("@loopback/core").[BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_5>, session?: import("@loopback/core").[ResolutionSession](./context.resolutionsession.md) \| undefined): ValueType\_5; <ValueType\_6>(keyWithPath: import("@loopback/core").[BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_6>, options?: import("@loopback/core").[ResolutionOptions](./context.resolutionoptions.md) \| undefined): ValueType\_6 \| undefined; }; getBinding: { <ValueType\_7 = any>(key: import("@loopback/core").[BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_7>): [Binding](./context.binding.md)<!-- --><ValueType\_7>; <ValueType\_8>(key: import("@loopback/core").[BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_8>, options?: { optional?: boolean \| undefined; } \| undefined): [Binding](./context.binding.md)<!-- --><ValueType\_8> \| undefined; }; findOrCreateBinding: <T\_8>(key: import("@loopback/core").[BindingAddress](./context.bindingaddress.md)<!-- --><T\_8>, policy?: import("@loopback/core").[BindingCreationPolicy](./context.bindingcreationpolicy.md) \| undefined) => [Binding](./context.binding.md)<!-- --><T\_8>; getValueOrPromise: <ValueType\_9>(keyWithPath: import("@loopback/core").[BindingAddress](./context.bindingaddress.md)<!-- --><ValueType\_9>, optionsOrSession?: import("@loopback/core").[ResolutionOptionsOrSession](./context.resolutionoptionsorsession.md) \| undefined) => import("@loopback/core").[ValueOrPromise](./context.valueorpromise.md)<!-- --><ValueType\_9 \| undefined>; toJSON: () => import("@loopback/core").[JSONObject](./context.jsonobject.md)<!-- -->; inspect: (options?: import("@loopback/core").[ContextInspectOptions](./context.contextinspectoptions.md) \| undefined) => import("@loopback/core").[JSONObject](./context.jsonobject.md)<!-- -->; on: { (eventName: "bind" \| "unbind", listener: import("@loopback/core").[ContextEventListener](./context.contexteventlistener.md)<!-- -->): [Application](./core.application.md)<!-- -->; (event: string \| symbol, listener: (...args: any\[\]) => void): [Application](./core.application.md)<!-- -->; }; once: { (eventName: "bind" \| "unbind", listener: import("@loopback/core").[ContextEventListener](./context.contexteventlistener.md)<!-- -->): [Application](./core.application.md)<!-- -->; (event: string \| symbol, listener: (...args: any\[\]) => void): [Application](./core.application.md)<!-- -->; }; addListener: (event: string \| symbol, listener: (...args: any\[\]) => void) => [Application](./core.application.md)<!-- -->; removeListener: (event: string \| symbol, listener: (...args: any\[\]) => void) => [Application](./core.application.md)<!-- -->; off: (event: string \| symbol, listener: (...args: any\[\]) => void) => [Application](./core.application.md)<!-- -->; removeAllListeners: (event?: string \| symbol \| undefined) => [Application](./core.application.md)<!-- -->; setMaxListeners: (n: number) => [Application](./core.application.md)<!-- -->; getMaxListeners: () => number; listeners: (event: string \| symbol) => Function\[\]; rawListeners: (event: string \| symbol) => Function\[\]; emit: (event: string \| symbol, ...args: any\[\]) => boolean; listenerCount: (event: string \| symbol) => number; prependListener: (event: string \| symbol, listener: (...args: any\[\]) => void) => [Application](./core.application.md)<!-- -->; prependOnceListener: (event: string \| symbol, listener: (...args: any\[\]) => void) => [Application](./core.application.md)<!-- -->; eventNames: () => (string \| symbol)\[\]; }; } & T
|
|
125
125
|
|
|
126
126
|
A new class that extends the super class with repository related methods
|
|
127
127
|
|
package/site/apidocs/{rest-crud.crudrestcontroller.create.md → rest-crud.crudrestcontroller.find.md}
RENAMED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
---
|
|
2
2
|
lang: en
|
|
3
|
-
title: 'API docs: rest-crud.crudrestcontroller.
|
|
3
|
+
title: 'API docs: rest-crud.crudrestcontroller.find'
|
|
4
4
|
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
|
|
5
5
|
sidebar: lb4_sidebar
|
|
6
6
|
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/rest-crud
|
|
7
|
-
permalink: /doc/en/lb4/apidocs.rest-crud.crudrestcontroller.
|
|
7
|
+
permalink: /doc/en/lb4/apidocs.rest-crud.crudrestcontroller.find.html
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
11
11
|
|
|
12
|
-
[Home](./index.md) > [@loopback/rest-crud](./rest-crud.md) > [CrudRestController](./rest-crud.crudrestcontroller.md) > [
|
|
12
|
+
[Home](./index.md) > [@loopback/rest-crud](./rest-crud.md) > [CrudRestController](./rest-crud.crudrestcontroller.md) > [find](./rest-crud.crudrestcontroller.find.md)
|
|
13
13
|
|
|
14
|
-
## CrudRestController.
|
|
14
|
+
## CrudRestController.find() method
|
|
15
15
|
|
|
16
|
-
Implementation of the endpoint `
|
|
16
|
+
Implementation of the endpoint `GET /`<!-- -->.
|
|
17
17
|
|
|
18
18
|
<b>Signature:</b>
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
|
-
|
|
21
|
+
find(filter?: Filter<T>): Promise<(T & Relations)[]>;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Parameters
|
|
25
25
|
|
|
26
26
|
| Parameter | Type | Description |
|
|
27
27
|
| --- | --- | --- |
|
|
28
|
-
|
|
|
28
|
+
| filter | [Filter](./filter.filter.md)<!-- --><T> | <i>(Optional)</i> Filter |
|
|
29
29
|
|
|
30
30
|
<b>Returns:</b>
|
|
31
31
|
|
|
32
|
-
Promise<T>
|
|
32
|
+
Promise<(T & Relations)\[\]>
|
|
33
33
|
|
|
34
34
|
|
|
@@ -31,6 +31,6 @@ export interface CrudRestController<T extends Entity, IdType, IdName extends key
|
|
|
31
31
|
|
|
32
32
|
| Method | Description |
|
|
33
33
|
| --- | --- |
|
|
34
|
-
| [
|
|
34
|
+
| [find(filter)](./rest-crud.crudrestcontroller.find.md) | Implementation of the endpoint <code>GET /</code>. |
|
|
35
35
|
|
|
36
36
|
|
|
@@ -26,5 +26,6 @@ export interface CrudRestControllerOptions
|
|
|
26
26
|
| Property | Type | Description |
|
|
27
27
|
| --- | --- | --- |
|
|
28
28
|
| [basePath](./rest-crud.crudrestcontrolleroptions.basepath.md) | string | The base path where to "mount" the controller. |
|
|
29
|
+
| [readonly?](./rest-crud.crudrestcontrolleroptions.readonly.md) | boolean | <i>(Optional)</i> Whether to generate readonly APIs |
|
|
29
30
|
|
|
30
31
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
lang: en
|
|
3
|
+
title: 'API docs: rest-crud.crudrestcontrolleroptions.readonly'
|
|
4
|
+
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
|
|
5
|
+
sidebar: lb4_sidebar
|
|
6
|
+
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/rest-crud
|
|
7
|
+
permalink: /doc/en/lb4/apidocs.rest-crud.crudrestcontrolleroptions.readonly.html
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
11
|
+
|
|
12
|
+
[Home](./index.md) > [@loopback/rest-crud](./rest-crud.md) > [CrudRestControllerOptions](./rest-crud.crudrestcontrolleroptions.md) > [readonly](./rest-crud.crudrestcontrolleroptions.readonly.md)
|
|
13
|
+
|
|
14
|
+
## CrudRestControllerOptions.readonly property
|
|
15
|
+
|
|
16
|
+
Whether to generate readonly APIs
|
|
17
|
+
|
|
18
|
+
<b>Signature:</b>
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
readonly?: boolean;
|
|
22
|
+
```
|
|
23
|
+
|
|
@@ -25,5 +25,6 @@ export interface ModelCrudRestApiConfig extends ModelApiConfig
|
|
|
25
25
|
| Property | Type | Description |
|
|
26
26
|
| --- | --- | --- |
|
|
27
27
|
| [basePath](./rest-crud.modelcrudrestapiconfig.basepath.md) | string | |
|
|
28
|
+
| [readonly?](./rest-crud.modelcrudrestapiconfig.readonly.md) | boolean | <i>(Optional)</i> If true, the generated controller only has find and count APIs |
|
|
28
29
|
|
|
29
30
|
|