@loopback/docs 3.27.0 → 4.0.2
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 +53 -0
- package/package.json +4 -4
- package/site/Authorization-component-authorizer.md +3 -0
- package/site/Include-filter.md +5 -0
- package/site/apidocs/authorization.authorizationoptions.md +2 -2
- package/site/apidocs/boot.bootmixin.md +2 -2
- package/site/apidocs/context.aliasbindingsource.md +1 -1
- package/site/apidocs/context.classbindingsource.md +1 -1
- package/site/apidocs/context.constantbindingsource.md +1 -1
- package/site/apidocs/context.context.createview.md +2 -1
- package/site/apidocs/context.context.getscopedcontext.md +1 -1
- package/site/apidocs/context.context.md +1 -1
- package/site/apidocs/context.contextview._constructor_.md +2 -1
- package/site/apidocs/context.contextview.asgetter.md +2 -2
- package/site/apidocs/context.contextview.md +1 -1
- package/site/apidocs/context.contextview.resolve.md +2 -2
- package/site/apidocs/context.contextview.singlevalue.md +2 -2
- package/site/apidocs/context.contextview.values.md +2 -2
- package/site/apidocs/context.createviewgetter_1.md +2 -2
- package/site/apidocs/context.dynamicvaluebindingsource.md +1 -1
- package/site/apidocs/context.injectionmetadata.md +2 -2
- package/site/apidocs/context.providerbindingsource.md +1 -1
- package/site/apidocs/core.application.md +1 -1
- package/site/apidocs/core.application.state.md +1 -1
- package/site/apidocs/core.extensions.list.md +2 -1
- package/site/apidocs/core.extensions.md +2 -2
- package/site/apidocs/core.extensions.view.md +2 -1
- package/site/apidocs/core.md +1 -1
- package/site/apidocs/express.middlewaremixin.md +2 -2
- package/site/apidocs/filter.inclusion.md +1 -1
- package/site/apidocs/filter.inclusion.scope.md +3 -1
- package/site/apidocs/graphql.graphqlserver.exportgraphqlschema.md +33 -0
- package/site/apidocs/graphql.graphqlserver.md +1 -0
- package/site/apidocs/repository.belongstodefinition.md +1 -1
- package/site/apidocs/repository.findbyforeignkeys.md +4 -2
- package/site/apidocs/repository.hasmanydefinition.md +1 -1
- package/site/apidocs/repository.hasonedefinition.md +1 -1
- package/site/apidocs/repository.repositorymixin.md +2 -2
- package/site/apidocs/rest.normalizeparsingerror.md +2 -2
- package/site/apidocs/rest.restapplication.exportopenapispec.md +2 -5
- package/site/apidocs/rest.resthttperrors.unsupportedmediatype.md +2 -2
- package/site/apidocs/rest.restserver.exportopenapispec.md +2 -5
- package/site/apidocs/service-proxy.servicemixin.md +2 -2
- package/site/apidocs/socketio.socketiobindings.io.md +1 -1
- package/site/apidocs/socketio.socketiobindings.socket.md +1 -1
- package/site/apidocs/socketio.socketioserver.route.md +2 -2
- package/site/apidocs/socketio.socketioserver.use.md +2 -2
- package/site/apidocs/typeorm.typeormmixin.md +2 -2
- package/site/changelogs/bodyparsers/rest-msgpack/CHANGELOG.md +45 -0
- package/site/changelogs/examples/access-control-migration/CHANGELOG.md +45 -0
- package/site/changelogs/examples/binding-resolution/CHANGELOG.md +45 -0
- package/site/changelogs/examples/context/CHANGELOG.md +45 -0
- package/site/changelogs/examples/express-composition/CHANGELOG.md +45 -0
- package/site/changelogs/examples/file-transfer/CHANGELOG.md +45 -0
- package/site/changelogs/examples/graphql/CHANGELOG.md +45 -0
- package/site/changelogs/examples/greeter-extension/CHANGELOG.md +45 -0
- package/site/changelogs/examples/greeting-app/CHANGELOG.md +45 -0
- package/site/changelogs/examples/hello-world/CHANGELOG.md +45 -0
- package/site/changelogs/examples/lb3-application/CHANGELOG.md +45 -0
- package/site/changelogs/examples/log-extension/CHANGELOG.md +45 -0
- package/site/changelogs/examples/metrics-prometheus/CHANGELOG.md +45 -0
- package/site/changelogs/examples/multi-tenancy/CHANGELOG.md +48 -0
- package/site/changelogs/examples/passport-login/CHANGELOG.md +45 -0
- package/site/changelogs/examples/rest-crud/CHANGELOG.md +45 -0
- package/site/changelogs/examples/rpc-server/CHANGELOG.md +45 -0
- package/site/changelogs/examples/soap-calculator/CHANGELOG.md +45 -0
- package/site/changelogs/examples/socketio/CHANGELOG.md +49 -0
- package/site/changelogs/examples/todo/CHANGELOG.md +45 -0
- package/site/changelogs/examples/todo-jwt/CHANGELOG.md +45 -0
- package/site/changelogs/examples/todo-list/CHANGELOG.md +45 -0
- package/site/changelogs/examples/validation-app/CHANGELOG.md +45 -0
- package/site/changelogs/examples/webpack/CHANGELOG.md +48 -0
- package/site/changelogs/extensions/apiconnect/CHANGELOG.md +45 -0
- package/site/changelogs/extensions/authentication-jwt/CHANGELOG.md +54 -0
- package/site/changelogs/extensions/authentication-passport/CHANGELOG.md +45 -0
- package/site/changelogs/extensions/context-explorer/CHANGELOG.md +45 -0
- package/site/changelogs/extensions/cron/CHANGELOG.md +48 -0
- package/site/changelogs/extensions/graphql/CHANGELOG.md +48 -0
- package/site/changelogs/extensions/health/CHANGELOG.md +45 -0
- package/site/changelogs/extensions/logging/CHANGELOG.md +45 -0
- package/site/changelogs/extensions/metrics/CHANGELOG.md +50 -0
- package/site/changelogs/extensions/pooling/CHANGELOG.md +48 -0
- package/site/changelogs/extensions/socketio/CHANGELOG.md +48 -0
- package/site/changelogs/extensions/typeorm/CHANGELOG.md +48 -0
- package/site/changelogs/fixtures/mock-oauth2-provider/CHANGELOG.md +48 -0
- package/site/changelogs/packages/authentication/CHANGELOG.md +45 -0
- package/site/changelogs/packages/authorization/CHANGELOG.md +45 -0
- package/site/changelogs/packages/boot/CHANGELOG.md +45 -0
- package/site/changelogs/packages/booter-lb3app/CHANGELOG.md +45 -0
- package/site/changelogs/packages/build/CHANGELOG.md +48 -0
- package/site/changelogs/packages/cli/CHANGELOG.md +53 -0
- package/site/changelogs/packages/context/CHANGELOG.md +48 -0
- package/site/changelogs/packages/core/CHANGELOG.md +56 -0
- package/site/changelogs/packages/eslint-config/CHANGELOG.md +45 -0
- package/site/changelogs/packages/express/CHANGELOG.md +45 -0
- package/site/changelogs/packages/filter/CHANGELOG.md +179 -0
- package/site/changelogs/packages/http-caching-proxy/CHANGELOG.md +61 -0
- package/site/changelogs/packages/http-server/CHANGELOG.md +45 -0
- package/site/changelogs/packages/metadata/CHANGELOG.md +45 -0
- package/site/changelogs/packages/model-api-builder/CHANGELOG.md +50 -0
- package/site/changelogs/packages/monorepo/CHANGELOG.md +45 -0
- package/site/changelogs/packages/openapi-spec-builder/CHANGELOG.md +45 -0
- package/site/changelogs/packages/openapi-v3/CHANGELOG.md +48 -0
- package/site/changelogs/packages/repository/CHANGELOG.md +51 -0
- package/site/changelogs/packages/repository-json-schema/CHANGELOG.md +54 -0
- package/site/changelogs/packages/repository-tests/CHANGELOG.md +45 -0
- package/site/changelogs/packages/rest/CHANGELOG.md +48 -0
- package/site/changelogs/packages/rest-crud/CHANGELOG.md +45 -0
- package/site/changelogs/packages/rest-explorer/CHANGELOG.md +45 -0
- package/site/changelogs/packages/security/CHANGELOG.md +45 -0
- package/site/changelogs/packages/service-proxy/CHANGELOG.md +45 -0
- package/site/changelogs/packages/testlab/CHANGELOG.md +48 -0
- package/site/changelogs/packages/tsdocs/CHANGELOG.md +48 -0
- package/site/index.md +1 -1
- package/site/readmes/loopback-next/extensions/graphql/README.md +48 -1
- package/site/readmes/loopback-next/packages/build/README.md +9 -0
- package/site/tutorials/todo/todo-tutorial-model.md +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,59 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.0.2](https://github.com/loopbackio/loopback-next/compare/@loopback/docs@4.0.1...@loopback/docs@4.0.2) (2022-02-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* remove code sample line ([e0c65a5](https://github.com/loopbackio/loopback-next/commit/e0c65a53caca871a8b17cd22f8908b419555cc2a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [4.0.1](https://github.com/loopbackio/loopback-next/compare/@loopback/docs@4.0.0...@loopback/docs@4.0.1) (2022-01-11)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @loopback/docs
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [4.0.0](https://github.com/loopbackio/loopback-next/compare/@loopback/docs@3.27.1...@loopback/docs@4.0.0) (2021-11-18)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Features
|
|
29
|
+
|
|
30
|
+
* drop support for Node.js v10 ([9bcbbb3](https://github.com/loopbackio/loopback-next/commit/9bcbbb358ec3eabc3033d4e7e1c22b524a7069b3))
|
|
31
|
+
* support Node.js v17 ([8d86c03](https://github.com/loopbackio/loopback-next/commit/8d86c03cb7047e2b1f18d05870628ef5783e71b2))
|
|
32
|
+
* upgrade to TypeScript 4.5.2 ([72ece91](https://github.com/loopbackio/loopback-next/commit/72ece91289ecfdfd8747bb9888ad75db73e8ff4b))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### BREAKING CHANGES
|
|
36
|
+
|
|
37
|
+
* drop support for Node.js v10
|
|
38
|
+
|
|
39
|
+
Co-authored-by: Francisco Buceta <frbuceta@gmail.com>
|
|
40
|
+
Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## [3.27.1](https://github.com/loopbackio/loopback-next/compare/@loopback/docs@3.27.0...@loopback/docs@3.27.1) (2021-10-18)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### Bug Fixes
|
|
50
|
+
|
|
51
|
+
* add missing component binding ([33df5b7](https://github.com/loopbackio/loopback-next/commit/33df5b7126630a929c41908d9a38c5d67113e139))
|
|
52
|
+
* **docs:** remove double word ([e40b91b](https://github.com/loopbackio/loopback-next/commit/e40b91b75d3f4a59fd494dd03ab7ebdc71f1a356))
|
|
53
|
+
* make sure scope filters are used for each fk on includes ([5d1a8c7](https://github.com/loopbackio/loopback-next/commit/5d1a8c71d6b79d43bd9b6530f7149fcb1756a71f)), closes [#6832](https://github.com/loopbackio/loopback-next/issues/6832)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
6
59
|
# [3.27.0](https://github.com/loopbackio/loopback-next/compare/@loopback/docs@3.26.1...@loopback/docs@3.27.0) (2021-09-16)
|
|
7
60
|
|
|
8
61
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loopback/docs",
|
|
3
3
|
"description": "Documentation files rendered at [https://loopback.io](https://loopback.io)",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.0.2",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"LoopBack",
|
|
7
7
|
"docs"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"directory": "docs"
|
|
17
17
|
},
|
|
18
18
|
"engines": {
|
|
19
|
-
"node": "
|
|
19
|
+
"node": "12 || 14 || 16 || 17"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"version": "node ./bin/copy-readmes.js && node ./bin/copy-changelogs.js && cd .. && npm run tsdocs",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"tslib": "^2.3.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@loopback/build": "^
|
|
39
|
+
"@loopback/build": "^8.1.0"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "e16818ccb01edc0269ef6c45b022c5f1b67f852c"
|
|
42
42
|
}
|
|
@@ -62,6 +62,9 @@ export class MyApplication extends BootMixin(
|
|
|
62
62
|
constructor(options: ApplicationConfig = {}) {
|
|
63
63
|
super(options);
|
|
64
64
|
|
|
65
|
+
// mount authorization component
|
|
66
|
+
this.component(AuthorizationComponent);
|
|
67
|
+
|
|
65
68
|
// bind the authorizer provider
|
|
66
69
|
this.bind('authorizationProviders.my-authorizer-provider')
|
|
67
70
|
.toProvider(MyAuthorizationProvider)
|
package/site/Include-filter.md
CHANGED
|
@@ -284,6 +284,11 @@ await postRepository.findById('123', {
|
|
|
284
284
|
});
|
|
285
285
|
```
|
|
286
286
|
|
|
287
|
+
{% include important.html content="The `limit` filter will be applied on a per parent record basis. So each parent record will include a max of `limit` number of records.
|
|
288
|
+
Previously, we had a bug where `limit` will be applied globally, so not all parent's records will include related objects depending on the `limit` value.
|
|
289
|
+
To keep backward compatability with this, in the weird case it is needed, you can use `totalLimit` instead. For more details [see here](https://github.com/loopbackio/loopback-next/issues/6832)
|
|
290
|
+
" %}
|
|
291
|
+
|
|
287
292
|
#### Access included objects
|
|
288
293
|
|
|
289
294
|
In the Node.js API, you can simply access the returned model instance with
|
|
@@ -23,9 +23,9 @@ export interface AuthorizationOptions
|
|
|
23
23
|
|
|
24
24
|
| Property | Type | Description |
|
|
25
25
|
| --- | --- | --- |
|
|
26
|
-
| [defaultDecision?](./authorization.authorizationoptions.defaultdecision.md) | [AuthorizationDecision.DENY](./authorization.authorizationdecision.
|
|
26
|
+
| [defaultDecision?](./authorization.authorizationoptions.defaultdecision.md) | [AuthorizationDecision.DENY](./authorization.authorizationdecision.md) \| [AuthorizationDecision.ALLOW](./authorization.authorizationdecision.md) | <i>(Optional)</i> Default decision if all authorizers vote for ABSTAIN If not set, default to <code>AuthorizationDecision.DENY</code> |
|
|
27
27
|
| [defaultMetadata?](./authorization.authorizationoptions.defaultmetadata.md) | [AuthorizationMetadata](./authorization.authorizationmetadata.md) | <i>(Optional)</i> Default authorization metadata if a method is not decorated with <code>@authorize</code>. If not set, no authorization will be enforced for those methods that are not associated with authorization metadata. |
|
|
28
28
|
| [defaultStatusCodeForDeny?](./authorization.authorizationoptions.defaultstatuscodefordeny.md) | number | <i>(Optional)</i> Default HTTP status code when the final decision is <code>AuthorizationDecision.DENY</code>. If not set, default to 403 |
|
|
29
|
-
| [precedence?](./authorization.authorizationoptions.precedence.md) | [AuthorizationDecision.DENY](./authorization.authorizationdecision.
|
|
29
|
+
| [precedence?](./authorization.authorizationoptions.precedence.md) | [AuthorizationDecision.DENY](./authorization.authorizationdecision.md) \| [AuthorizationDecision.ALLOW](./authorization.authorizationdecision.md) | <i>(Optional)</i> Controls if Allow/Deny vote takes precedence and override other votes. If not set, default to <code>AuthorizationDecision.DENY</code>.<!-- -->Once a vote matches the <code>precedence</code>, it becomes the final decision. The rest of votes will be skipped. |
|
|
30
30
|
|
|
31
31
|
|
|
@@ -61,7 +61,7 @@ export declare function BootMixin<T extends MixinTarget<Application>>(superClass
|
|
|
61
61
|
unsubscribe: (observer: loopbackContext.ContextEventObserver) => boolean;
|
|
62
62
|
close: () => void;
|
|
63
63
|
isSubscribed: (observer: loopbackContext.ContextObserver) => boolean;
|
|
64
|
-
createView: <T_7 = unknown>(filter: BindingFilter, comparator?: loopbackContext.BindingComparator | undefined) => loopbackContext.ContextView<T_7>;
|
|
64
|
+
createView: <T_7 = unknown>(filter: BindingFilter, comparator?: loopbackContext.BindingComparator | undefined, options?: Omit<loopbackContext.ResolutionOptions, "session"> | undefined) => loopbackContext.ContextView<T_7>;
|
|
65
65
|
contains: (key: loopbackContext.BindingAddress<unknown>) => boolean;
|
|
66
66
|
isBound: (key: loopbackContext.BindingAddress<unknown>) => boolean;
|
|
67
67
|
getOwnerContext: (keyOrBinding: Readonly<Binding<unknown>> | loopbackContext.BindingAddress<unknown>) => Context | undefined;
|
|
@@ -121,7 +121,7 @@ export declare function BootMixin<T extends MixinTarget<Application>>(superClass
|
|
|
121
121
|
|
|
122
122
|
<b>Returns:</b>
|
|
123
123
|
|
|
124
|
-
{ new (...args: any\[\]): { projectRoot: string; bootOptions?: [BootOptions](./boot.bootoptions.md) \| undefined; booted: boolean; start(): Promise<void>; boot(): Promise<void>; booters(...booterCls: [Constructor](./context.constructor.md)<!-- --><[Booter](./boot.booter.md)<!-- -->>\[\]): [Binding](./context.binding.md)<!-- -->\[\]; applicationBooter(subApp: [Application](./core.application.md) & [Bootable](./boot.bootable.md)<!-- -->, filter?: [BindingFilter](./context.bindingfilter.md) \| undefined): [Binding](./context.binding.md)<!-- --><[Booter](./boot.booter.md)<!-- -->>; 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>; mountComponentBooters(componentInstanceOrClass: [Constructor](./context.constructor.md)<!-- --><unknown> \| [InstanceWithBooters](./boot.instancewithbooters.md)<!-- -->): 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)<!-- -->>; 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: [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: [BindingFilter](./context.bindingfilter.md)<!-- -->, comparator?: loopbackContext.[BindingComparator](./context.bindingcomparator.md) \| 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: Readonly<[Binding](./context.binding.md)<!-- --><unknown>> \| loopbackContext.[BindingAddress](./context.bindingaddress.md)<!-- --><unknown>) => [Context](./context.context.md) \| undefined; getScopedContext: (scope: [BindingScope.APPLICATION](./context.bindingscope.application.md) \| [BindingScope.SERVER](./context.bindingscope.server.md) \| [BindingScope.REQUEST](./context.bindingscope.request.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 \| [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\[\]): { projectRoot: string; bootOptions?: [BootOptions](./boot.bootoptions.md) \| undefined; booted: boolean; start(): Promise<void>; boot(): Promise<void>; booters(...booterCls: [Constructor](./context.constructor.md)<!-- --><[Booter](./boot.booter.md)<!-- -->>\[\]): [Binding](./context.binding.md)<!-- -->\[\]; applicationBooter(subApp: [Application](./core.application.md) & [Bootable](./boot.bootable.md)<!-- -->, filter?: [BindingFilter](./context.bindingfilter.md) \| undefined): [Binding](./context.binding.md)<!-- --><[Booter](./boot.booter.md)<!-- -->>; 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>; mountComponentBooters(componentInstanceOrClass: [Constructor](./context.constructor.md)<!-- --><unknown> \| [InstanceWithBooters](./boot.instancewithbooters.md)<!-- -->): 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)<!-- -->>; 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: [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: [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: Readonly<[Binding](./context.binding.md)<!-- --><unknown>> \| loopbackContext.[BindingAddress](./context.bindingaddress.md)<!-- --><unknown>) => [Context](./context.context.md) \| undefined; getScopedContext: (scope: [BindingScope.APPLICATION](./context.bindingscope.md) \| [BindingScope.SERVER](./context.bindingscope.md) \| [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 \| [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
|
|
125
125
|
|
|
126
126
|
A new class that extends the super class with boot related methods
|
|
127
127
|
|
|
@@ -23,6 +23,6 @@ export declare type AliasBindingSource<T> = {
|
|
|
23
23
|
value: BindingAddress<T>;
|
|
24
24
|
};
|
|
25
25
|
```
|
|
26
|
-
<b>References:</b> [BindingType.ALIAS](./context.bindingtype.
|
|
26
|
+
<b>References:</b> [BindingType.ALIAS](./context.bindingtype.md)<!-- -->, [BindingAddress](./context.bindingaddress.md)
|
|
27
27
|
|
|
28
28
|
|
|
@@ -23,6 +23,6 @@ export declare type ClassBindingSource<T> = {
|
|
|
23
23
|
value: Constructor<T>;
|
|
24
24
|
};
|
|
25
25
|
```
|
|
26
|
-
<b>References:</b> [BindingType.CLASS](./context.bindingtype.
|
|
26
|
+
<b>References:</b> [BindingType.CLASS](./context.bindingtype.md)<!-- -->, [Constructor](./context.constructor.md)
|
|
27
27
|
|
|
28
28
|
|
|
@@ -18,7 +18,7 @@ Create a view of the context chain with the given binding filter
|
|
|
18
18
|
<b>Signature:</b>
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
|
-
createView<T = unknown>(filter: BindingFilter, comparator?: BindingComparator): ContextView<T>;
|
|
21
|
+
createView<T = unknown>(filter: BindingFilter, comparator?: BindingComparator, options?: Omit<ResolutionOptions, 'session'>): ContextView<T>;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Parameters
|
|
@@ -27,6 +27,7 @@ createView<T = unknown>(filter: BindingFilter, comparator?: BindingComparator):
|
|
|
27
27
|
| --- | --- | --- |
|
|
28
28
|
| filter | [BindingFilter](./context.bindingfilter.md) | A function to match bindings |
|
|
29
29
|
| comparator | [BindingComparator](./context.bindingcomparator.md) | A function to sort matched bindings |
|
|
30
|
+
| options | Omit<[ResolutionOptions](./context.resolutionoptions.md)<!-- -->, 'session'> | Resolution options |
|
|
30
31
|
|
|
31
32
|
<b>Returns:</b>
|
|
32
33
|
|
|
@@ -25,7 +25,7 @@ getScopedContext(scope: BindingScope.APPLICATION | BindingScope.SERVER | Binding
|
|
|
25
25
|
|
|
26
26
|
| Parameter | Type | Description |
|
|
27
27
|
| --- | --- | --- |
|
|
28
|
-
| scope | [BindingScope.APPLICATION](./context.bindingscope.
|
|
28
|
+
| scope | [BindingScope.APPLICATION](./context.bindingscope.md) \| [BindingScope.SERVER](./context.bindingscope.md) \| [BindingScope.REQUEST](./context.bindingscope.md) | Binding scope |
|
|
29
29
|
|
|
30
30
|
<b>Returns:</b>
|
|
31
31
|
|
|
@@ -52,7 +52,7 @@ export declare class Context extends EventEmitter
|
|
|
52
52
|
| [close()](./context.context.close.md) | | Close the context: clear observers, stop notifications, and remove event listeners from its parent context. |
|
|
53
53
|
| [configure(key)](./context.context.configure.md) | | Create a corresponding binding for configuration of the target bound by the given key in the context.<!-- -->For example, <code>ctx.configure('controllers.MyController').to({x: 1})</code> will create binding <code>controllers.MyController:$config</code> with value <code>{x: 1}</code>. |
|
|
54
54
|
| [contains(key)](./context.context.contains.md) | | Check if a binding exists with the given key in the local context without delegating to the parent context |
|
|
55
|
-
| [createView(filter, comparator)](./context.context.createview.md) | | Create a view of the context chain with the given binding filter |
|
|
55
|
+
| [createView(filter, comparator, options)](./context.context.createview.md) | | Create a view of the context chain with the given binding filter |
|
|
56
56
|
| [debug(args)](./context.context.debug.md) | | Wrap the debug statement so that it always print out the context name as the prefix |
|
|
57
57
|
| [emitError(err)](./context.context.emiterror.md) | | Emit an <code>error</code> event |
|
|
58
58
|
| [emitEvent(type, event)](./context.context.emitevent.md) | | A strongly-typed method to emit context events |
|
|
@@ -18,7 +18,7 @@ Create a context view
|
|
|
18
18
|
<b>Signature:</b>
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
|
-
constructor(context: Context, filter: BindingFilter, comparator?: BindingComparator | undefined);
|
|
21
|
+
constructor(context: Context, filter: BindingFilter, comparator?: BindingComparator | undefined, resolutionOptions?: Omit<ResolutionOptions, "session"> | undefined);
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Parameters
|
|
@@ -28,5 +28,6 @@ constructor(context: Context, filter: BindingFilter, comparator?: BindingCompara
|
|
|
28
28
|
| context | [Context](./context.context.md) | Context object to watch |
|
|
29
29
|
| filter | [BindingFilter](./context.bindingfilter.md) | Binding filter to match bindings of interest |
|
|
30
30
|
| comparator | [BindingComparator](./context.bindingcomparator.md) \| undefined | Comparator to sort the matched bindings |
|
|
31
|
+
| resolutionOptions | Omit<[ResolutionOptions](./context.resolutionoptions.md)<!-- -->, "session"> \| undefined | |
|
|
31
32
|
|
|
32
33
|
|
|
@@ -18,14 +18,14 @@ As a `Getter` function
|
|
|
18
18
|
<b>Signature:</b>
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
|
-
asGetter(session?:
|
|
21
|
+
asGetter(session?: ResolutionOptionsOrSession): Getter<T[]>;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Parameters
|
|
25
25
|
|
|
26
26
|
| Parameter | Type | Description |
|
|
27
27
|
| --- | --- | --- |
|
|
28
|
-
| session | [
|
|
28
|
+
| session | [ResolutionOptionsOrSession](./context.resolutionoptionsorsession.md) | |
|
|
29
29
|
|
|
30
30
|
<b>Returns:</b>
|
|
31
31
|
|
|
@@ -32,7 +32,7 @@ export declare class ContextView<T = unknown> extends EventEmitter implements Co
|
|
|
32
32
|
|
|
33
33
|
| Constructor | Modifiers | Description |
|
|
34
34
|
| --- | --- | --- |
|
|
35
|
-
| [(constructor)(context, filter, comparator)](./context.contextview._constructor_.md) | | Create a context view |
|
|
35
|
+
| [(constructor)(context, filter, comparator, resolutionOptions)](./context.contextview._constructor_.md) | | Create a context view |
|
|
36
36
|
|
|
37
37
|
## Properties
|
|
38
38
|
|
|
@@ -18,14 +18,14 @@ Resolve values for the matching bindings
|
|
|
18
18
|
<b>Signature:</b>
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
|
-
resolve(session?:
|
|
21
|
+
resolve(session?: ResolutionOptionsOrSession): ValueOrPromise<T[]>;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Parameters
|
|
25
25
|
|
|
26
26
|
| Parameter | Type | Description |
|
|
27
27
|
| --- | --- | --- |
|
|
28
|
-
| session | [
|
|
28
|
+
| session | [ResolutionOptionsOrSession](./context.resolutionoptionsorsession.md) | Resolution session |
|
|
29
29
|
|
|
30
30
|
<b>Returns:</b>
|
|
31
31
|
|
|
@@ -18,14 +18,14 @@ Get the single value
|
|
|
18
18
|
<b>Signature:</b>
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
|
-
singleValue(session?:
|
|
21
|
+
singleValue(session?: ResolutionOptionsOrSession): Promise<T | undefined>;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Parameters
|
|
25
25
|
|
|
26
26
|
| Parameter | Type | Description |
|
|
27
27
|
| --- | --- | --- |
|
|
28
|
-
| session | [
|
|
28
|
+
| session | [ResolutionOptionsOrSession](./context.resolutionoptionsorsession.md) | |
|
|
29
29
|
|
|
30
30
|
<b>Returns:</b>
|
|
31
31
|
|
|
@@ -18,14 +18,14 @@ Get the list of resolved values. If they are not cached, it tries to find and re
|
|
|
18
18
|
<b>Signature:</b>
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
|
-
values(session?:
|
|
21
|
+
values(session?: ResolutionOptionsOrSession): Promise<T[]>;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Parameters
|
|
25
25
|
|
|
26
26
|
| Parameter | Type | Description |
|
|
27
27
|
| --- | --- | --- |
|
|
28
|
-
| session | [
|
|
28
|
+
| session | [ResolutionOptionsOrSession](./context.resolutionoptionsorsession.md) | |
|
|
29
29
|
|
|
30
30
|
<b>Returns:</b>
|
|
31
31
|
|
|
@@ -18,7 +18,7 @@ Create a context view as a getter with the given filter and sort matched binding
|
|
|
18
18
|
<b>Signature:</b>
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
|
-
export declare function createViewGetter<T = unknown>(ctx: Context, bindingFilter: BindingFilter, bindingComparator?: BindingComparator, session?:
|
|
21
|
+
export declare function createViewGetter<T = unknown>(ctx: Context, bindingFilter: BindingFilter, bindingComparator?: BindingComparator, session?: ResolutionOptionsOrSession): Getter<T[]>;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Parameters
|
|
@@ -28,7 +28,7 @@ export declare function createViewGetter<T = unknown>(ctx: Context, bindingFilte
|
|
|
28
28
|
| ctx | [Context](./context.context.md) | Context object |
|
|
29
29
|
| bindingFilter | [BindingFilter](./context.bindingfilter.md) | A function to match bindings |
|
|
30
30
|
| bindingComparator | [BindingComparator](./context.bindingcomparator.md) | A function to compare two bindings |
|
|
31
|
-
| session | [
|
|
31
|
+
| session | [ResolutionOptionsOrSession](./context.resolutionoptionsorsession.md) | Resolution session |
|
|
32
32
|
|
|
33
33
|
<b>Returns:</b>
|
|
34
34
|
|
|
@@ -23,6 +23,6 @@ export declare type DynamicValueBindingSource<T> = {
|
|
|
23
23
|
value: ValueFactory<T> | DynamicValueProviderClass<T>;
|
|
24
24
|
};
|
|
25
25
|
```
|
|
26
|
-
<b>References:</b> [BindingType.DYNAMIC\_VALUE](./context.bindingtype.
|
|
26
|
+
<b>References:</b> [BindingType.DYNAMIC\_VALUE](./context.bindingtype.md)<!-- -->, [ValueFactory](./context.valuefactory.md)<!-- -->, [DynamicValueProviderClass](./context.dynamicvalueproviderclass.md)
|
|
27
27
|
|
|
28
28
|
|
|
@@ -18,9 +18,9 @@ An object to provide metadata for `@inject`
|
|
|
18
18
|
<b>Signature:</b>
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
|
-
export interface InjectionMetadata extends ResolutionOptions
|
|
21
|
+
export interface InjectionMetadata extends Omit<ResolutionOptions, 'session'>
|
|
22
22
|
```
|
|
23
|
-
<b>Extends:</b> [ResolutionOptions](./context.resolutionoptions.md)
|
|
23
|
+
<b>Extends:</b> Omit<[ResolutionOptions](./context.resolutionoptions.md)<!-- -->, 'session'>
|
|
24
24
|
|
|
25
25
|
## Properties
|
|
26
26
|
|
|
@@ -23,6 +23,6 @@ export declare type ProviderBindingSource<T> = {
|
|
|
23
23
|
value: Constructor<Provider<T>>;
|
|
24
24
|
};
|
|
25
25
|
```
|
|
26
|
-
<b>References:</b> [BindingType.PROVIDER](./context.bindingtype.
|
|
26
|
+
<b>References:</b> [BindingType.PROVIDER](./context.bindingtype.md)<!-- -->, [Constructor](./context.constructor.md)<!-- -->, [Provider](./context.provider.md)
|
|
27
27
|
|
|
28
28
|
|
|
@@ -36,7 +36,7 @@ export declare class Application extends Context implements LifeCycleObserver
|
|
|
36
36
|
| Property | Modifiers | Type | Description |
|
|
37
37
|
| --- | --- | --- | --- |
|
|
38
38
|
| [options](./core.application.options.md) | | [ApplicationConfig](./core.applicationconfig.md) | |
|
|
39
|
-
| [state](./core.application.state.md) | | string | Get the state of the application. The initial state is <code>created</code> and it can transition as follows by <code>start</code> and <code>stop</code>:<!-- -->1. start - !started -<!-- -->> starting -<!-- -->> started - started -<!-- -->> started (no-op) 2. stop - started -<!-- -->> stopping -<!-- -->> stopped - !started -<!-- -->> stopped (no-op)<!-- -->Two types of states are expected: - stable, such as <code>started</code> and <code>stopped</code> - in process, such as <code>booting</code> and <code>starting</code>Operations such as <code>start</code> and <code>stop</code> can only be called at a stable state. The logic should immediately set the state to a new one indicating work in process, such as <code>starting</code> and <code>stopping</code>. |
|
|
39
|
+
| [state](./core.application.state.md) | | string | Get the state of the application. The initial state is <code>created</code> and it can transition as follows by <code>start</code> and <code>stop</code>:<!-- -->1. start - !started -<!-- -->> starting -<!-- -->> started - started -<!-- -->> started (no-op) 2. stop - (started \| initialized) -<!-- -->> stopping -<!-- -->> stopped - ! (started \|\| initialized) -<!-- -->> stopped (no-op)<!-- -->Two types of states are expected: - stable, such as <code>started</code> and <code>stopped</code> - in process, such as <code>booting</code> and <code>starting</code>Operations such as <code>start</code> and <code>stop</code> can only be called at a stable state. The logic should immediately set the state to a new one indicating work in process, such as <code>starting</code> and <code>stopping</code>. |
|
|
40
40
|
|
|
41
41
|
## Methods
|
|
42
42
|
|
|
@@ -15,7 +15,7 @@ permalink: /doc/en/lb4/apidocs.core.application.state.html
|
|
|
15
15
|
|
|
16
16
|
Get the state of the application. The initial state is `created` and it can transition as follows by `start` and `stop`<!-- -->:
|
|
17
17
|
|
|
18
|
-
1. start - !started -<!-- -->> starting -<!-- -->> started - started -<!-- -->> started (no-op) 2. stop - started -<!-- -->> stopping -<!-- -->> stopped - !started -<!-- -->> stopped (no-op)
|
|
18
|
+
1. start - !started -<!-- -->> starting -<!-- -->> started - started -<!-- -->> started (no-op) 2. stop - (started \| initialized) -<!-- -->> stopping -<!-- -->> stopped - ! (started \|\| initialized) -<!-- -->> stopped (no-op)
|
|
19
19
|
|
|
20
20
|
Two types of states are expected: - stable, such as `started` and `stopped` - in process, such as `booting` and `starting`
|
|
21
21
|
|
|
@@ -18,7 +18,7 @@ Inject an array of resolved extension instances for the extension point. The lis
|
|
|
18
18
|
<b>Signature:</b>
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
|
-
function list(extensionPointName?: string): (target: Object, member: string | undefined, methodDescriptorOrParameterIndex?: number | TypedPropertyDescriptor<any> | undefined) => void;
|
|
21
|
+
function list(extensionPointName?: string, metadata?: InjectionMetadata): (target: Object, member: string | undefined, methodDescriptorOrParameterIndex?: number | TypedPropertyDescriptor<any> | undefined) => void;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Parameters
|
|
@@ -26,6 +26,7 @@ function list(extensionPointName?: string): (target: Object, member: string | un
|
|
|
26
26
|
| Parameter | Type | Description |
|
|
27
27
|
| --- | --- | --- |
|
|
28
28
|
| extensionPointName | string | Name of the extension point. If not supplied, we use the <code>name</code> tag from the extension point binding or the class name of the extension point class. If a class needs to inject extensions from multiple extension points, use different <code>extensionPointName</code> for different types of extensions. |
|
|
29
|
+
| metadata | [InjectionMetadata](./context.injectionmetadata.md) | Optional injection metadata |
|
|
29
30
|
|
|
30
31
|
<b>Returns:</b>
|
|
31
32
|
|
|
@@ -23,7 +23,7 @@ export declare namespace extensions
|
|
|
23
23
|
|
|
24
24
|
| Function | Description |
|
|
25
25
|
| --- | --- |
|
|
26
|
-
| [list(extensionPointName)](./core.extensions.list.md) | Inject an array of resolved extension instances for the extension point. The list is a snapshot of registered extensions when the injection is fulfilled. Extensions added or removed afterward won't impact the list. |
|
|
27
|
-
| [view(extensionPointName)](./core.extensions.view.md) | Inject a <code>ContextView</code> for extensions of the extension point. The view can then be listened on events such as <code>bind</code>, <code>unbind</code>, or <code>refresh</code> to react on changes of extensions. |
|
|
26
|
+
| [list(extensionPointName, metadata)](./core.extensions.list.md) | Inject an array of resolved extension instances for the extension point. The list is a snapshot of registered extensions when the injection is fulfilled. Extensions added or removed afterward won't impact the list. |
|
|
27
|
+
| [view(extensionPointName, metadata)](./core.extensions.view.md) | Inject a <code>ContextView</code> for extensions of the extension point. The view can then be listened on events such as <code>bind</code>, <code>unbind</code>, or <code>refresh</code> to react on changes of extensions. |
|
|
28
28
|
|
|
29
29
|
|
|
@@ -18,7 +18,7 @@ Inject a `ContextView` for extensions of the extension point. The view can then
|
|
|
18
18
|
<b>Signature:</b>
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
|
-
function view(extensionPointName?: string): (target: Object, member: string | undefined, methodDescriptorOrParameterIndex?: number | TypedPropertyDescriptor<any> | undefined) => void;
|
|
21
|
+
function view(extensionPointName?: string, metadata?: InjectionMetadata): (target: Object, member: string | undefined, methodDescriptorOrParameterIndex?: number | TypedPropertyDescriptor<any> | undefined) => void;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Parameters
|
|
@@ -26,6 +26,7 @@ function view(extensionPointName?: string): (target: Object, member: string | un
|
|
|
26
26
|
| Parameter | Type | Description |
|
|
27
27
|
| --- | --- | --- |
|
|
28
28
|
| extensionPointName | string | Name of the extension point. If not supplied, we use the <code>name</code> tag from the extension point binding or the class name of the extension point class. If a class needs to inject extensions from multiple extension points, use different <code>extensionPointName</code> for different types of extensions. |
|
|
29
|
+
| metadata | [InjectionMetadata](./context.injectionmetadata.md) | Optional injection metadata |
|
|
29
30
|
|
|
30
31
|
<b>Returns:</b>
|
|
31
32
|
|
package/site/apidocs/core.md
CHANGED
|
@@ -37,7 +37,7 @@ For examples of how to leverage `@loopback/core` to build composable and extensi
|
|
|
37
37
|
| [extensionFilter(extensionPointNames)](./core.extensionfilter.md) | A factory function to create binding filter for extensions of a named extension point |
|
|
38
38
|
| [extensionFor(extensionPointNames)](./core.extensionfor.md) | A factory function to create binding template for extensions of the given extension point |
|
|
39
39
|
| [extensionPoint(name, specs)](./core.extensionpoint.md) | Decorate a class as a named extension point. If the decoration is not present, the name of the class will be used. |
|
|
40
|
-
| [extensions(extensionPointName)](./core.extensions.md) | Shortcut to inject extensions for the given extension point. |
|
|
40
|
+
| [extensions(extensionPointName, metadata)](./core.extensions.md) | Shortcut to inject extensions for the given extension point. |
|
|
41
41
|
| [filterByServiceInterface(serviceInterface)](./core.filterbyserviceinterface.md) | Create a binding filter by service class |
|
|
42
42
|
| [isLifeCycleObserver(obj)](./core.islifecycleobserver.md) | Test if an object implements LifeCycleObserver |
|
|
43
43
|
| [isLifeCycleObserverClass(ctor)](./core.islifecycleobserverclass.md) | Test if a class implements LifeCycleObserver |
|
|
@@ -39,7 +39,7 @@ export declare function MiddlewareMixin<T extends MixinTarget<Context>>(superCla
|
|
|
39
39
|
unsubscribe: (observer: loopbackContext.ContextEventObserver) => boolean;
|
|
40
40
|
close: () => void;
|
|
41
41
|
isSubscribed: (observer: loopbackContext.ContextObserver) => boolean;
|
|
42
|
-
createView: <T_2 = unknown>(filter: loopbackContext.BindingFilter, comparator?: loopbackContext.BindingComparator | undefined) => loopbackContext.ContextView<T_2>;
|
|
42
|
+
createView: <T_2 = unknown>(filter: loopbackContext.BindingFilter, comparator?: loopbackContext.BindingComparator | undefined, options?: Omit<loopbackContext.ResolutionOptions, "session"> | undefined) => loopbackContext.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;
|
|
@@ -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) => 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.application.md) \| loopbackContext.[BindingScope.SERVER](./context.bindingscope.server.md) \| loopbackContext.[BindingScope.REQUEST](./context.bindingscope.request.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) \| 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
|
|
103
103
|
|
|
104
104
|
|
|
@@ -30,6 +30,6 @@ export interface Inclusion
|
|
|
30
30
|
| Property | Type | Description |
|
|
31
31
|
| --- | --- | --- |
|
|
32
32
|
| [relation](./filter.inclusion.relation.md) | string | |
|
|
33
|
-
| [scope?](./filter.inclusion.scope.md) | [Filter](./filter.filter.md)<!-- --><AnyObject> | <i>(Optional)</i> |
|
|
33
|
+
| [scope?](./filter.inclusion.scope.md) | [Filter](./filter.filter.md)<!-- --><AnyObject> & { totalLimit?: number; } | <i>(Optional)</i> |
|
|
34
34
|
|
|
35
35
|
|