storj/web/satellite/src/store/index.ts

45 lines
1.3 KiB
TypeScript
Raw Normal View History

2019-01-24 20:15:10 +00:00
// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
import Vue from 'vue';
import Vuex from 'vuex';
import { makeUsersModule } from '@/store/modules/users';
import { projectsModule } from '@/store/modules/projects';
import { projectMembersModule } from '@/store/modules/projectMembers';
import { notificationsModule } from '@/store/modules/notifications';
import { appStateModule } from '@/store/modules/appState';
import { apiKeysModule } from '@/store/modules/apiKeys';
import { bucketUsageModule, usageModule, creditUsageModule } from '@/store/modules/usage';
2019-07-10 21:29:26 +01:00
import { projectPaymentsMethodsModule } from '@/store/modules/paymentMethods';
import { UsersApiGql } from '@/api/users';
Vue.use(Vuex);
export class StoreModule<S> {
public state: S;
public mutations: any;
public actions: any;
public getters: any;
}
const usersApi = new UsersApiGql();
// Satellite store (vuex)
const store = new Vuex.Store({
modules: {
usersModule: makeUsersModule(usersApi),
projectsModule,
projectMembersModule,
notificationsModule,
appStateModule,
2019-04-05 12:24:34 +01:00
apiKeysModule,
2019-05-16 11:43:46 +01:00
usageModule,
bucketUsageModule,
2019-07-10 21:29:26 +01:00
projectPaymentsMethodsModule,
creditUsageModule
}
});
export default store;