import { Action } from '@ngrx/store' ; import { DaffCart } from '@daffodil/cart' ; import { DaffStateError } from '@daffodil/core/state' ; import { DaffOrder } from '@daffodil/order' ; export enum DaffOrderActionTypes { OrderLoadAction = '[Order] Order Load Action' , OrderLoadSuccessAction = '[Order] Order Load Success Action' , OrderLoadFailureAction = '[Order] Order Load Failure Action' , OrderListAction = '[Order] Order List Action' , OrderListSuccessAction = '[Order] Order List Success Action' , OrderListFailureAction = '[Order] Order List Failure Action' } param orderId param cartId export class DaffOrderLoad < T extends DaffOrder = DaffOrder , V extends DaffCart = DaffCart > implements Action { readonly type = DaffOrderActionTypes . OrderLoadAction ; constructor ( public orderId , public cartId ? ) { } } export class DaffOrderLoadSuccess < T extends DaffOrder = DaffOrder > implements Action { readonly type = DaffOrderActionTypes . OrderLoadSuccessAction ; constructor ( public payload ) { } } export class DaffOrderLoadFailure implements Action { readonly type = DaffOrderActionTypes . OrderLoadFailureAction ; constructor ( public payload ) { } } param payload export class DaffOrderList < T extends DaffCart = DaffCart > implements Action { readonly type = DaffOrderActionTypes . OrderListAction ; constructor ( public payload ? ) { } } export class DaffOrderListSuccess < T extends DaffOrder = DaffOrder > implements Action { readonly type = DaffOrderActionTypes . OrderListSuccessAction ; constructor ( public payload ) { } } export class DaffOrderListFailure implements Action { readonly type = DaffOrderActionTypes . OrderListFailureAction ; constructor ( public payload ) { } } export type DaffOrderActions < T extends DaffOrder = DaffOrder , V extends DaffCart = DaffCart > = DaffOrderLoad < T , V > | DaffOrderLoadSuccess < T > | DaffOrderLoadFailure | DaffOrderList | DaffOrderListSuccess < T > | DaffOrderListFailure ;