Skip to content

Class: FlyzeApiStoreFacade

@flyze/lib-data-store 3.0.0-alpha.55· latest

Defined 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.
  • OnDestroy

new FlyzeApiStoreFacade(storeManager, facadeConfig): FlyzeApiStoreFacade

Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:70

FlyzeApiStoreManager

ApiStoreFacadeModuleConfig

FlyzeApiStoreFacade

FlyzeApiStoreBaseFacade.constructor

protected readonly storeManager: FlyzeApiStoreManager

Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store-base.facade.ts:27

FlyzeApiStoreBaseFacade.storeManager


get application(): FlyzeApiStoreFacadeInstance

Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:189

Use getApplicationFacade instead.

FlyzeApiStoreFacadeInstance


get availableInstances(): string[]

Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:119

Use getAvailableInstances instead.

string[]


get availableInstances$(): Observable<string[]>

Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:129

Use getAvailableInstances$ instead.

Observable<string[]>


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.

ApiStore_InstanceConfig & ApiStoreFacade_InstanceConfig

The configuration for the new instance

Promise<FlyzeApiStoreFacadeInstance | undefined>

A promise that resolves to the facade instance of the newly added instance

FlyzeApiStoreBaseFacade.addInstance


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$.

FlyzeApiStoreFacade__InstanceFacadeAccessParams__Keyed & object

void

addInstanceFacade(params): void

Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:239

FlyzeApiStoreFacade__InstanceFacadeAccessParams__Instance & FlyzeApiStoreFacade__InstanceFacadeAccessParams__Keyed & object

void

Provide only the facadeKey to add the instance facade. The instanceId will be derived from the provided facade’s instanceId property.


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.

string

The name/id of the instance

object & object = {}

FlyzeApiStoreFacadeInstance

The facade instance.

FlyzeApiStoreBaseFacade.createInstanceFacade


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.

string

{ tagId?: string | string[]; } | { tagCustomId?: string | string[]; } & object = {}

Promise<FlyzeApiStoreFacadeInstance>

A promise that resolves to the facade instance

FlyzeApiStoreBaseFacade.createInstanceFacadeAsync


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.

string

(Optional) The instance ID for which to retrieve the application facade. If not provided, retrieves the facade for the current application instance.

FlyzeApiStoreFacadeInstance

The application facade instance.


getApplicationInstanceId(): string

Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:155

string

The current application instance ID.


getAvailableInstances(): string[]

Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:146

string[]

An array of available instance IDs.


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.

Observable<string[]>


getInstance(…args): FlyzeApiStoreFacadeInstance

Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store-base.facade.ts:36

…[string, object & object]

FlyzeApiStoreFacadeInstance

Use createInstanceFacade instead

FlyzeApiStoreBaseFacade.getInstance


getInstanceAsync(…args): Promise<FlyzeApiStoreFacadeInstance>

Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store-base.facade.ts:78

…[string, ({ tagId?: string | string[] | undefined; } | { tagCustomId?: string | string[] | undefined; }) & { selectedTagExclusive?: boolean | undefined; }]

Promise<FlyzeApiStoreFacadeInstance>

Use getAvailableInstances instead

FlyzeApiStoreBaseFacade.getInstanceAsync


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.

FlyzeApiStoreFacade__InstanceFacadeAccessParams__Instance

FlyzeApiStoreFacadeInstance | null

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.

FlyzeApiStoreFacade__InstanceFacadeAccessParams__Keyed

FlyzeApiStoreFacadeInstance | null

getInstanceFacade(args): FlyzeApiStoreFacadeInstance | null

Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:342

FlyzeApiStoreFacade__InstanceFacadeAccessParams__Instance & FlyzeApiStoreFacade__InstanceFacadeAccessParams__Keyed

FlyzeApiStoreFacadeInstance | null

Provide either the instanceId or facadeKey to access the instance facade. It will prioritize the facadeKey if both parameters are provided.


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.

void

OnDestroy.ngOnDestroy


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.

string

The id of the instance to remove

void

FlyzeApiStoreBaseFacade.removeInstance


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.

FlyzeApiStoreFacade__InstanceFacadeAccessParams__Keyed

void

removeInstanceFacade(args): void

Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:308

FlyzeApiStoreFacade__InstanceFacadeAccessParams__Instance & FlyzeApiStoreFacade__InstanceFacadeAccessParams__Keyed

void

Provide only the facadeKey to remove the instance facade


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.

string

(Optional) The instance ID for which to select the application facade. If not provided, selects the facade for the current application instance.

Observable<FlyzeApiStoreFacadeInstance>

A observable of the application facade instance.


selectApplicationInstanceId$(): Observable<string>

Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:162

Observable<string>

The current application instance ID as an Observable.


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

FlyzeApiStoreFacade__InstanceFacadeAccessParams__Instance

Observable<FlyzeApiStoreFacadeInstance>

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.

FlyzeApiStoreFacade__InstanceFacadeAccessParams__Keyed

Observable<FlyzeApiStoreFacadeInstance>

selectInstanceFacade$(args): Observable<FlyzeApiStoreFacadeInstance>

Defined in: projects/lib-data-store/src/lib/flyze-api-store-facade/flyze-api-store.facade.ts:394

FlyzeApiStoreFacade__InstanceFacadeAccessParams__Instance & FlyzeApiStoreFacade__InstanceFacadeAccessParams__Keyed

Observable<FlyzeApiStoreFacadeInstance>

Provide either the instanceId or facadeKey to access the instance facade. It will prioritize the facadeKey if both parameters are provided.


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.

string

The instance ID to set as the application instance.

void

Error if the instance does not exist.