All files / src/store/types environments.types.js

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

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 44 45 46        42x               42x         42x           42x           42x                                
import NS from './modules.types';
import createFq from './utils';
 
// Available environments
export const ENVIRONMENTS = Object.freeze({
  LOCAL: 'local',
  QA_MCOM: 'QA-MCOM',
  QA_BCOM: 'QA-BCOM',
  PROD_MCOM: 'PROD-MCOM',
  PROD_BCOM: 'PROD-BCOM',
});
 
export const ENV_MUT = Object.freeze({
  setSelected: 'SET_SELECTED',
  clear: 'CLEAR',
});
 
export const ENV_ACT = Object.freeze({
  hydrate: 'HYDRATE',
  select: 'SELECT',
  clear: 'CLEAR',
});
 
export const ENV_GET = Object.freeze({
  selected: 'selected',
  isSelected: 'isSelected',
  displayName: 'displayName',
});
 
export const ENV_FQ = Object.freeze({
  getters: Object.freeze({
    selected: createFq(NS.environments, ENV_GET.selected),
    isSelected: createFq(NS.environments, ENV_GET.isSelected),
    displayName: createFq(NS.environments, ENV_GET.displayName),
  }),
  actions: Object.freeze({
    hydrate: createFq(NS.environments, ENV_ACT.hydrate),
    select: createFq(NS.environments, ENV_ACT.select),
    clear: createFq(NS.environments, ENV_ACT.clear),
  }),
  mutations: Object.freeze({
    setSelected: createFq(NS.environments, ENV_MUT.setSelected),
    clear: createFq(NS.environments, ENV_MUT.clear),
  }),
});