|
|
@ -3,6 +3,7 @@ import { RedisCacheService } from '@ghostfolio/api/app/redis-cache/redis-cache.s |
|
|
import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; |
|
|
import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; |
|
|
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; |
|
|
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; |
|
|
import { PortfolioSnapshotService } from '@ghostfolio/api/services/queues/portfolio-snapshot/portfolio-snapshot.service'; |
|
|
import { PortfolioSnapshotService } from '@ghostfolio/api/services/queues/portfolio-snapshot/portfolio-snapshot.service'; |
|
|
|
|
|
import { SubscriptionType } from '@ghostfolio/common/enums'; |
|
|
import { |
|
|
import { |
|
|
Activity, |
|
|
Activity, |
|
|
Filter, |
|
|
Filter, |
|
|
@ -35,6 +36,7 @@ export class PortfolioCalculatorFactory { |
|
|
currency, |
|
|
currency, |
|
|
filters = [], |
|
|
filters = [], |
|
|
usePortfolioSnapshotCache = true, |
|
|
usePortfolioSnapshotCache = true, |
|
|
|
|
|
subscriptionType, |
|
|
userId |
|
|
userId |
|
|
}: { |
|
|
}: { |
|
|
accountBalanceItems?: HistoricalDataItem[]; |
|
|
accountBalanceItems?: HistoricalDataItem[]; |
|
|
@ -43,6 +45,7 @@ export class PortfolioCalculatorFactory { |
|
|
currency: string; |
|
|
currency: string; |
|
|
filters?: Filter[]; |
|
|
filters?: Filter[]; |
|
|
usePortfolioSnapshotCache?: boolean; |
|
|
usePortfolioSnapshotCache?: boolean; |
|
|
|
|
|
subscriptionType?: SubscriptionType; |
|
|
userId: string; |
|
|
userId: string; |
|
|
}): PortfolioCalculator { |
|
|
}): PortfolioCalculator { |
|
|
switch (calculationType) { |
|
|
switch (calculationType) { |
|
|
@ -53,6 +56,7 @@ export class PortfolioCalculatorFactory { |
|
|
currency, |
|
|
currency, |
|
|
filters, |
|
|
filters, |
|
|
usePortfolioSnapshotCache, |
|
|
usePortfolioSnapshotCache, |
|
|
|
|
|
subscriptionType, |
|
|
userId, |
|
|
userId, |
|
|
configurationService: this.configurationService, |
|
|
configurationService: this.configurationService, |
|
|
currentRateService: this.currentRateService, |
|
|
currentRateService: this.currentRateService, |
|
|
@ -68,6 +72,7 @@ export class PortfolioCalculatorFactory { |
|
|
currency, |
|
|
currency, |
|
|
filters, |
|
|
filters, |
|
|
usePortfolioSnapshotCache, |
|
|
usePortfolioSnapshotCache, |
|
|
|
|
|
subscriptionType, |
|
|
userId, |
|
|
userId, |
|
|
configurationService: this.configurationService, |
|
|
configurationService: this.configurationService, |
|
|
currentRateService: this.currentRateService, |
|
|
currentRateService: this.currentRateService, |
|
|
@ -83,6 +88,7 @@ export class PortfolioCalculatorFactory { |
|
|
currency, |
|
|
currency, |
|
|
filters, |
|
|
filters, |
|
|
usePortfolioSnapshotCache, |
|
|
usePortfolioSnapshotCache, |
|
|
|
|
|
subscriptionType, |
|
|
userId, |
|
|
userId, |
|
|
configurationService: this.configurationService, |
|
|
configurationService: this.configurationService, |
|
|
currentRateService: this.currentRateService, |
|
|
currentRateService: this.currentRateService, |
|
|
@ -98,6 +104,7 @@ export class PortfolioCalculatorFactory { |
|
|
currency, |
|
|
currency, |
|
|
filters, |
|
|
filters, |
|
|
usePortfolioSnapshotCache, |
|
|
usePortfolioSnapshotCache, |
|
|
|
|
|
subscriptionType, |
|
|
userId, |
|
|
userId, |
|
|
configurationService: this.configurationService, |
|
|
configurationService: this.configurationService, |
|
|
currentRateService: this.currentRateService, |
|
|
currentRateService: this.currentRateService, |
|
|
|