All files / src/app/core/store/customer/addresses addresses.actions.ts

100% Statements 14/14
100% Branches 0/0
100% Functions 0/0
100% Lines 14/14

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44128x     128x   128x   128x   128x         128x   128x   128x         128x   128x   128x         128x         128x   128x        
import { createAction } from '@ngrx/store';
 
import { Address } from 'ish-core/models/address/address.model';
import { httpError, payload } from 'ish-core/utils/ngrx-creators';
 
export const loadAddresses = createAction('[Address] Load Addresses');
 
export const loadAddressesFail = createAction('[Address API] Load Addresses Fail', httpError());
 
export const loadAddressesSuccess = createAction(
  '[Address API] Load Addresses Success',
  payload<{ addresses: Address[] }>()
);
 
export const createCustomerAddress = createAction('[Address] Create Customer Address', payload<{ address: Address }>());
 
export const createCustomerAddressFail = createAction('[Address API] Create Customer Address Fail', httpError());
 
export const createCustomerAddressSuccess = createAction(
  '[Address API] Create Customer Address Success',
  payload<{ address: Address }>()
);
 
export const updateCustomerAddress = createAction('[Address] Update Customer Address', payload<{ address: Address }>());
 
export const updateCustomerAddressFail = createAction('[Address API] Update Customer Address Fail', httpError());
 
export const updateCustomerAddressSuccess = createAction(
  '[Address API] Update Customer Address Success',
  payload<{ address: Address }>()
);
 
export const deleteCustomerAddress = createAction(
  '[Address] Delete Customer Address',
  payload<{ addressId: string }>()
);
 
export const deleteCustomerAddressFail = createAction('[Address API] Delete Customer Address Fail', httpError());
 
export const deleteCustomerAddressSuccess = createAction(
  '[Address API] Delete Customer Address Success',
  payload<{ addressId: string }>()
);