import { Entity, Reducer, ReducerMetadata, RequestMetadata } from '../types/reducers.types'; import { DeleteEntitiesAction, FailAction, RequestAction, SaveNothingAction, SavePartialEntitiesAction, SavePartialPatternToEntitiesAction, SavePartialReducerMetadataAction, SaveWholeEntitiesAction, SaveWholeReducerMetadataAction } from '../types/actions.types'; /** * Updates a reducer's 'requests' prop and sets the 'isPending' property of * the request object, corresponding to the action's request id, to true. * * @param {Reducer} state - The current state of the reducer * @param {RequestAction} action - Request action * @returns {Reducer} Updated reducer state */ export declare function handleRequest(state: Reducer, action: RequestAction): Reducer; /** * Updates nothing in the reducer's 'metadata' nor 'data' props, but updates * the 'requests' prop to reflect that the corresponding request * has been completed successfully. * * @param {Reducer} state - The current state of the reducer * @param {SaveNothingAction} action - Save nothing success action * @returns {Reducer} Updated reducer state */ export declare function handleSaveNothing(state: Reducer, action: SaveNothingAction): Reducer; /** * Updates a reducer's 'metadata' prop, * as well as the 'requests' prop to reflect that the corresponding request * has been completed successfully. * * @param {Reducer} state - The current state of the reducer * @param {SaveWholeReducerMetadataAction} action - Save whole reducer metadata * success action * @returns {Reducer} Updated reducer state */ export declare function handleSaveWholeReducerMetadata(state: Reducer, action: SaveWholeReducerMetadataAction): Reducer; /** * Updates a subset of properties in a reducer's 'metadata' prop, * as well as the 'requests' prop to reflect that the corresponding request * has been completed successfully. * * @param {Reducer} state - The current state of the reducer * @param {SavePartialReducerMetadataAction} action - Save partial reducer * metadata success action * @returns {Reducer} Updated reducer state */ export declare function handleSavePartialReducerMetadata(state: Reducer, action: SavePartialReducerMetadataAction): Reducer; /** * Updates a reducer's 'data' prop with whole entities' data, * the 'metadata' prop with the corresponding partial reducer metadata, * and the 'requests' prop to reflect that the corresponding request has been * completed successfully. * * @param {Reducer} state - The current state of the reducer * @param {SaveWholeEntitiesAction} action - Save whole entities success action * @returns {Reducer} Updated reducer state */ export declare function handleSaveWholeEntities(state: Reducer, action: SaveWholeEntitiesAction): Reducer; /** * Updates a subset of props in a reducer's entities, * as well as the 'requests' prop to reflect that the corresponding request * has been completed successfully. The '__edges__' prop of the entities is * not replaced completely. Instead, only the provided subset of __edges__ is * updated. * * @param {Reducer} state - The current state of the reducer * @param {SavePartialEntitiesAction} action - Save partial entity success * action * @returns {Reducer} Updated reducer state */ export declare function handleSavePartialEntities(state: Reducer, action: SavePartialEntitiesAction): Reducer; /** * Updates one subset of props in many reducers' entities, * as well as the 'requests' prop to reflect that the corresponding request * has been completed successfully. The '__edges__' prop of the entities is * not replaced completely. Instead, only the provided subset of __edges__ is * updated. * * @param {Reducer} state - The current state of the reducer * @param {SavePartialEntitiesAction} action - Save partial entity success * action * @returns {Reducer} Updated reducer state */ export declare function handleSavePartialPatternToEntities(state: Reducer, action: SavePartialPatternToEntitiesAction): Reducer; /** * Deletes a set of a reducer's entities, * as well as the 'requests' prop to reflect that the corresponding request * has been completed successfully. * * @param {Reducer} state - The current state of the reducer * @param {DeleteEntitiesAction} action - Delete entities success action * @returns {Reducer} Updated reducer state */ export declare function handleDeleteEntities(state: Reducer, action: DeleteEntitiesAction): Reducer; /** * Updates a reducer's 'requests' prop to reflect that the corresponding * request has failed. * * @param {Reducer} state - The current state of the reducer * @param {FailAction} action - Fail action * @returns {Reducer} Updated reducer state */ export declare function handleFail(state: Reducer, action: FailAction): Reducer;