import { IFutureModel } from '../future/future-types';
import { FutureRequest } from '../../services/future';
import { IKosContainerModel, IKosDataModel, KosServiceResponse } from '../../../core';

/**
 * Actions that can be optionally passed into a FutureContainerModel via
 * the options parameter and can override the default service to be called.
 *
 * @remarks
 * It is expected that implementations of `IKosDataModel` will have default
 * implementations of services that can be used in the event that these overrides are
 * not provided
 *
 * @category future
 * @internal
 */
export interface IFutureContainerModelOptionsActions {
    /**
     * Service to delete an FutureModel from the backend.
     *
     * @remarks
     * it is expected that the response will not provide any additional data and the
     * system should only assume that a successful response means that the request was
     * accepted by the backend.  Successful deletion of the model will be broadcast
     * via the appropriate Event Topic.
     *
     * @returns - a Promise that resolves to an empty `KosServiceResponse`
     * @category Service
     * @internal
     */
    deleteFuture: (groupId: string) => Promise<KosServiceResponse<unknown> | undefined>;
    /**
     * Service to add an FutureModel to the backend.
     *
     * @remarks
     * it is expected that the response will not provide any additional data and the
     * system should only assume that a successful response means that the request was
     * accepted by the backend.  Successful addition of the model will be broadcast
     * via the appropriate Event Topic.
     *
     * @returns - a Promise that resolves to an empty `KosServiceResponse`
     * @category Service
     * @internal
     */
    addFuture: (future: FutureRequest) => Promise<KosServiceResponse<any> | undefined>;
}
/**
 * Additional properties that can be passed into the constructor in order
 * to set initial values
 *
 * @remarks
 * Used to identify additional data that can be set on the model during
 * instantiation.  It is expected that implementers will set these properties
 * in the constructor.  The value <strong>might</strong> be overriden by
 * subsequent lifecycle methods or updates.
 *
 * @category future
 * @internal
 */
export type IFutureContainerModelOptions = Partial<IFutureContainerModelOptionsActions>;
/**
 * Represents the public interface of a `IFutureContainerModel`
 *
 * @category future
 * @internal
 */
export interface IFutureContainerModel extends IKosContainerModel<IFutureModel, FutureRequest>, IKosDataModel, Omit<IFutureContainerModelOptions, "getFutures" | "deleteFuture" | "addFuture"> {
    futures: IFutureModel[];
    /**
     * Retrieve the IFutureModel based on the id.
     * @internal
     * @param futureId - the id of the future to be retrieved
     * @returns the `IFutureModel` or `undefined` if not avaiable in the list
     */
    getFuture: (futureId: string) => IFutureModel | undefined;
    /**
     * Adds a Future model into the collection.
     *
     * @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.
     *
     * @param model - the Future model to be added
     *
     * @see addFutureService
     * @category Action
     * @internal
     */
    createFuture: <T = void>(model: FutureRequest) => Promise<T>;
    /**
     * Removes a Future model from the collection.
     *
     * @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.
     *
     * @param id - the id of the Future to be removed
     *
     * @see deleteFutureService
     * @category Action
     * @internal
     */
    removeFuture: (id: string) => Promise<void>;
    addFutureModel: (model: IFutureModel) => void;
    removeFutureModel: (id: string) => void;
}
//# sourceMappingURL=future-container-types.d.ts.map