import {
  createResourceStructure,
  createActionStructure,
  createAsyncStructure,
} from 'store/utils/actions';

import constants from './constants';

const actions = {
  ...createResourceStructure(`${constants.prefix}`),
  fastUpdate: createAsyncStructure(`${constants.prefix}_fast_update`),
  upload: createAsyncStructure(`${constants.prefix}_upload`),
  uploadS3Url: createAsyncStructure(`${constants.prefix}_upload_s3_url`),
  uploadS3: createAsyncStructure(`${constants.prefix}_upload_s3`),
  export: createAsyncStructure(`${constants.prefix}_export`),
  genericAction: createAsyncStructure(`${constants.prefix}_generic_action`),
  history: {
    push: createActionStructure(`${constants.prefix}_history_push`),
    reset: createActionStructure(`${constants.prefix}_history_reset`),
  },
  setMeta: createActionStructure(`${constants.prefix}_set_meta`),
};

export default actions;
