Class: FlyzeApiStoreFacade
@flyze/lib-data-store 3.0.0-alpha.55· latestDefined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:62
The FlyzeApiStoreFacade is the main entry point for interacting with the Flyze API Store with facade pattern. Main functionalities include:
- Managing multiple store instances.
- Accessing application facades for different instances.
- Managing individual instance facades.
Extends
Section titled “Extends”Implements
Section titled “Implements”OnDestroy
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new FlyzeApiStoreFacade(
storeManager,facadeConfig):FlyzeApiStoreFacade
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:70
Parameters
Section titled “Parameters”storeManager
Section titled “storeManager”facadeConfig
Section titled “facadeConfig”Returns
Section titled “Returns”FlyzeApiStoreFacade
Overrides
Section titled “Overrides”FlyzeApiStoreBaseFacade.constructor
Guides
Section titled “Guides”storeManager
Section titled “storeManager”
protectedreadonlystoreManager:FlyzeApiStoreManager
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store-base.facade.ts:27
Inherited from
Section titled “Inherited from”FlyzeApiStoreBaseFacade.storeManager
application
Section titled “application”Get Signature
Section titled “Get Signature”get application():
FlyzeApiStoreFacadeInstance
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:189
Deprecated
Section titled “Deprecated”Use getApplicationFacade instead.
Returns
Section titled “Returns”availableInstances
Section titled “availableInstances”Get Signature
Section titled “Get Signature”get availableInstances():
string[]
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:119
Deprecated
Section titled “Deprecated”Use getAvailableInstances instead.
Returns
Section titled “Returns”string[]
availableInstances$
Section titled “availableInstances$”Get Signature
Section titled “Get Signature”get availableInstances$():
Observable<string[]>
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:129
Deprecated
Section titled “Deprecated”Use getAvailableInstances$ instead.
Returns
Section titled “Returns”Observable<string[]>
addInstance()
Section titled “addInstance()”addInstance(
config):Promise<FlyzeApiStoreFacadeInstance|undefined>
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:425
Adds a new API store instance and returns its facade instance.
Parameters
Section titled “Parameters”config
Section titled “config”ApiStore_InstanceConfig & ApiStoreFacade_InstanceConfig
The configuration for the new instance
Returns
Section titled “Returns”Promise<FlyzeApiStoreFacadeInstance | undefined>
A promise that resolves to the facade instance of the newly added instance
Overrides
Section titled “Overrides”FlyzeApiStoreBaseFacade.addInstance
addInstanceFacade()
Section titled “addInstanceFacade()”Call Signature
Section titled “Call Signature”addInstanceFacade(
params):void
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:230
Adds the instance facade. Facades added here can be accessed via getInstanceFacade / selectInstanceFacade$.
Parameters
Section titled “Parameters”params
Section titled “params”FlyzeApiStoreFacade__InstanceFacadeAccessParams__Keyed & object
Returns
Section titled “Returns”void
Call Signature
Section titled “Call Signature”addInstanceFacade(
params):void
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:239
Parameters
Section titled “Parameters”params
Section titled “params”FlyzeApiStoreFacade__InstanceFacadeAccessParams__Instance & FlyzeApiStoreFacade__InstanceFacadeAccessParams__Keyed & object
Returns
Section titled “Returns”void
Deprecated
Section titled “Deprecated”Provide only the facadeKey to add the instance facade. The instanceId will be derived from the provided facade’s instanceId property.
createInstanceFacade()
Section titled “createInstanceFacade()”createInstanceFacade(
instanceId,params):FlyzeApiStoreFacadeInstance
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store-base.facade.ts:53
Gets the facade instance by its name/id. If tagIds are provided, a new facade instance is created with the given tag filters.
Parameters
Section titled “Parameters”instanceId
Section titled “instanceId”string
The name/id of the instance
params
Section titled “params”object & object = {}
Returns
Section titled “Returns”The facade instance.
Inherited from
Section titled “Inherited from”FlyzeApiStoreBaseFacade.createInstanceFacade
createInstanceFacadeAsync()
Section titled “createInstanceFacadeAsync()”createInstanceFacadeAsync(
instanceId,params):Promise<FlyzeApiStoreFacadeInstance>
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store-base.facade.ts:99
Gets a facade instance asynchronously, optionally filtered by tag IDs or tag descriptions. As tag descriptions require a lookup, this method is asynchronous.
Parameters
Section titled “Parameters”instanceId
Section titled “instanceId”string
params
Section titled “params”{ tagId?: string | string[]; } | { tagCustomId?: string | string[]; } & object = {}
Returns
Section titled “Returns”Promise<FlyzeApiStoreFacadeInstance>
A promise that resolves to the facade instance
Inherited from
Section titled “Inherited from”FlyzeApiStoreBaseFacade.createInstanceFacadeAsync
getApplicationFacade()
Section titled “getApplicationFacade()”getApplicationFacade(
instanceId?):FlyzeApiStoreFacadeInstance
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:201
Retrieves the application facade instance. If an instanceId is provided, retrieves the application facade for that instance.
Parameters
Section titled “Parameters”instanceId?
Section titled “instanceId?”string
(Optional) The instance ID for which to retrieve the application facade. If not provided, retrieves the facade for the current application instance.
Returns
Section titled “Returns”The application facade instance.
getApplicationInstanceId()
Section titled “getApplicationInstanceId()”getApplicationInstanceId():
string
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:155
Returns
Section titled “Returns”string
The current application instance ID.
getAvailableInstances()
Section titled “getAvailableInstances()”getAvailableInstances():
string[]
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:146
Returns
Section titled “Returns”string[]
An array of available instance IDs.
getAvailableInstances$()
Section titled “getAvailableInstances$()”getAvailableInstances$():
Observable<string[]>
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:139
An Observable that emits the list of available instance IDs.
Returns
Section titled “Returns”Observable<string[]>
getInstance()
Section titled “getInstance()”getInstance(…
args):FlyzeApiStoreFacadeInstance
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store-base.facade.ts:36
Parameters
Section titled “Parameters”…[string, object & object]
Returns
Section titled “Returns”Deprecated
Section titled “Deprecated”Use createInstanceFacade instead
Inherited from
Section titled “Inherited from”FlyzeApiStoreBaseFacade.getInstance
getInstanceAsync()
Section titled “getInstanceAsync()”getInstanceAsync(…
args):Promise<FlyzeApiStoreFacadeInstance>
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store-base.facade.ts:78
Parameters
Section titled “Parameters”…[string, ({ tagId?: string | string[] | undefined; } | { tagCustomId?: string | string[] | undefined; }) & { selectedTagExclusive?: boolean | undefined; }]
Returns
Section titled “Returns”Promise<FlyzeApiStoreFacadeInstance>
Deprecated
Section titled “Deprecated”Use getAvailableInstances instead
Inherited from
Section titled “Inherited from”FlyzeApiStoreBaseFacade.getInstanceAsync
getInstanceFacade()
Section titled “getInstanceFacade()”Call Signature
Section titled “Call Signature”getInstanceFacade(
args):FlyzeApiStoreFacadeInstance|null
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:326
Accesses the instance facade.
Parameters
Section titled “Parameters”FlyzeApiStoreFacade__InstanceFacadeAccessParams__Instance
Returns
Section titled “Returns”FlyzeApiStoreFacadeInstance | null
Call Signature
Section titled “Call Signature”getInstanceFacade(
args):FlyzeApiStoreFacadeInstance|null
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:334
Accesses the instance facade by facadeKey. This allows multiple facades per instance and can be used to differentiate between them.
Parameters
Section titled “Parameters”FlyzeApiStoreFacade__InstanceFacadeAccessParams__Keyed
Returns
Section titled “Returns”FlyzeApiStoreFacadeInstance | null
Call Signature
Section titled “Call Signature”getInstanceFacade(
args):FlyzeApiStoreFacadeInstance|null
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:342
Parameters
Section titled “Parameters”FlyzeApiStoreFacade__InstanceFacadeAccessParams__Instance & FlyzeApiStoreFacade__InstanceFacadeAccessParams__Keyed
Returns
Section titled “Returns”FlyzeApiStoreFacadeInstance | null
Deprecated
Section titled “Deprecated”Provide either the instanceId or facadeKey to access the instance facade. It will prioritize the facadeKey if both parameters are provided.
ngOnDestroy()
Section titled “ngOnDestroy()”ngOnDestroy():
void
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:109
A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”OnDestroy.ngOnDestroy
removeInstance()
Section titled “removeInstance()”removeInstance(
instanceId):void
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:472
Removes an existing API store instance by its name/id.
Parameters
Section titled “Parameters”instanceId
Section titled “instanceId”string
The id of the instance to remove
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”FlyzeApiStoreBaseFacade.removeInstance
removeInstanceFacade()
Section titled “removeInstanceFacade()”Call Signature
Section titled “Call Signature”removeInstanceFacade(
args):void
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:301
Removes the instance facade.
Parameters
Section titled “Parameters”FlyzeApiStoreFacade__InstanceFacadeAccessParams__Keyed
Returns
Section titled “Returns”void
Call Signature
Section titled “Call Signature”removeInstanceFacade(
args):void
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:308
Parameters
Section titled “Parameters”FlyzeApiStoreFacade__InstanceFacadeAccessParams__Instance & FlyzeApiStoreFacade__InstanceFacadeAccessParams__Keyed
Returns
Section titled “Returns”void
Deprecated
Section titled “Deprecated”Provide only the facadeKey to remove the instance facade
selectApplicationFacade$()
Section titled “selectApplicationFacade$()”selectApplicationFacade$(
instanceId?):Observable<FlyzeApiStoreFacadeInstance>
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:214
Selects the application facade instance as an observable. If an instanceId is provided, selects the application facade for that instance.
Parameters
Section titled “Parameters”instanceId?
Section titled “instanceId?”string
(Optional) The instance ID for which to select the application facade. If not provided, selects the facade for the current application instance.
Returns
Section titled “Returns”Observable<FlyzeApiStoreFacadeInstance>
A observable of the application facade instance.
selectApplicationInstanceId$()
Section titled “selectApplicationInstanceId$()”selectApplicationInstanceId$():
Observable<string>
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:162
Returns
Section titled “Returns”Observable<string>
The current application instance ID as an Observable.
selectInstanceFacade$()
Section titled “selectInstanceFacade$()”Call Signature
Section titled “Call Signature”selectInstanceFacade$(
args):Observable<FlyzeApiStoreFacadeInstance>
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:378
Selects the instance facade as an observable
Parameters
Section titled “Parameters”FlyzeApiStoreFacade__InstanceFacadeAccessParams__Instance
Returns
Section titled “Returns”Observable<FlyzeApiStoreFacadeInstance>
Call Signature
Section titled “Call Signature”selectInstanceFacade$(
args):Observable<FlyzeApiStoreFacadeInstance>
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:386
Selects the instance facade by facadeKey. This allows multiple facades per instance and can be used to differentiate between them.
Parameters
Section titled “Parameters”FlyzeApiStoreFacade__InstanceFacadeAccessParams__Keyed
Returns
Section titled “Returns”Observable<FlyzeApiStoreFacadeInstance>
Call Signature
Section titled “Call Signature”selectInstanceFacade$(
args):Observable<FlyzeApiStoreFacadeInstance>
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:394
Parameters
Section titled “Parameters”FlyzeApiStoreFacade__InstanceFacadeAccessParams__Instance & FlyzeApiStoreFacade__InstanceFacadeAccessParams__Keyed
Returns
Section titled “Returns”Observable<FlyzeApiStoreFacadeInstance>
Deprecated
Section titled “Deprecated”Provide either the instanceId or facadeKey to access the instance facade. It will prioritize the facadeKey if both parameters are provided.
setApplicationInstanceId()
Section titled “setApplicationInstanceId()”setApplicationInstanceId(
instanceId):void
Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:171
Sets the application instance ID.
Parameters
Section titled “Parameters”instanceId
Section titled “instanceId”string
The instance ID to set as the application instance.
Returns
Section titled “Returns”void
Throws
Section titled “Throws”Error if the instance does not exist.