2021-04-30 10:33:36 +01:00
|
|
|
// Copyright (C) 2021 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
import Vuex from 'vuex';
|
|
|
|
|
2021-06-16 19:36:34 +01:00
|
|
|
import { BandwidthClient } from '@/api/bandwidth';
|
2021-04-30 10:33:36 +01:00
|
|
|
import { NodesClient } from '@/api/nodes';
|
2021-06-16 19:36:34 +01:00
|
|
|
import { Operators as OperatorsClient } from '@/api/operators';
|
2021-04-30 10:33:36 +01:00
|
|
|
import { PayoutsClient } from '@/api/payouts';
|
2021-06-16 19:36:34 +01:00
|
|
|
import { BandwidthModule } from '@/app/store/bandwidth';
|
2021-04-30 10:33:36 +01:00
|
|
|
import { NodesModule } from '@/app/store/nodes';
|
2021-06-16 19:36:34 +01:00
|
|
|
import { OperatorsModule } from '@/app/store/operators';
|
2021-04-30 10:33:36 +01:00
|
|
|
import { PayoutsModule } from '@/app/store/payouts';
|
2021-06-16 19:36:34 +01:00
|
|
|
import { Bandwidth } from '@/bandwidth/service';
|
2021-04-30 10:33:36 +01:00
|
|
|
import { Nodes } from '@/nodes/service';
|
2021-06-16 19:36:34 +01:00
|
|
|
import { Operators } from '@/operators';
|
2021-04-30 10:33:36 +01:00
|
|
|
import { Payouts } from '@/payouts/service';
|
|
|
|
import { createLocalVue } from '@vue/test-utils';
|
|
|
|
|
|
|
|
const Vue = createLocalVue();
|
|
|
|
|
|
|
|
Vue.use(Vuex);
|
|
|
|
|
|
|
|
const nodesClient: NodesClient = new NodesClient();
|
|
|
|
export const nodesService: Nodes = new Nodes(nodesClient);
|
|
|
|
const nodesModule: NodesModule = new NodesModule(nodesService);
|
2021-06-16 19:36:34 +01:00
|
|
|
|
2021-04-30 10:33:36 +01:00
|
|
|
const payoutsClient: PayoutsClient = new PayoutsClient();
|
|
|
|
export const payoutsService: Payouts = new Payouts(payoutsClient);
|
|
|
|
const payoutsModule: PayoutsModule = new PayoutsModule(payoutsService);
|
|
|
|
|
2021-06-16 19:36:34 +01:00
|
|
|
const bandwidthClient = new BandwidthClient();
|
|
|
|
export const bandwidthService = new Bandwidth(bandwidthClient);
|
|
|
|
const bandwidthModule: BandwidthModule = new BandwidthModule(bandwidthService);
|
|
|
|
|
|
|
|
const operatorsClient: OperatorsClient = new OperatorsClient();
|
|
|
|
export const operatorsService: Operators = new Operators(operatorsClient);
|
|
|
|
const operatorsModule: OperatorsModule = new OperatorsModule(operatorsService);
|
|
|
|
|
|
|
|
const store = new Vuex.Store({ modules: {
|
|
|
|
payouts: payoutsModule,
|
|
|
|
nodes: nodesModule,
|
|
|
|
operators: operatorsModule,
|
|
|
|
bandwidth: bandwidthModule,
|
|
|
|
}});
|
2021-04-30 10:33:36 +01:00
|
|
|
|
|
|
|
export default store;
|