UNPKG

fb-test-module

Version:

How to use: ``` import {store, getStore} from 'fb-test-module'; conf.DialogramApi = "API_BASE_URL"; conf.Platform = "mobile"; //use "web" if you are on webApp getStore(); //Inject store in your provider ``` and you'r readyt to go. # Base ## Act

25 lines (24 loc) 769 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const BaseType_1 = require("./BaseType"); exports.SuccessApiCall = (entity) => ({ type: `${entity} ${BaseType_1.Status.Success}` }); exports.FailureApiCall = (entity, code, message) => ({ type: `${entity} ${BaseType_1.Status.Failure}`, payload: { data: { code, message } } }); exports.LoadingApiCall = (entity) => ({ type: `${entity} ${BaseType_1.Status.Loading}` }); exports.setEntity = (action, response) => (Object.assign({}, action, { type: `${action.payload.meta.entity} ${BaseType_1.SET_ENTITY}`, payload: { data: response } })); exports.Logout = () => ({ type: BaseType_1.LOG_OUT, });