import { SetState } from 'zustand'; import { AsyncEntityStateType } from '../../models/async-entity-state'; import { Action, AsyncMetaSliceSelectors, AsyncSliceSetActions, AsyncSliceStateActions, Comparer, EntityId, SelectIdMethod, Selector, SetAction, SliceSelectors } from '../../types'; export declare type AsyncEntitySliceSetActions = AsyncSliceSetActions & { addOne: SetAction; addMany: SetAction; hydrateOne: SetAction; hydrateMany: SetAction; hydrateAll: SetAction; upsertOne: SetAction; upsertMany: SetAction; removeOne: SetAction; removeMany: SetAction; removeAll: SetAction; setAll: SetAction; }; export declare type AsyncEntitySliceStateActions = AsyncSliceStateActions & { addOne: Action<[TEntity]>; addMany: Action<[TEntity[]]>; hydrateOne: Action<[TEntity]>; hydrateMany: Action<[TEntity[]]>; hydrateAll: Action<[TEntity[]]>; upsertOne: Action<[TEntity]>; upsertMany: Action<[TEntity[]]>; removeOne: Action<[EntityId]>; removeMany: Action<[EntityId[]]>; removeAll: Action; setAll: Action<[TEntity[]]>; }; export declare type AsyncEntitySliceState = AsyncEntitySliceStateActions> = AsyncEntityStateType & { actions: TSliceActions; }; export declare type AsyncEntitySliceSelectors = AsyncEntitySliceStateActions> = SliceSelectors, TSliceActions> & AsyncMetaSliceSelectors & { selectIds: Selector; selectEntities: Selector>; selectAll: Selector; selectTotal: Selector; selectById: Selector; }; declare type AsyncEntitySliceOptions = AsyncEntitySliceStateActions> = { name: keyof TAppState; selectSliceState: (appState: TAppState) => AsyncEntitySliceState; selectId: SelectIdMethod | keyof TEntity; sortComparer: Comparer; initialState?: Partial>; }; export declare type AsyncEntitySlice = AsyncEntitySliceStateActions> = { name: keyof TAppState; actions: AsyncEntitySliceSetActions; selectors: AsyncEntitySliceSelectors; state: AsyncEntityStateType; }; export declare const createAsyncEntitySliceState: = AsyncEntitySliceStateActions, TSliceSetActions extends AsyncEntitySliceSetActions = AsyncEntitySliceSetActions>(set: SetState, state: AsyncEntityStateType, actions: TSliceSetActions) => AsyncEntitySliceState; declare const createAsyncEntitySlice: = AsyncEntitySliceStateActions>(options: AsyncEntitySliceOptions) => AsyncEntitySlice; export default createAsyncEntitySlice;