mirror of https://github.com/ghostfolio/ghostfolio
Browse Source
* introduce basic module structure for data provider * introduce DataGatheringModule * introduce ExchangeRateDataModule * introduce ImpersonationModule * move RulesService * cleanup portfolio module * Sort imports Co-authored-by: Valentin Zickner <github@zickner.ch> Co-authored-by: Thomas <4159106+dtslvr@users.noreply.github.com>pull/293/head
Valentin Zickner
4 years ago
committed by
GitHub
56 changed files with 270 additions and 323 deletions
@ -1,32 +1,24 @@ |
|||||
import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; |
import { RedisCacheModule } from '@ghostfolio/api/app/redis-cache/redis-cache.module'; |
||||
import { DataProviderService } from '@ghostfolio/api/services/data-provider.service'; |
import { ConfigurationModule } from '@ghostfolio/api/services/configuration.module'; |
||||
import { AlphaVantageService } from '@ghostfolio/api/services/data-provider/alpha-vantage/alpha-vantage.service'; |
import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data-provider.module'; |
||||
import { GhostfolioScraperApiService } from '@ghostfolio/api/services/data-provider/ghostfolio-scraper-api/ghostfolio-scraper-api.service'; |
import { ExchangeRateDataModule } from '@ghostfolio/api/services/exchange-rate-data.module'; |
||||
import { RakutenRapidApiService } from '@ghostfolio/api/services/data-provider/rakuten-rapid-api/rakuten-rapid-api.service'; |
import { ImpersonationModule } from '@ghostfolio/api/services/impersonation.module'; |
||||
import { YahooFinanceService } from '@ghostfolio/api/services/data-provider/yahoo-finance/yahoo-finance.service'; |
import { PrismaModule } from '@ghostfolio/api/services/prisma.module'; |
||||
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data.service'; |
|
||||
import { ImpersonationService } from '@ghostfolio/api/services/impersonation.service'; |
|
||||
import { PrismaService } from '@ghostfolio/api/services/prisma.service'; |
|
||||
import { Module } from '@nestjs/common'; |
import { Module } from '@nestjs/common'; |
||||
|
|
||||
import { RedisCacheModule } from '../redis-cache/redis-cache.module'; |
|
||||
import { AccountController } from './account.controller'; |
import { AccountController } from './account.controller'; |
||||
import { AccountService } from './account.service'; |
import { AccountService } from './account.service'; |
||||
|
|
||||
@Module({ |
@Module({ |
||||
imports: [RedisCacheModule], |
imports: [ |
||||
|
ConfigurationModule, |
||||
|
DataProviderModule, |
||||
|
ExchangeRateDataModule, |
||||
|
ImpersonationModule, |
||||
|
RedisCacheModule, |
||||
|
PrismaModule |
||||
|
], |
||||
controllers: [AccountController], |
controllers: [AccountController], |
||||
providers: [ |
providers: [AccountService] |
||||
AccountService, |
|
||||
AlphaVantageService, |
|
||||
ConfigurationService, |
|
||||
DataProviderService, |
|
||||
ExchangeRateDataService, |
|
||||
GhostfolioScraperApiService, |
|
||||
ImpersonationService, |
|
||||
PrismaService, |
|
||||
RakutenRapidApiService, |
|
||||
YahooFinanceService |
|
||||
] |
|
||||
}) |
}) |
||||
export class AccountModule {} |
export class AccountModule {} |
||||
|
@ -1,31 +1,22 @@ |
|||||
import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; |
import { ConfigurationModule } from '@ghostfolio/api/services/configuration.module'; |
||||
import { DataGatheringService } from '@ghostfolio/api/services/data-gathering.service'; |
import { DataGatheringModule } from '@ghostfolio/api/services/data-gathering.module'; |
||||
import { DataProviderService } from '@ghostfolio/api/services/data-provider.service'; |
import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data-provider.module'; |
||||
import { AlphaVantageService } from '@ghostfolio/api/services/data-provider/alpha-vantage/alpha-vantage.service'; |
import { ExchangeRateDataModule } from '@ghostfolio/api/services/exchange-rate-data.module'; |
||||
import { GhostfolioScraperApiService } from '@ghostfolio/api/services/data-provider/ghostfolio-scraper-api/ghostfolio-scraper-api.service'; |
import { PrismaModule } from '@ghostfolio/api/services/prisma.module'; |
||||
import { RakutenRapidApiService } from '@ghostfolio/api/services/data-provider/rakuten-rapid-api/rakuten-rapid-api.service'; |
|
||||
import { YahooFinanceService } from '@ghostfolio/api/services/data-provider/yahoo-finance/yahoo-finance.service'; |
|
||||
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data.service'; |
|
||||
import { PrismaService } from '@ghostfolio/api/services/prisma.service'; |
|
||||
import { Module } from '@nestjs/common'; |
import { Module } from '@nestjs/common'; |
||||
|
|
||||
import { AdminController } from './admin.controller'; |
import { AdminController } from './admin.controller'; |
||||
import { AdminService } from './admin.service'; |
import { AdminService } from './admin.service'; |
||||
|
|
||||
@Module({ |
@Module({ |
||||
imports: [], |
imports: [ |
||||
|
ConfigurationModule, |
||||
|
DataGatheringModule, |
||||
|
DataProviderModule, |
||||
|
ExchangeRateDataModule, |
||||
|
PrismaModule |
||||
|
], |
||||
controllers: [AdminController], |
controllers: [AdminController], |
||||
providers: [ |
providers: [AdminService] |
||||
AdminService, |
|
||||
AlphaVantageService, |
|
||||
ConfigurationService, |
|
||||
DataGatheringService, |
|
||||
DataProviderService, |
|
||||
ExchangeRateDataService, |
|
||||
GhostfolioScraperApiService, |
|
||||
PrismaService, |
|
||||
RakutenRapidApiService, |
|
||||
YahooFinanceService |
|
||||
] |
|
||||
}) |
}) |
||||
export class AdminModule {} |
export class AdminModule {} |
||||
|
@ -1,30 +0,0 @@ |
|||||
import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; |
|
||||
import { DataProviderService } from '@ghostfolio/api/services/data-provider.service'; |
|
||||
import { AlphaVantageService } from '@ghostfolio/api/services/data-provider/alpha-vantage/alpha-vantage.service'; |
|
||||
import { GhostfolioScraperApiService } from '@ghostfolio/api/services/data-provider/ghostfolio-scraper-api/ghostfolio-scraper-api.service'; |
|
||||
import { RakutenRapidApiService } from '@ghostfolio/api/services/data-provider/rakuten-rapid-api/rakuten-rapid-api.service'; |
|
||||
import { YahooFinanceService } from '@ghostfolio/api/services/data-provider/yahoo-finance/yahoo-finance.service'; |
|
||||
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data.service'; |
|
||||
import { PrismaService } from '@ghostfolio/api/services/prisma.service'; |
|
||||
import { Module } from '@nestjs/common'; |
|
||||
|
|
||||
import { CurrentRateService } from './current-rate.service'; |
|
||||
import { MarketDataService } from './market-data.service'; |
|
||||
|
|
||||
@Module({ |
|
||||
imports: [], |
|
||||
controllers: [], |
|
||||
providers: [ |
|
||||
AlphaVantageService, |
|
||||
ConfigurationService, |
|
||||
CurrentRateService, |
|
||||
DataProviderService, |
|
||||
ExchangeRateDataService, |
|
||||
GhostfolioScraperApiService, |
|
||||
MarketDataService, |
|
||||
PrismaService, |
|
||||
RakutenRapidApiService, |
|
||||
YahooFinanceService |
|
||||
] |
|
||||
}) |
|
||||
export class CoreModule {} |
|
@ -1,6 +0,0 @@ |
|||||
import { TransactionPointSymbol } from '@ghostfolio/api/app/core/interfaces/transaction-point-symbol.interface'; |
|
||||
|
|
||||
export interface TransactionPoint { |
|
||||
date: string; |
|
||||
items: TransactionPointSymbol[]; |
|
||||
} |
|
@ -1,34 +1,23 @@ |
|||||
import { AccountService } from '@ghostfolio/api/app/account/account.service'; |
import { AccountService } from '@ghostfolio/api/app/account/account.service'; |
||||
import { RedisCacheModule } from '@ghostfolio/api/app/redis-cache/redis-cache.module'; |
import { RedisCacheModule } from '@ghostfolio/api/app/redis-cache/redis-cache.module'; |
||||
import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; |
import { ConfigurationModule } from '@ghostfolio/api/services/configuration.module'; |
||||
import { DataProviderService } from '@ghostfolio/api/services/data-provider.service'; |
import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data-provider.module'; |
||||
import { AlphaVantageService } from '@ghostfolio/api/services/data-provider/alpha-vantage/alpha-vantage.service'; |
import { ExchangeRateDataModule } from '@ghostfolio/api/services/exchange-rate-data.module'; |
||||
import { GhostfolioScraperApiService } from '@ghostfolio/api/services/data-provider/ghostfolio-scraper-api/ghostfolio-scraper-api.service'; |
import { PrismaModule } from '@ghostfolio/api/services/prisma.module'; |
||||
import { RakutenRapidApiService } from '@ghostfolio/api/services/data-provider/rakuten-rapid-api/rakuten-rapid-api.service'; |
|
||||
import { YahooFinanceService } from '@ghostfolio/api/services/data-provider/yahoo-finance/yahoo-finance.service'; |
|
||||
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data.service'; |
|
||||
import { PrismaService } from '@ghostfolio/api/services/prisma.service'; |
|
||||
import { RulesService } from '@ghostfolio/api/services/rules.service'; |
|
||||
import { Module } from '@nestjs/common'; |
import { Module } from '@nestjs/common'; |
||||
|
|
||||
import { ExperimentalController } from './experimental.controller'; |
import { ExperimentalController } from './experimental.controller'; |
||||
import { ExperimentalService } from './experimental.service'; |
import { ExperimentalService } from './experimental.service'; |
||||
|
|
||||
@Module({ |
@Module({ |
||||
imports: [RedisCacheModule], |
imports: [ |
||||
|
ConfigurationModule, |
||||
|
DataProviderModule, |
||||
|
ExchangeRateDataModule, |
||||
|
RedisCacheModule, |
||||
|
PrismaModule |
||||
|
], |
||||
controllers: [ExperimentalController], |
controllers: [ExperimentalController], |
||||
providers: [ |
providers: [AccountService, ExperimentalService] |
||||
AccountService, |
|
||||
AlphaVantageService, |
|
||||
ConfigurationService, |
|
||||
DataProviderService, |
|
||||
ExchangeRateDataService, |
|
||||
ExperimentalService, |
|
||||
GhostfolioScraperApiService, |
|
||||
PrismaService, |
|
||||
RakutenRapidApiService, |
|
||||
RulesService, |
|
||||
YahooFinanceService |
|
||||
] |
|
||||
}) |
}) |
||||
export class ExperimentalModule {} |
export class ExperimentalModule {} |
||||
|
@ -1,32 +1,23 @@ |
|||||
import { CacheService } from '@ghostfolio/api/app/cache/cache.service'; |
import { CacheService } from '@ghostfolio/api/app/cache/cache.service'; |
||||
import { RedisCacheModule } from '@ghostfolio/api/app/redis-cache/redis-cache.module'; |
import { RedisCacheModule } from '@ghostfolio/api/app/redis-cache/redis-cache.module'; |
||||
import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; |
import { ConfigurationModule } from '@ghostfolio/api/services/configuration.module'; |
||||
import { DataGatheringService } from '@ghostfolio/api/services/data-gathering.service'; |
import { DataGatheringModule } from '@ghostfolio/api/services/data-gathering.module'; |
||||
import { DataProviderService } from '@ghostfolio/api/services/data-provider.service'; |
import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data-provider.module'; |
||||
import { AlphaVantageService } from '@ghostfolio/api/services/data-provider/alpha-vantage/alpha-vantage.service'; |
import { PrismaModule } from '@ghostfolio/api/services/prisma.module'; |
||||
import { GhostfolioScraperApiService } from '@ghostfolio/api/services/data-provider/ghostfolio-scraper-api/ghostfolio-scraper-api.service'; |
|
||||
import { RakutenRapidApiService } from '@ghostfolio/api/services/data-provider/rakuten-rapid-api/rakuten-rapid-api.service'; |
|
||||
import { YahooFinanceService } from '@ghostfolio/api/services/data-provider/yahoo-finance/yahoo-finance.service'; |
|
||||
import { PrismaService } from '@ghostfolio/api/services/prisma.service'; |
|
||||
import { Module } from '@nestjs/common'; |
import { Module } from '@nestjs/common'; |
||||
|
|
||||
import { ExportController } from './export.controller'; |
import { ExportController } from './export.controller'; |
||||
import { ExportService } from './export.service'; |
import { ExportService } from './export.service'; |
||||
|
|
||||
@Module({ |
@Module({ |
||||
imports: [RedisCacheModule], |
imports: [ |
||||
|
ConfigurationModule, |
||||
|
DataGatheringModule, |
||||
|
DataProviderModule, |
||||
|
PrismaModule, |
||||
|
RedisCacheModule |
||||
|
], |
||||
controllers: [ExportController], |
controllers: [ExportController], |
||||
providers: [ |
providers: [CacheService, ExportService] |
||||
AlphaVantageService, |
|
||||
CacheService, |
|
||||
ConfigurationService, |
|
||||
DataGatheringService, |
|
||||
DataProviderService, |
|
||||
ExportService, |
|
||||
GhostfolioScraperApiService, |
|
||||
PrismaService, |
|
||||
RakutenRapidApiService, |
|
||||
YahooFinanceService |
|
||||
] |
|
||||
}) |
}) |
||||
export class ExportModule {} |
export class ExportModule {} |
||||
|
@ -1,34 +1,24 @@ |
|||||
import { CacheService } from '@ghostfolio/api/app/cache/cache.service'; |
import { CacheService } from '@ghostfolio/api/app/cache/cache.service'; |
||||
import { OrderService } from '@ghostfolio/api/app/order/order.service'; |
import { OrderService } from '@ghostfolio/api/app/order/order.service'; |
||||
import { RedisCacheModule } from '@ghostfolio/api/app/redis-cache/redis-cache.module'; |
import { RedisCacheModule } from '@ghostfolio/api/app/redis-cache/redis-cache.module'; |
||||
import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; |
import { ConfigurationModule } from '@ghostfolio/api/services/configuration.module'; |
||||
import { DataGatheringService } from '@ghostfolio/api/services/data-gathering.service'; |
import { DataGatheringModule } from '@ghostfolio/api/services/data-gathering.module'; |
||||
import { DataProviderService } from '@ghostfolio/api/services/data-provider.service'; |
import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data-provider.module'; |
||||
import { AlphaVantageService } from '@ghostfolio/api/services/data-provider/alpha-vantage/alpha-vantage.service'; |
import { PrismaModule } from '@ghostfolio/api/services/prisma.module'; |
||||
import { GhostfolioScraperApiService } from '@ghostfolio/api/services/data-provider/ghostfolio-scraper-api/ghostfolio-scraper-api.service'; |
|
||||
import { RakutenRapidApiService } from '@ghostfolio/api/services/data-provider/rakuten-rapid-api/rakuten-rapid-api.service'; |
|
||||
import { YahooFinanceService } from '@ghostfolio/api/services/data-provider/yahoo-finance/yahoo-finance.service'; |
|
||||
import { PrismaService } from '@ghostfolio/api/services/prisma.service'; |
|
||||
import { Module } from '@nestjs/common'; |
import { Module } from '@nestjs/common'; |
||||
|
|
||||
import { ImportController } from './import.controller'; |
import { ImportController } from './import.controller'; |
||||
import { ImportService } from './import.service'; |
import { ImportService } from './import.service'; |
||||
|
|
||||
@Module({ |
@Module({ |
||||
imports: [RedisCacheModule], |
imports: [ |
||||
|
ConfigurationModule, |
||||
|
DataGatheringModule, |
||||
|
DataProviderModule, |
||||
|
PrismaModule, |
||||
|
RedisCacheModule |
||||
|
], |
||||
controllers: [ImportController], |
controllers: [ImportController], |
||||
providers: [ |
providers: [CacheService, ImportService, OrderService] |
||||
AlphaVantageService, |
|
||||
CacheService, |
|
||||
ConfigurationService, |
|
||||
DataGatheringService, |
|
||||
DataProviderService, |
|
||||
GhostfolioScraperApiService, |
|
||||
ImportService, |
|
||||
OrderService, |
|
||||
PrismaService, |
|
||||
RakutenRapidApiService, |
|
||||
YahooFinanceService |
|
||||
] |
|
||||
}) |
}) |
||||
export class ImportModule {} |
export class ImportModule {} |
||||
|
@ -1,34 +1,26 @@ |
|||||
import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; |
import { CacheService } from '@ghostfolio/api/app/cache/cache.service'; |
||||
import { DataGatheringService } from '@ghostfolio/api/services/data-gathering.service'; |
import { RedisCacheModule } from '@ghostfolio/api/app/redis-cache/redis-cache.module'; |
||||
import { DataProviderService } from '@ghostfolio/api/services/data-provider.service'; |
import { ConfigurationModule } from '@ghostfolio/api/services/configuration.module'; |
||||
import { AlphaVantageService } from '@ghostfolio/api/services/data-provider/alpha-vantage/alpha-vantage.service'; |
import { DataGatheringModule } from '@ghostfolio/api/services/data-gathering.module'; |
||||
import { GhostfolioScraperApiService } from '@ghostfolio/api/services/data-provider/ghostfolio-scraper-api/ghostfolio-scraper-api.service'; |
import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data-provider.module'; |
||||
import { RakutenRapidApiService } from '@ghostfolio/api/services/data-provider/rakuten-rapid-api/rakuten-rapid-api.service'; |
import { ImpersonationModule } from '@ghostfolio/api/services/impersonation.module'; |
||||
import { YahooFinanceService } from '@ghostfolio/api/services/data-provider/yahoo-finance/yahoo-finance.service'; |
import { PrismaModule } from '@ghostfolio/api/services/prisma.module'; |
||||
import { ImpersonationService } from '@ghostfolio/api/services/impersonation.service'; |
|
||||
import { PrismaService } from '@ghostfolio/api/services/prisma.service'; |
|
||||
import { Module } from '@nestjs/common'; |
import { Module } from '@nestjs/common'; |
||||
|
|
||||
import { CacheService } from '../cache/cache.service'; |
|
||||
import { RedisCacheModule } from '../redis-cache/redis-cache.module'; |
|
||||
import { OrderController } from './order.controller'; |
import { OrderController } from './order.controller'; |
||||
import { OrderService } from './order.service'; |
import { OrderService } from './order.service'; |
||||
|
|
||||
@Module({ |
@Module({ |
||||
imports: [RedisCacheModule], |
imports: [ |
||||
|
ConfigurationModule, |
||||
|
DataGatheringModule, |
||||
|
DataProviderModule, |
||||
|
ImpersonationModule, |
||||
|
PrismaModule, |
||||
|
RedisCacheModule |
||||
|
], |
||||
controllers: [OrderController], |
controllers: [OrderController], |
||||
providers: [ |
providers: [CacheService, OrderService], |
||||
AlphaVantageService, |
exports: [OrderService] |
||||
CacheService, |
|
||||
ConfigurationService, |
|
||||
DataGatheringService, |
|
||||
DataProviderService, |
|
||||
GhostfolioScraperApiService, |
|
||||
ImpersonationService, |
|
||||
OrderService, |
|
||||
PrismaService, |
|
||||
RakutenRapidApiService, |
|
||||
YahooFinanceService |
|
||||
] |
|
||||
}) |
}) |
||||
export class OrderModule {} |
export class OrderModule {} |
||||
|
@ -1,8 +1,8 @@ |
|||||
import { CurrentRateService } from '@ghostfolio/api/app/core/current-rate.service'; |
import { DataProviderService } from '@ghostfolio/api/services/data-provider/data-provider.service'; |
||||
import { DataProviderService } from '@ghostfolio/api/services/data-provider.service'; |
|
||||
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data.service'; |
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data.service'; |
||||
import { Currency, MarketData } from '@prisma/client'; |
import { Currency, MarketData } from '@prisma/client'; |
||||
|
|
||||
|
import { CurrentRateService } from './current-rate.service'; |
||||
import { MarketDataService } from './market-data.service'; |
import { MarketDataService } from './market-data.service'; |
||||
|
|
||||
jest.mock('./market-data.service', () => { |
jest.mock('./market-data.service', () => { |
@ -1,13 +1,13 @@ |
|||||
import { GetValueObject } from '@ghostfolio/api/app/core/interfaces/get-value-object.interface'; |
import { DataProviderService } from '@ghostfolio/api/services/data-provider/data-provider.service'; |
||||
import { GetValueParams } from '@ghostfolio/api/app/core/interfaces/get-value-params.interface'; |
|
||||
import { GetValuesParams } from '@ghostfolio/api/app/core/interfaces/get-values-params.interface'; |
|
||||
import { DataProviderService } from '@ghostfolio/api/services/data-provider.service'; |
|
||||
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data.service'; |
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data.service'; |
||||
import { resetHours } from '@ghostfolio/common/helper'; |
import { resetHours } from '@ghostfolio/common/helper'; |
||||
import { Injectable } from '@nestjs/common'; |
import { Injectable } from '@nestjs/common'; |
||||
import { isBefore, isToday } from 'date-fns'; |
import { isBefore, isToday } from 'date-fns'; |
||||
import { flatten } from 'lodash'; |
import { flatten } from 'lodash'; |
||||
|
|
||||
|
import { GetValueObject } from './interfaces/get-value-object.interface'; |
||||
|
import { GetValueParams } from './interfaces/get-value-params.interface'; |
||||
|
import { GetValuesParams } from './interfaces/get-values-params.interface'; |
||||
import { MarketDataService } from './market-data.service'; |
import { MarketDataService } from './market-data.service'; |
||||
|
|
||||
@Injectable() |
@Injectable() |
@ -1,6 +1,7 @@ |
|||||
import { DateQuery } from '@ghostfolio/api/app/core/interfaces/date-query.interface'; |
|
||||
import { Currency } from '@prisma/client'; |
import { Currency } from '@prisma/client'; |
||||
|
|
||||
|
import { DateQuery } from './date-query.interface'; |
||||
|
|
||||
export interface GetValuesParams { |
export interface GetValuesParams { |
||||
currencies: { [symbol: string]: Currency }; |
currencies: { [symbol: string]: Currency }; |
||||
dateQuery: DateQuery; |
dateQuery: DateQuery; |
@ -0,0 +1,6 @@ |
|||||
|
import { TransactionPointSymbol } from './transaction-point-symbol.interface'; |
||||
|
|
||||
|
export interface TransactionPoint { |
||||
|
date: string; |
||||
|
items: TransactionPointSymbol[]; |
||||
|
} |
@ -1,50 +1,40 @@ |
|||||
import { AccountService } from '@ghostfolio/api/app/account/account.service'; |
import { AccountService } from '@ghostfolio/api/app/account/account.service'; |
||||
import { CacheService } from '@ghostfolio/api/app/cache/cache.service'; |
import { OrderModule } from '@ghostfolio/api/app/order/order.module'; |
||||
import { CurrentRateService } from '@ghostfolio/api/app/core/current-rate.service'; |
|
||||
import { MarketDataService } from '@ghostfolio/api/app/core/market-data.service'; |
|
||||
import { OrderService } from '@ghostfolio/api/app/order/order.service'; |
|
||||
import { RedisCacheModule } from '@ghostfolio/api/app/redis-cache/redis-cache.module'; |
|
||||
import { UserService } from '@ghostfolio/api/app/user/user.service'; |
import { UserService } from '@ghostfolio/api/app/user/user.service'; |
||||
import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; |
import { ConfigurationModule } from '@ghostfolio/api/services/configuration.module'; |
||||
import { DataGatheringService } from '@ghostfolio/api/services/data-gathering.service'; |
import { DataGatheringModule } from '@ghostfolio/api/services/data-gathering.module'; |
||||
import { DataProviderService } from '@ghostfolio/api/services/data-provider.service'; |
import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data-provider.module'; |
||||
import { AlphaVantageService } from '@ghostfolio/api/services/data-provider/alpha-vantage/alpha-vantage.service'; |
import { ExchangeRateDataModule } from '@ghostfolio/api/services/exchange-rate-data.module'; |
||||
import { GhostfolioScraperApiService } from '@ghostfolio/api/services/data-provider/ghostfolio-scraper-api/ghostfolio-scraper-api.service'; |
import { ImpersonationModule } from '@ghostfolio/api/services/impersonation.module'; |
||||
import { RakutenRapidApiService } from '@ghostfolio/api/services/data-provider/rakuten-rapid-api/rakuten-rapid-api.service'; |
import { PrismaModule } from '@ghostfolio/api/services/prisma.module'; |
||||
import { YahooFinanceService } from '@ghostfolio/api/services/data-provider/yahoo-finance/yahoo-finance.service'; |
|
||||
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data.service'; |
|
||||
import { ImpersonationService } from '@ghostfolio/api/services/impersonation.service'; |
|
||||
import { PrismaService } from '@ghostfolio/api/services/prisma.service'; |
|
||||
import { RulesService } from '@ghostfolio/api/services/rules.service'; |
|
||||
import { SymbolProfileService } from '@ghostfolio/api/services/symbol-profile.service'; |
import { SymbolProfileService } from '@ghostfolio/api/services/symbol-profile.service'; |
||||
import { Module } from '@nestjs/common'; |
import { Module } from '@nestjs/common'; |
||||
|
|
||||
|
import { CurrentRateService } from './current-rate.service'; |
||||
|
import { MarketDataService } from './market-data.service'; |
||||
import { PortfolioController } from './portfolio.controller'; |
import { PortfolioController } from './portfolio.controller'; |
||||
import { PortfolioService } from './portfolio.service'; |
import { PortfolioService } from './portfolio.service'; |
||||
|
import { RulesService } from './rules.service'; |
||||
|
|
||||
@Module({ |
@Module({ |
||||
imports: [RedisCacheModule], |
imports: [ |
||||
|
ConfigurationModule, |
||||
|
DataGatheringModule, |
||||
|
DataProviderModule, |
||||
|
ExchangeRateDataModule, |
||||
|
ImpersonationModule, |
||||
|
OrderModule, |
||||
|
PrismaModule |
||||
|
], |
||||
controllers: [PortfolioController], |
controllers: [PortfolioController], |
||||
providers: [ |
providers: [ |
||||
AccountService, |
AccountService, |
||||
AlphaVantageService, |
|
||||
CacheService, |
|
||||
CurrentRateService, |
CurrentRateService, |
||||
ConfigurationService, |
|
||||
DataGatheringService, |
|
||||
DataProviderService, |
|
||||
ExchangeRateDataService, |
|
||||
GhostfolioScraperApiService, |
|
||||
ImpersonationService, |
|
||||
MarketDataService, |
MarketDataService, |
||||
OrderService, |
|
||||
PortfolioService, |
PortfolioService, |
||||
PrismaService, |
|
||||
RakutenRapidApiService, |
|
||||
RulesService, |
RulesService, |
||||
SymbolProfileService, |
SymbolProfileService, |
||||
UserService, |
UserService |
||||
YahooFinanceService |
|
||||
] |
] |
||||
}) |
}) |
||||
export class PortfolioModule {} |
export class PortfolioModule {} |
||||
|
@ -1,9 +1,8 @@ |
|||||
import { RuleSettings } from '@ghostfolio/api/models/interfaces/rule-settings.interface'; |
import { RuleSettings } from '@ghostfolio/api/models/interfaces/rule-settings.interface'; |
||||
|
import { Rule } from '@ghostfolio/api/models/rule'; |
||||
import { Injectable } from '@nestjs/common'; |
import { Injectable } from '@nestjs/common'; |
||||
import { Currency } from '@prisma/client'; |
import { Currency } from '@prisma/client'; |
||||
|
|
||||
import { Rule } from '../models/rule'; |
|
||||
|
|
||||
@Injectable() |
@Injectable() |
||||
export class RulesService { |
export class RulesService { |
||||
public constructor() {} |
public constructor() {} |
@ -1,27 +1,14 @@ |
|||||
import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; |
import { ConfigurationModule } from '@ghostfolio/api/services/configuration.module'; |
||||
import { DataProviderService } from '@ghostfolio/api/services/data-provider.service'; |
import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data-provider.module'; |
||||
import { AlphaVantageService } from '@ghostfolio/api/services/data-provider/alpha-vantage/alpha-vantage.service'; |
import { PrismaModule } from '@ghostfolio/api/services/prisma.module'; |
||||
import { GhostfolioScraperApiService } from '@ghostfolio/api/services/data-provider/ghostfolio-scraper-api/ghostfolio-scraper-api.service'; |
|
||||
import { RakutenRapidApiService } from '@ghostfolio/api/services/data-provider/rakuten-rapid-api/rakuten-rapid-api.service'; |
|
||||
import { YahooFinanceService } from '@ghostfolio/api/services/data-provider/yahoo-finance/yahoo-finance.service'; |
|
||||
import { PrismaService } from '@ghostfolio/api/services/prisma.service'; |
|
||||
import { Module } from '@nestjs/common'; |
import { Module } from '@nestjs/common'; |
||||
|
|
||||
import { SymbolController } from './symbol.controller'; |
import { SymbolController } from './symbol.controller'; |
||||
import { SymbolService } from './symbol.service'; |
import { SymbolService } from './symbol.service'; |
||||
|
|
||||
@Module({ |
@Module({ |
||||
imports: [], |
imports: [ConfigurationModule, DataProviderModule, PrismaModule], |
||||
controllers: [SymbolController], |
controllers: [SymbolController], |
||||
providers: [ |
providers: [SymbolService] |
||||
AlphaVantageService, |
|
||||
ConfigurationService, |
|
||||
DataProviderService, |
|
||||
GhostfolioScraperApiService, |
|
||||
PrismaService, |
|
||||
RakutenRapidApiService, |
|
||||
SymbolService, |
|
||||
YahooFinanceService |
|
||||
] |
|
||||
}) |
}) |
||||
export class SymbolModule {} |
export class SymbolModule {} |
||||
|
@ -0,0 +1,8 @@ |
|||||
|
import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; |
||||
|
import { Module } from '@nestjs/common'; |
||||
|
|
||||
|
@Module({ |
||||
|
providers: [ConfigurationService], |
||||
|
exports: [ConfigurationService] |
||||
|
}) |
||||
|
export class ConfigurationModule {} |
@ -0,0 +1,12 @@ |
|||||
|
import { ConfigurationModule } from '@ghostfolio/api/services/configuration.module'; |
||||
|
import { DataGatheringService } from '@ghostfolio/api/services/data-gathering.service'; |
||||
|
import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data-provider.module'; |
||||
|
import { PrismaModule } from '@ghostfolio/api/services/prisma.module'; |
||||
|
import { Module } from '@nestjs/common'; |
||||
|
|
||||
|
@Module({ |
||||
|
imports: [ConfigurationModule, DataProviderModule, PrismaModule], |
||||
|
providers: [DataGatheringService], |
||||
|
exports: [DataGatheringService] |
||||
|
}) |
||||
|
export class DataGatheringModule {} |
@ -0,0 +1,22 @@ |
|||||
|
import { ConfigurationModule } from '@ghostfolio/api/services/configuration.module'; |
||||
|
import { GhostfolioScraperApiService } from '@ghostfolio/api/services/data-provider/ghostfolio-scraper-api/ghostfolio-scraper-api.service'; |
||||
|
import { RakutenRapidApiService } from '@ghostfolio/api/services/data-provider/rakuten-rapid-api/rakuten-rapid-api.service'; |
||||
|
import { YahooFinanceService } from '@ghostfolio/api/services/data-provider/yahoo-finance/yahoo-finance.service'; |
||||
|
import { PrismaModule } from '@ghostfolio/api/services/prisma.module'; |
||||
|
import { Module } from '@nestjs/common'; |
||||
|
|
||||
|
import { AlphaVantageService } from './alpha-vantage/alpha-vantage.service'; |
||||
|
import { DataProviderService } from './data-provider.service'; |
||||
|
|
||||
|
@Module({ |
||||
|
imports: [ConfigurationModule, PrismaModule], |
||||
|
providers: [ |
||||
|
AlphaVantageService, |
||||
|
DataProviderService, |
||||
|
GhostfolioScraperApiService, |
||||
|
RakutenRapidApiService, |
||||
|
YahooFinanceService |
||||
|
], |
||||
|
exports: [DataProviderService, GhostfolioScraperApiService] |
||||
|
}) |
||||
|
export class DataProviderModule {} |
@ -0,0 +1,10 @@ |
|||||
|
import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data-provider.module'; |
||||
|
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data.service'; |
||||
|
import { Module } from '@nestjs/common'; |
||||
|
|
||||
|
@Module({ |
||||
|
imports: [DataProviderModule], |
||||
|
providers: [ExchangeRateDataService], |
||||
|
exports: [ExchangeRateDataService] |
||||
|
}) |
||||
|
export class ExchangeRateDataModule {} |
@ -0,0 +1,10 @@ |
|||||
|
import { ImpersonationService } from '@ghostfolio/api/services/impersonation.service'; |
||||
|
import { PrismaModule } from '@ghostfolio/api/services/prisma.module'; |
||||
|
import { Module } from '@nestjs/common'; |
||||
|
|
||||
|
@Module({ |
||||
|
imports: [PrismaModule], |
||||
|
providers: [ImpersonationService], |
||||
|
exports: [ImpersonationService] |
||||
|
}) |
||||
|
export class ImpersonationModule {} |
@ -0,0 +1,8 @@ |
|||||
|
import { PrismaService } from '@ghostfolio/api/services/prisma.service'; |
||||
|
import { Module } from '@nestjs/common'; |
||||
|
|
||||
|
@Module({ |
||||
|
providers: [PrismaService], |
||||
|
exports: [PrismaService] |
||||
|
}) |
||||
|
export class PrismaModule {} |
Loading…
Reference in new issue