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-07-01 13:07:40 +01:00
|
|
|
import { StorageClient } from '@/api/storage';
|
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-07-01 13:07:40 +01:00
|
|
|
import { StorageModule } from '@/app/store/storage';
|
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';
|
2021-07-01 13:07:40 +01:00
|
|
|
import { StorageService } from '@/storage/service';
|
2021-04-30 10:33:36 +01:00
|
|
|
import { createLocalVue } from '@vue/test-utils';
|
|
|
|
|
|
|
|
const Vue = createLocalVue();
|
|
|
|
|
|
|
|
Vue.use(Vuex);
|
|
|
|
|
|
|
|
const nodesClient: NodesClient = new NodesClient();
|
2021-08-02 18:09:54 +01:00
|
|
|
|
2021-04-30 10:33:36 +01:00
|
|
|
export const nodesService: Nodes = new Nodes(nodesClient);
|
2021-08-02 18:09:54 +01:00
|
|
|
|
2021-04-30 10:33:36 +01:00
|
|
|
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();
|
2021-08-02 18:09:54 +01:00
|
|
|
|
2021-04-30 10:33:36 +01:00
|
|
|
export const payoutsService: Payouts = new Payouts(payoutsClient);
|
2021-08-02 18:09:54 +01:00
|
|
|
|
2021-04-30 10:33:36 +01:00
|
|
|
const payoutsModule: PayoutsModule = new PayoutsModule(payoutsService);
|
|
|
|
|
2021-06-16 19:36:34 +01:00
|
|
|
const bandwidthClient = new BandwidthClient();
|
2021-08-02 18:09:54 +01:00
|
|
|
|
2021-06-16 19:36:34 +01:00
|
|
|
export const bandwidthService = new Bandwidth(bandwidthClient);
|
2021-08-02 18:09:54 +01:00
|
|
|
|
2021-06-16 19:36:34 +01:00
|
|
|
const bandwidthModule: BandwidthModule = new BandwidthModule(bandwidthService);
|
|
|
|
|
|
|
|
const operatorsClient: OperatorsClient = new OperatorsClient();
|
2021-08-02 18:09:54 +01:00
|
|
|
|
2021-06-16 19:36:34 +01:00
|
|
|
export const operatorsService: Operators = new Operators(operatorsClient);
|
2021-08-02 18:09:54 +01:00
|
|
|
|
2021-06-16 19:36:34 +01:00
|
|
|
const operatorsModule: OperatorsModule = new OperatorsModule(operatorsService);
|
|
|
|
|
2021-07-01 13:07:40 +01:00
|
|
|
const storageClient = new StorageClient();
|
2021-08-02 18:09:54 +01:00
|
|
|
|
2021-07-01 13:07:40 +01:00
|
|
|
export const storageService = new StorageService(storageClient);
|
2021-08-02 18:09:54 +01:00
|
|
|
|
2021-07-01 13:07:40 +01:00
|
|
|
const storageModule: StorageModule = new StorageModule(storageService);
|
|
|
|
|
2021-06-16 19:36:34 +01:00
|
|
|
const store = new Vuex.Store({ modules: {
|
|
|
|
payouts: payoutsModule,
|
|
|
|
nodes: nodesModule,
|
|
|
|
operators: operatorsModule,
|
|
|
|
bandwidth: bandwidthModule,
|
2021-07-01 13:07:40 +01:00
|
|
|
storage: storageModule,
|
2021-08-02 18:09:54 +01:00
|
|
|
} });
|
2021-04-30 10:33:36 +01:00
|
|
|
|
|
|
|
export default store;
|