Represents the public interface of a IFutureContainerModel

interface IFutureContainerModel {
    getFuture: ((futureId) => undefined | IFutureModel<Record<string, unknown>>);
    createFuture: (<T>(model) => Promise<T>);
    removeFuture: ((id) => Promise<void>);
}

Hierarchy

Implemented by

Action

createFuture: (<T>(model) => Promise<T>)

Adds a Future model into the collection.

Type declaration

    • <T>(model): Promise<T>
    • Type Parameters

      • T = void

      Parameters

      • model: FutureRequest

        the Future model to be added

      Returns Promise<T>

Remarks

If an add service function was passed in as part of the options in the constructor then it will be used. Otherwise the default add service will be invoked.

See

addFutureService

removeFuture: ((id) => Promise<void>)

Removes a Future model from the collection.

Type declaration

    • (id): Promise<void>
    • Parameters

      • id: string

        the id of the Future to be removed

      Returns Promise<void>

Remarks

If a remove service function was passed in as part of the options in the constructor then it will be used. Otherwise the default delete service will be invoked.

See

deleteFutureService

Other

getFuture: ((futureId) => undefined | IFutureModel<Record<string, unknown>>)

Retrieve the IFutureModel based on the id.

Type declaration

    • (futureId): undefined | IFutureModel<Record<string, unknown>>
    • Parameters

      • futureId: string

        the id of the future to be retrieved

      Returns undefined | IFutureModel<Record<string, unknown>>

Returns

the IFutureModel or undefined if not avaiable in the list