Merge from ecomp 718fd196 - Modern UI
[vid.git] / vid-webpack-master / src / app / shared / storeUtil / utils / ncf / ncf.actions.ts
1 import {Action, ActionCreator} from "redux";
2
3 export enum NcfActions{
4   DELETE_ACTION_NCF_INSTANCE = "DELETE_ACTION_NCF_INSTANCE",
5   UNDO_DELETE_ACTION_NCF_INSTANCE = "UNDO_DELETE_ACTION_NCF_INSTANCE"
6
7 }
8 export interface DeleteActionNcfInstanceAction extends Action {
9   collectionResourceStoreKey: string,
10   ncfStoreKey : string;
11   serviceId : string;
12 }
13
14 export interface UndoDeleteActionNcfInstanceAction extends Action {
15   collectionResourceStoreKey: string,
16   ncfStoreKey: string;
17   serviceId?: string;
18 }
19
20
21 export const deleteActionNcfInstance: ActionCreator<DeleteActionNcfInstanceAction> = (collectionResourceStoreKey, ncfStoreKey, serviceId) => ({
22   type: NcfActions.DELETE_ACTION_NCF_INSTANCE,
23   collectionResourceStoreKey: collectionResourceStoreKey,
24   ncfStoreKey: ncfStoreKey,
25   serviceId: serviceId
26 });
27
28 export const undoDeleteActionNcfInstance: ActionCreator<UndoDeleteActionNcfInstanceAction> = (collectionResourceStoreKey, ncfStoreKey, serviceId) => ({
29   type: NcfActions.UNDO_DELETE_ACTION_NCF_INSTANCE,
30   collectionResourceStoreKey: collectionResourceStoreKey,
31   ncfStoreKey: ncfStoreKey,
32   serviceId: serviceId
33 });