diff --git a/apps/api/src/app/access/access.controller.ts b/apps/api/src/app/access/access.controller.ts index 87d2c2398..469b66b7c 100644 --- a/apps/api/src/app/access/access.controller.ts +++ b/apps/api/src/app/access/access.controller.ts @@ -1,7 +1,7 @@ +import { RequestWithUser } from '@ghostfolio/api/app/interfaces/request-with-user.type'; import { Controller, Get, Inject, UseGuards } from '@nestjs/common'; import { REQUEST } from '@nestjs/core'; import { AuthGuard } from '@nestjs/passport'; -import { RequestWithUser } from 'apps/api/src/app/interfaces/request-with-user.type'; import { AccessService } from './access.service'; import { Access } from './interfaces/access.interface'; diff --git a/apps/api/src/app/access/access.module.ts b/apps/api/src/app/access/access.module.ts index 4f810e03c..beaf98cad 100644 --- a/apps/api/src/app/access/access.module.ts +++ b/apps/api/src/app/access/access.module.ts @@ -1,6 +1,6 @@ +import { PrismaService } from '@ghostfolio/api/services/prisma.service'; import { Module } from '@nestjs/common'; -import { PrismaService } from '../../services/prisma.service'; import { AccessController } from './access.controller'; import { AccessService } from './access.service'; diff --git a/apps/api/src/app/access/access.service.ts b/apps/api/src/app/access/access.service.ts index 87f2b33d0..316837dec 100644 --- a/apps/api/src/app/access/access.service.ts +++ b/apps/api/src/app/access/access.service.ts @@ -1,7 +1,7 @@ +import { PrismaService } from '@ghostfolio/api/services/prisma.service'; import { Injectable } from '@nestjs/common'; import { Prisma } from '@prisma/client'; -import { PrismaService } from '../../services/prisma.service'; import { AccessWithGranteeUser } from './interfaces/access-with-grantee-user.type'; @Injectable() diff --git a/apps/api/src/app/admin/admin.controller.ts b/apps/api/src/app/admin/admin.controller.ts index 1d4d73856..0ae58bae1 100644 --- a/apps/api/src/app/admin/admin.controller.ts +++ b/apps/api/src/app/admin/admin.controller.ts @@ -1,3 +1,5 @@ +import { RequestWithUser } from '@ghostfolio/api/app/interfaces/request-with-user.type'; +import { DataGatheringService } from '@ghostfolio/api/services/data-gathering.service'; import { getPermissions, hasPermission, permissions } from '@ghostfolio/helper'; import { Controller, @@ -9,10 +11,8 @@ import { } from '@nestjs/common'; import { REQUEST } from '@nestjs/core'; import { AuthGuard } from '@nestjs/passport'; -import { RequestWithUser } from 'apps/api/src/app/interfaces/request-with-user.type'; import { StatusCodes, getReasonPhrase } from 'http-status-codes'; -import { DataGatheringService } from '../../services/data-gathering.service'; import { AdminService } from './admin.service'; import { AdminData } from './interfaces/admin-data.interface'; diff --git a/apps/api/src/app/admin/admin.module.ts b/apps/api/src/app/admin/admin.module.ts index 7f18fc68d..a78c435e3 100644 --- a/apps/api/src/app/admin/admin.module.ts +++ b/apps/api/src/app/admin/admin.module.ts @@ -1,14 +1,14 @@ +import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; +import { DataGatheringService } from '@ghostfolio/api/services/data-gathering.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 { ConfigurationService } from '../../services/configuration.service'; -import { DataGatheringService } from '../../services/data-gathering.service'; -import { DataProviderService } from '../../services/data-provider.service'; -import { AlphaVantageService } from '../../services/data-provider/alpha-vantage/alpha-vantage.service'; -import { GhostfolioScraperApiService } from '../../services/data-provider/ghostfolio-scraper-api/ghostfolio-scraper-api.service'; -import { RakutenRapidApiService } from '../../services/data-provider/rakuten-rapid-api/rakuten-rapid-api.service'; -import { YahooFinanceService } from '../../services/data-provider/yahoo-finance/yahoo-finance.service'; -import { ExchangeRateDataService } from '../../services/exchange-rate-data.service'; -import { PrismaService } from '../../services/prisma.service'; import { AdminController } from './admin.controller'; import { AdminService } from './admin.service'; diff --git a/apps/api/src/app/admin/admin.service.ts b/apps/api/src/app/admin/admin.service.ts index c5f7c10c9..46a5f01b8 100644 --- a/apps/api/src/app/admin/admin.service.ts +++ b/apps/api/src/app/admin/admin.service.ts @@ -1,8 +1,8 @@ +import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data.service'; +import { PrismaService } from '@ghostfolio/api/services/prisma.service'; import { Injectable } from '@nestjs/common'; import { Currency } from '@prisma/client'; -import { ExchangeRateDataService } from '../../services/exchange-rate-data.service'; -import { PrismaService } from '../../services/prisma.service'; import { AdminData } from './interfaces/admin-data.interface'; @Injectable() diff --git a/apps/api/src/app/auth/auth.controller.ts b/apps/api/src/app/auth/auth.controller.ts index c01d11064..cfafa080e 100644 --- a/apps/api/src/app/auth/auth.controller.ts +++ b/apps/api/src/app/auth/auth.controller.ts @@ -1,3 +1,4 @@ +import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; import { Controller, Get, @@ -10,7 +11,6 @@ import { import { AuthGuard } from '@nestjs/passport'; import { StatusCodes, getReasonPhrase } from 'http-status-codes'; -import { ConfigurationService } from '../../services/configuration.service'; import { AuthService } from './auth.service'; @Controller('auth') diff --git a/apps/api/src/app/auth/auth.module.ts b/apps/api/src/app/auth/auth.module.ts index 664aa7915..0519e2509 100644 --- a/apps/api/src/app/auth/auth.module.ts +++ b/apps/api/src/app/auth/auth.module.ts @@ -1,8 +1,8 @@ +import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; +import { PrismaService } from '@ghostfolio/api/services/prisma.service'; import { Module } from '@nestjs/common'; import { JwtModule } from '@nestjs/jwt'; -import { ConfigurationService } from '../../services/configuration.service'; -import { PrismaService } from '../../services/prisma.service'; import { UserService } from '../user/user.service'; import { AuthController } from './auth.controller'; import { AuthService } from './auth.service'; diff --git a/apps/api/src/app/auth/auth.service.ts b/apps/api/src/app/auth/auth.service.ts index 946e44f4d..b7d334773 100644 --- a/apps/api/src/app/auth/auth.service.ts +++ b/apps/api/src/app/auth/auth.service.ts @@ -1,7 +1,7 @@ +import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; import { Injectable, InternalServerErrorException } from '@nestjs/common'; import { JwtService } from '@nestjs/jwt'; -import { ConfigurationService } from '../../services/configuration.service'; import { UserService } from '../user/user.service'; import { ValidateOAuthLoginParams } from './interfaces/interfaces'; diff --git a/apps/api/src/app/auth/google.strategy.ts b/apps/api/src/app/auth/google.strategy.ts index 8412dc37c..5856acb1c 100644 --- a/apps/api/src/app/auth/google.strategy.ts +++ b/apps/api/src/app/auth/google.strategy.ts @@ -1,9 +1,9 @@ +import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; import { Injectable } from '@nestjs/common'; import { PassportStrategy } from '@nestjs/passport'; import { Provider } from '@prisma/client'; import { Strategy } from 'passport-google-oauth20'; -import { ConfigurationService } from '../../services/configuration.service'; import { AuthService } from './auth.service'; @Injectable() diff --git a/apps/api/src/app/auth/jwt.strategy.ts b/apps/api/src/app/auth/jwt.strategy.ts index 967dbcce9..29b7deb2a 100644 --- a/apps/api/src/app/auth/jwt.strategy.ts +++ b/apps/api/src/app/auth/jwt.strategy.ts @@ -1,9 +1,9 @@ +import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; +import { PrismaService } from '@ghostfolio/api/services/prisma.service'; import { Injectable, UnauthorizedException } from '@nestjs/common'; import { PassportStrategy } from '@nestjs/passport'; import { ExtractJwt, Strategy } from 'passport-jwt'; -import { ConfigurationService } from '../../services/configuration.service'; -import { PrismaService } from '../../services/prisma.service'; import { UserService } from '../user/user.service'; @Injectable() diff --git a/apps/api/src/app/cache/cache.controller.ts b/apps/api/src/app/cache/cache.controller.ts index 78ae4f409..5567f6053 100644 --- a/apps/api/src/app/cache/cache.controller.ts +++ b/apps/api/src/app/cache/cache.controller.ts @@ -1,7 +1,7 @@ +import { RequestWithUser } from '@ghostfolio/api/app/interfaces/request-with-user.type'; import { Controller, Inject, Param, Post, UseGuards } from '@nestjs/common'; import { REQUEST } from '@nestjs/core'; import { AuthGuard } from '@nestjs/passport'; -import { RequestWithUser } from 'apps/api/src/app/interfaces/request-with-user.type'; import { RedisCacheService } from '../redis-cache/redis-cache.service'; import { CacheService } from './cache.service'; diff --git a/apps/api/src/app/cache/cache.module.ts b/apps/api/src/app/cache/cache.module.ts index 88c5080a2..7c5a01309 100644 --- a/apps/api/src/app/cache/cache.module.ts +++ b/apps/api/src/app/cache/cache.module.ts @@ -1,6 +1,6 @@ +import { PrismaService } from '@ghostfolio/api/services/prisma.service'; import { Module } from '@nestjs/common'; -import { PrismaService } from '../../services/prisma.service'; import { RedisCacheModule } from '../redis-cache/redis-cache.module'; import { CacheController } from './cache.controller'; import { CacheService } from './cache.service'; diff --git a/apps/api/src/app/cache/cache.service.ts b/apps/api/src/app/cache/cache.service.ts index 8e8c92cae..357c0fdff 100644 --- a/apps/api/src/app/cache/cache.service.ts +++ b/apps/api/src/app/cache/cache.service.ts @@ -1,7 +1,5 @@ +import { PrismaService } from '@ghostfolio/api/services/prisma.service'; import { Injectable } from '@nestjs/common'; -import { Prisma, User } from '@prisma/client'; - -import { PrismaService } from '../../services/prisma.service'; @Injectable() export class CacheService { diff --git a/apps/api/src/app/experimental/experimental.controller.ts b/apps/api/src/app/experimental/experimental.controller.ts index d9795e988..88a24adc0 100644 --- a/apps/api/src/app/experimental/experimental.controller.ts +++ b/apps/api/src/app/experimental/experimental.controller.ts @@ -1,3 +1,4 @@ +import { RequestWithUser } from '@ghostfolio/api/app/interfaces/request-with-user.type'; import { baseCurrency, benchmarks, @@ -14,7 +15,6 @@ import { Post } from '@nestjs/common'; import { REQUEST } from '@nestjs/core'; -import { RequestWithUser } from 'apps/api/src/app/interfaces/request-with-user.type'; import { parse } from 'date-fns'; import { StatusCodes, getReasonPhrase } from 'http-status-codes'; diff --git a/apps/api/src/app/experimental/experimental.module.ts b/apps/api/src/app/experimental/experimental.module.ts index 0abc8e105..3ab67ffb0 100644 --- a/apps/api/src/app/experimental/experimental.module.ts +++ b/apps/api/src/app/experimental/experimental.module.ts @@ -1,14 +1,14 @@ +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 { RulesService } from '@ghostfolio/api/services/rules.service'; import { Module } from '@nestjs/common'; -import { ConfigurationService } from '../../services/configuration.service'; -import { DataProviderService } from '../../services/data-provider.service'; -import { AlphaVantageService } from '../../services/data-provider/alpha-vantage/alpha-vantage.service'; -import { GhostfolioScraperApiService } from '../../services/data-provider/ghostfolio-scraper-api/ghostfolio-scraper-api.service'; -import { RakutenRapidApiService } from '../../services/data-provider/rakuten-rapid-api/rakuten-rapid-api.service'; -import { YahooFinanceService } from '../../services/data-provider/yahoo-finance/yahoo-finance.service'; -import { ExchangeRateDataService } from '../../services/exchange-rate-data.service'; -import { PrismaService } from '../../services/prisma.service'; -import { RulesService } from '../../services/rules.service'; import { ExperimentalController } from './experimental.controller'; import { ExperimentalService } from './experimental.service'; diff --git a/apps/api/src/app/experimental/experimental.service.ts b/apps/api/src/app/experimental/experimental.service.ts index 478bc9923..0cdff4eaf 100644 --- a/apps/api/src/app/experimental/experimental.service.ts +++ b/apps/api/src/app/experimental/experimental.service.ts @@ -1,12 +1,12 @@ +import { Portfolio } from '@ghostfolio/api/models/portfolio'; +import { DataProviderService } from '@ghostfolio/api/services/data-provider.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 { Injectable } from '@nestjs/common'; import { Currency, Type } from '@prisma/client'; import { parseISO } from 'date-fns'; -import { Portfolio } from '../../models/portfolio'; -import { DataProviderService } from '../../services/data-provider.service'; -import { ExchangeRateDataService } from '../../services/exchange-rate-data.service'; -import { PrismaService } from '../../services/prisma.service'; -import { RulesService } from '../../services/rules.service'; import { OrderWithPlatform } from '../order/interfaces/order-with-platform.type'; import { CreateOrderDto } from './create-order.dto'; import { Data } from './interfaces/data.interface'; diff --git a/apps/api/src/app/info/info.module.ts b/apps/api/src/app/info/info.module.ts index 3c82b8a13..8e3b49bb7 100644 --- a/apps/api/src/app/info/info.module.ts +++ b/apps/api/src/app/info/info.module.ts @@ -1,8 +1,8 @@ +import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; +import { PrismaService } from '@ghostfolio/api/services/prisma.service'; import { Module } from '@nestjs/common'; import { JwtModule } from '@nestjs/jwt'; -import { ConfigurationService } from '../../services/configuration.service'; -import { PrismaService } from '../../services/prisma.service'; import { InfoController } from './info.controller'; import { InfoService } from './info.service'; diff --git a/apps/api/src/app/info/info.service.ts b/apps/api/src/app/info/info.service.ts index 88057a348..c08407803 100644 --- a/apps/api/src/app/info/info.service.ts +++ b/apps/api/src/app/info/info.service.ts @@ -1,10 +1,10 @@ +import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; +import { PrismaService } from '@ghostfolio/api/services/prisma.service'; import { permissions } from '@ghostfolio/helper'; import { Injectable } from '@nestjs/common'; import { JwtService } from '@nestjs/jwt'; import { Currency } from '@prisma/client'; -import { ConfigurationService } from '../../services/configuration.service'; -import { PrismaService } from '../../services/prisma.service'; import { InfoItem } from './interfaces/info-item.interface'; @Injectable() diff --git a/apps/api/src/app/order/order.controller.ts b/apps/api/src/app/order/order.controller.ts index e62667f6c..c3a5febab 100644 --- a/apps/api/src/app/order/order.controller.ts +++ b/apps/api/src/app/order/order.controller.ts @@ -1,3 +1,6 @@ +import { RequestWithUser } from '@ghostfolio/api/app/interfaces/request-with-user.type'; +import { nullifyValuesInObjects } from '@ghostfolio/api/helper/object.helper'; +import { ImpersonationService } from '@ghostfolio/api/services/impersonation.service'; import { getPermissions, hasPermission, permissions } from '@ghostfolio/helper'; import { Body, @@ -15,12 +18,9 @@ import { import { REQUEST } from '@nestjs/core'; import { AuthGuard } from '@nestjs/passport'; import { Order as OrderModel } from '@prisma/client'; -import { RequestWithUser } from 'apps/api/src/app/interfaces/request-with-user.type'; import { parseISO } from 'date-fns'; import { StatusCodes, getReasonPhrase } from 'http-status-codes'; -import { nullifyValuesInObjects } from '../../helper/object.helper'; -import { ImpersonationService } from '../../services/impersonation.service'; import { CreateOrderDto } from './create-order.dto'; import { OrderService } from './order.service'; import { UpdateOrderDto } from './update-order.dto'; diff --git a/apps/api/src/app/order/order.module.ts b/apps/api/src/app/order/order.module.ts index d7f7a4482..93bcd3cb3 100644 --- a/apps/api/src/app/order/order.module.ts +++ b/apps/api/src/app/order/order.module.ts @@ -1,14 +1,14 @@ +import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; +import { DataGatheringService } from '@ghostfolio/api/services/data-gathering.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 { ImpersonationService } from '@ghostfolio/api/services/impersonation.service'; +import { PrismaService } from '@ghostfolio/api/services/prisma.service'; import { Module } from '@nestjs/common'; -import { ConfigurationService } from '../../services/configuration.service'; -import { DataGatheringService } from '../../services/data-gathering.service'; -import { DataProviderService } from '../../services/data-provider.service'; -import { AlphaVantageService } from '../../services/data-provider/alpha-vantage/alpha-vantage.service'; -import { GhostfolioScraperApiService } from '../../services/data-provider/ghostfolio-scraper-api/ghostfolio-scraper-api.service'; -import { RakutenRapidApiService } from '../../services/data-provider/rakuten-rapid-api/rakuten-rapid-api.service'; -import { YahooFinanceService } from '../../services/data-provider/yahoo-finance/yahoo-finance.service'; -import { ImpersonationService } from '../../services/impersonation.service'; -import { PrismaService } from '../../services/prisma.service'; import { CacheService } from '../cache/cache.service'; import { RedisCacheModule } from '../redis-cache/redis-cache.module'; import { OrderController } from './order.controller'; diff --git a/apps/api/src/app/order/order.service.ts b/apps/api/src/app/order/order.service.ts index a1201a19d..f12e3aa73 100644 --- a/apps/api/src/app/order/order.service.ts +++ b/apps/api/src/app/order/order.service.ts @@ -1,8 +1,8 @@ +import { DataGatheringService } from '@ghostfolio/api/services/data-gathering.service'; +import { PrismaService } from '@ghostfolio/api/services/prisma.service'; import { Injectable } from '@nestjs/common'; import { Order, Prisma } from '@prisma/client'; -import { DataGatheringService } from '../../services/data-gathering.service'; -import { PrismaService } from '../../services/prisma.service'; import { CacheService } from '../cache/cache.service'; import { RedisCacheService } from '../redis-cache/redis-cache.service'; import { OrderWithPlatform } from './interfaces/order-with-platform.type'; diff --git a/apps/api/src/app/portfolio/portfolio.controller.ts b/apps/api/src/app/portfolio/portfolio.controller.ts index 0a997aa4c..449badab1 100644 --- a/apps/api/src/app/portfolio/portfolio.controller.ts +++ b/apps/api/src/app/portfolio/portfolio.controller.ts @@ -1,3 +1,9 @@ +import { + hasNotDefinedValuesInObject, + nullifyValuesInObject +} from '@ghostfolio/api/helper/object.helper'; +import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data.service'; +import { ImpersonationService } from '@ghostfolio/api/services/impersonation.service'; import { getPermissions, hasPermission, permissions } from '@ghostfolio/helper'; import { Controller, @@ -15,12 +21,6 @@ import { AuthGuard } from '@nestjs/passport'; import { Response } from 'express'; import { StatusCodes, getReasonPhrase } from 'http-status-codes'; -import { - hasNotDefinedValuesInObject, - nullifyValuesInObject -} from '../../helper/object.helper'; -import { ExchangeRateDataService } from '../../services/exchange-rate-data.service'; -import { ImpersonationService } from '../../services/impersonation.service'; import { RequestWithUser } from '../interfaces/request-with-user.type'; import { PortfolioItem } from './interfaces/portfolio-item.interface'; import { PortfolioOverview } from './interfaces/portfolio-overview.interface'; diff --git a/apps/api/src/app/portfolio/portfolio.module.ts b/apps/api/src/app/portfolio/portfolio.module.ts index 8559c348e..88fe47c64 100644 --- a/apps/api/src/app/portfolio/portfolio.module.ts +++ b/apps/api/src/app/portfolio/portfolio.module.ts @@ -1,16 +1,16 @@ +import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; +import { DataGatheringService } from '@ghostfolio/api/services/data-gathering.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 { ImpersonationService } from '@ghostfolio/api/services/impersonation.service'; +import { PrismaService } from '@ghostfolio/api/services/prisma.service'; +import { RulesService } from '@ghostfolio/api/services/rules.service'; import { Module } from '@nestjs/common'; -import { ConfigurationService } from '../../services/configuration.service'; -import { DataGatheringService } from '../../services/data-gathering.service'; -import { DataProviderService } from '../../services/data-provider.service'; -import { AlphaVantageService } from '../../services/data-provider/alpha-vantage/alpha-vantage.service'; -import { GhostfolioScraperApiService } from '../../services/data-provider/ghostfolio-scraper-api/ghostfolio-scraper-api.service'; -import { RakutenRapidApiService } from '../../services/data-provider/rakuten-rapid-api/rakuten-rapid-api.service'; -import { YahooFinanceService } from '../../services/data-provider/yahoo-finance/yahoo-finance.service'; -import { ExchangeRateDataService } from '../../services/exchange-rate-data.service'; -import { ImpersonationService } from '../../services/impersonation.service'; -import { PrismaService } from '../../services/prisma.service'; -import { RulesService } from '../../services/rules.service'; import { CacheService } from '../cache/cache.service'; import { OrderService } from '../order/order.service'; import { RedisCacheModule } from '../redis-cache/redis-cache.module'; diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index 6c697e325..df7d33c09 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -1,6 +1,12 @@ +import { RequestWithUser } from '@ghostfolio/api/app/interfaces/request-with-user.type'; +import { Portfolio } from '@ghostfolio/api/models/portfolio'; +import { DataProviderService } from '@ghostfolio/api/services/data-provider.service'; +import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data.service'; +import { ImpersonationService } from '@ghostfolio/api/services/impersonation.service'; +import { IOrder } from '@ghostfolio/api/services/interfaces/interfaces'; +import { RulesService } from '@ghostfolio/api/services/rules.service'; import { Inject, Injectable } from '@nestjs/common'; import { REQUEST } from '@nestjs/core'; -import { RequestWithUser } from 'apps/api/src/app/interfaces/request-with-user.type'; import { add, format, @@ -9,7 +15,6 @@ import { getYear, isAfter, isSameDay, - parse, parseISO, setDate, setMonth, @@ -18,12 +23,6 @@ import { import { isEmpty } from 'lodash'; import * as roundTo from 'round-to'; -import { Portfolio } from '../../models/portfolio'; -import { DataProviderService } from '../../services/data-provider.service'; -import { ExchangeRateDataService } from '../../services/exchange-rate-data.service'; -import { ImpersonationService } from '../../services/impersonation.service'; -import { IOrder } from '../../services/interfaces/interfaces'; -import { RulesService } from '../../services/rules.service'; import { OrderService } from '../order/order.service'; import { RedisCacheService } from '../redis-cache/redis-cache.service'; import { UserService } from '../user/user.service'; diff --git a/apps/api/src/app/redis-cache/redis-cache.module.ts b/apps/api/src/app/redis-cache/redis-cache.module.ts index 9e79a7b25..e3275276b 100644 --- a/apps/api/src/app/redis-cache/redis-cache.module.ts +++ b/apps/api/src/app/redis-cache/redis-cache.module.ts @@ -1,8 +1,8 @@ +import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; import { CacheModule, Module } from '@nestjs/common'; import { ConfigModule, ConfigService } from '@nestjs/config'; import * as redisStore from 'cache-manager-redis-store'; -import { ConfigurationService } from '../../services/configuration.service'; import { RedisCacheService } from './redis-cache.service'; @Module({ diff --git a/apps/api/src/app/redis-cache/redis-cache.service.ts b/apps/api/src/app/redis-cache/redis-cache.service.ts index 1da9f06a9..677fcb7b1 100644 --- a/apps/api/src/app/redis-cache/redis-cache.service.ts +++ b/apps/api/src/app/redis-cache/redis-cache.service.ts @@ -1,8 +1,7 @@ +import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; import { CACHE_MANAGER, Inject, Injectable } from '@nestjs/common'; import { Cache } from 'cache-manager'; -import { ConfigurationService } from '../../services/configuration.service'; - @Injectable() export class RedisCacheService { public constructor( diff --git a/apps/api/src/app/symbol/symbol.controller.ts b/apps/api/src/app/symbol/symbol.controller.ts index 7e87c1104..d2dc68c15 100644 --- a/apps/api/src/app/symbol/symbol.controller.ts +++ b/apps/api/src/app/symbol/symbol.controller.ts @@ -1,3 +1,4 @@ +import { RequestWithUser } from '@ghostfolio/api/app/interfaces/request-with-user.type'; import { Controller, Get, @@ -9,7 +10,6 @@ import { } from '@nestjs/common'; import { REQUEST } from '@nestjs/core'; import { AuthGuard } from '@nestjs/passport'; -import { RequestWithUser } from 'apps/api/src/app/interfaces/request-with-user.type'; import { StatusCodes, getReasonPhrase } from 'http-status-codes'; import { LookupItem } from './interfaces/lookup-item.interface'; diff --git a/apps/api/src/app/symbol/symbol.module.ts b/apps/api/src/app/symbol/symbol.module.ts index ad3bf7558..2fb3a9d76 100644 --- a/apps/api/src/app/symbol/symbol.module.ts +++ b/apps/api/src/app/symbol/symbol.module.ts @@ -1,12 +1,12 @@ +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 { PrismaService } from '@ghostfolio/api/services/prisma.service'; import { Module } from '@nestjs/common'; -import { ConfigurationService } from '../../services/configuration.service'; -import { DataProviderService } from '../../services/data-provider.service'; -import { AlphaVantageService } from '../../services/data-provider/alpha-vantage/alpha-vantage.service'; -import { GhostfolioScraperApiService } from '../../services/data-provider/ghostfolio-scraper-api/ghostfolio-scraper-api.service'; -import { RakutenRapidApiService } from '../../services/data-provider/rakuten-rapid-api/rakuten-rapid-api.service'; -import { YahooFinanceService } from '../../services/data-provider/yahoo-finance/yahoo-finance.service'; -import { PrismaService } from '../../services/prisma.service'; import { SymbolController } from './symbol.controller'; import { SymbolService } from './symbol.service'; diff --git a/apps/api/src/app/symbol/symbol.service.ts b/apps/api/src/app/symbol/symbol.service.ts index db56e8459..1bb0435bb 100644 --- a/apps/api/src/app/symbol/symbol.service.ts +++ b/apps/api/src/app/symbol/symbol.service.ts @@ -1,9 +1,9 @@ +import { DataProviderService } from '@ghostfolio/api/services/data-provider.service'; +import { convertFromYahooSymbol } from '@ghostfolio/api/services/data-provider/yahoo-finance/yahoo-finance.service'; import { Injectable } from '@nestjs/common'; import { Currency } from '@prisma/client'; -import { convertFromYahooSymbol } from 'apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service'; import * as bent from 'bent'; -import { DataProviderService } from '../../services/data-provider.service'; import { LookupItem } from './interfaces/lookup-item.interface'; import { SymbolItem } from './interfaces/symbol-item.interface'; diff --git a/apps/api/src/app/user/user.controller.ts b/apps/api/src/app/user/user.controller.ts index 2f1ff0abc..c843c1ec4 100644 --- a/apps/api/src/app/user/user.controller.ts +++ b/apps/api/src/app/user/user.controller.ts @@ -1,3 +1,4 @@ +import { RequestWithUser } from '@ghostfolio/api/app/interfaces/request-with-user.type'; import { getPermissions, hasPermission, permissions } from '@ghostfolio/helper'; import { Body, @@ -14,7 +15,6 @@ import { REQUEST } from '@nestjs/core'; import { JwtService } from '@nestjs/jwt'; import { AuthGuard } from '@nestjs/passport'; import { Provider } from '@prisma/client'; -import { RequestWithUser } from 'apps/api/src/app/interfaces/request-with-user.type'; import { StatusCodes, getReasonPhrase } from 'http-status-codes'; import { UserItem } from './interfaces/user-item.interface'; diff --git a/apps/api/src/app/user/user.module.ts b/apps/api/src/app/user/user.module.ts index 7dfc3b4fe..df9439c80 100644 --- a/apps/api/src/app/user/user.module.ts +++ b/apps/api/src/app/user/user.module.ts @@ -1,8 +1,8 @@ +import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; +import { PrismaService } from '@ghostfolio/api/services/prisma.service'; import { Module } from '@nestjs/common'; import { JwtModule } from '@nestjs/jwt'; -import { ConfigurationService } from '../../services/configuration.service'; -import { PrismaService } from '../../services/prisma.service'; import { UserController } from './user.controller'; import { UserService } from './user.service'; diff --git a/apps/api/src/app/user/user.service.ts b/apps/api/src/app/user/user.service.ts index a1eab374c..8aacebcee 100644 --- a/apps/api/src/app/user/user.service.ts +++ b/apps/api/src/app/user/user.service.ts @@ -1,3 +1,5 @@ +import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; +import { PrismaService } from '@ghostfolio/api/services/prisma.service'; import { getPermissions, locale, @@ -8,8 +10,6 @@ import { Injectable } from '@nestjs/common'; import { Currency, Prisma, Provider, User } from '@prisma/client'; import { add } from 'date-fns'; -import { ConfigurationService } from '../../services/configuration.service'; -import { PrismaService } from '../../services/prisma.service'; import { UserWithSettings } from '../interfaces/user-with-settings'; import { User as IUser } from './interfaces/user.interface'; diff --git a/apps/api/src/models/interfaces/portfolio.interface.ts b/apps/api/src/models/interfaces/portfolio.interface.ts index b280339b6..a3e377b58 100644 --- a/apps/api/src/models/interfaces/portfolio.interface.ts +++ b/apps/api/src/models/interfaces/portfolio.interface.ts @@ -1,7 +1,7 @@ import { PortfolioItem, Position -} from 'apps/api/src/app/portfolio/interfaces/portfolio-item.interface'; +} from '@ghostfolio/api/app/portfolio/interfaces/portfolio-item.interface'; import { Order } from '../order'; diff --git a/apps/api/src/models/interfaces/rule.interface.ts b/apps/api/src/models/interfaces/rule.interface.ts index 0a1434874..72b6cf606 100644 --- a/apps/api/src/models/interfaces/rule.interface.ts +++ b/apps/api/src/models/interfaces/rule.interface.ts @@ -1,4 +1,5 @@ -import { PortfolioPosition } from '../../app/portfolio/interfaces/portfolio-position.interface'; +import { PortfolioPosition } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-position.interface'; + import { EvaluationResult } from './evaluation-result.interface'; export interface RuleInterface { diff --git a/apps/api/src/models/portfolio.ts b/apps/api/src/models/portfolio.ts index e5b0efa64..2c5f573fe 100644 --- a/apps/api/src/models/portfolio.ts +++ b/apps/api/src/models/portfolio.ts @@ -1,8 +1,8 @@ -import { getToday, getYesterday, resetHours } from '@ghostfolio/helper'; import { PortfolioItem, Position -} from 'apps/api/src/app/portfolio/interfaces/portfolio-item.interface'; +} from '@ghostfolio/api/app/portfolio/interfaces/portfolio-item.interface'; +import { getToday, getYesterday, resetHours } from '@ghostfolio/helper'; import { add, format, diff --git a/apps/api/src/models/rules/currency-cluster-risk/base-currency-current-investment.ts b/apps/api/src/models/rules/currency-cluster-risk/base-currency-current-investment.ts index e77f80043..8f266fc7a 100644 --- a/apps/api/src/models/rules/currency-cluster-risk/base-currency-current-investment.ts +++ b/apps/api/src/models/rules/currency-cluster-risk/base-currency-current-investment.ts @@ -1,5 +1,5 @@ -import { PortfolioPosition } from 'apps/api/src/app/portfolio/interfaces/portfolio-position.interface'; -import { ExchangeRateDataService } from 'apps/api/src/services/exchange-rate-data.service'; +import { PortfolioPosition } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-position.interface'; +import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data.service'; import { Rule } from '../../rule'; diff --git a/apps/api/src/models/rules/currency-cluster-risk/base-currency-initial-investment.ts b/apps/api/src/models/rules/currency-cluster-risk/base-currency-initial-investment.ts index a2b86318d..1282ec602 100644 --- a/apps/api/src/models/rules/currency-cluster-risk/base-currency-initial-investment.ts +++ b/apps/api/src/models/rules/currency-cluster-risk/base-currency-initial-investment.ts @@ -1,4 +1,4 @@ -import { PortfolioPosition } from 'apps/api/src/app/portfolio/interfaces/portfolio-position.interface'; +import { PortfolioPosition } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-position.interface'; import { ExchangeRateDataService } from 'apps/api/src/services/exchange-rate-data.service'; import { Rule } from '../../rule'; diff --git a/apps/api/src/models/rules/currency-cluster-risk/current-investment.ts b/apps/api/src/models/rules/currency-cluster-risk/current-investment.ts index 4558fb940..ae937e244 100644 --- a/apps/api/src/models/rules/currency-cluster-risk/current-investment.ts +++ b/apps/api/src/models/rules/currency-cluster-risk/current-investment.ts @@ -1,4 +1,4 @@ -import { PortfolioPosition } from 'apps/api/src/app/portfolio/interfaces/portfolio-position.interface'; +import { PortfolioPosition } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-position.interface'; import { ExchangeRateDataService } from 'apps/api/src/services/exchange-rate-data.service'; import { Rule } from '../../rule'; diff --git a/apps/api/src/models/rules/currency-cluster-risk/initial-investment.ts b/apps/api/src/models/rules/currency-cluster-risk/initial-investment.ts index d852739f0..da800be6c 100644 --- a/apps/api/src/models/rules/currency-cluster-risk/initial-investment.ts +++ b/apps/api/src/models/rules/currency-cluster-risk/initial-investment.ts @@ -1,4 +1,4 @@ -import { PortfolioPosition } from 'apps/api/src/app/portfolio/interfaces/portfolio-position.interface'; +import { PortfolioPosition } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-position.interface'; import { ExchangeRateDataService } from 'apps/api/src/services/exchange-rate-data.service'; import { Rule } from '../../rule'; diff --git a/apps/api/src/models/rules/fees/fee-ratio-initial-investment.ts b/apps/api/src/models/rules/fees/fee-ratio-initial-investment.ts index 28d07f07c..4bf353549 100644 --- a/apps/api/src/models/rules/fees/fee-ratio-initial-investment.ts +++ b/apps/api/src/models/rules/fees/fee-ratio-initial-investment.ts @@ -1,4 +1,4 @@ -import { PortfolioPosition } from 'apps/api/src/app/portfolio/interfaces/portfolio-position.interface'; +import { PortfolioPosition } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-position.interface'; import { ExchangeRateDataService } from 'apps/api/src/services/exchange-rate-data.service'; import { Rule } from '../../rule'; diff --git a/apps/api/src/models/rules/platform-cluster-risk/current-investment.ts b/apps/api/src/models/rules/platform-cluster-risk/current-investment.ts index 07033e4bc..b9fb3efa7 100644 --- a/apps/api/src/models/rules/platform-cluster-risk/current-investment.ts +++ b/apps/api/src/models/rules/platform-cluster-risk/current-investment.ts @@ -1,5 +1,5 @@ -import { PortfolioPosition } from 'apps/api/src/app/portfolio/interfaces/portfolio-position.interface'; -import { ExchangeRateDataService } from 'apps/api/src/services/exchange-rate-data.service'; +import { PortfolioPosition } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-position.interface'; +import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data.service'; import { Rule } from '../../rule'; diff --git a/apps/api/src/models/rules/platform-cluster-risk/initial-investment.ts b/apps/api/src/models/rules/platform-cluster-risk/initial-investment.ts index 0e6580efd..1bd83d7e0 100644 --- a/apps/api/src/models/rules/platform-cluster-risk/initial-investment.ts +++ b/apps/api/src/models/rules/platform-cluster-risk/initial-investment.ts @@ -1,4 +1,4 @@ -import { PortfolioPosition } from 'apps/api/src/app/portfolio/interfaces/portfolio-position.interface'; +import { PortfolioPosition } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-position.interface'; import { ExchangeRateDataService } from 'apps/api/src/services/exchange-rate-data.service'; import { Rule } from '../../rule'; diff --git a/apps/api/src/models/rules/platform-cluster-risk/single-platform.ts b/apps/api/src/models/rules/platform-cluster-risk/single-platform.ts index 714184bae..531453909 100644 --- a/apps/api/src/models/rules/platform-cluster-risk/single-platform.ts +++ b/apps/api/src/models/rules/platform-cluster-risk/single-platform.ts @@ -1,4 +1,4 @@ -import { PortfolioPosition } from 'apps/api/src/app/portfolio/interfaces/portfolio-position.interface'; +import { PortfolioPosition } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-position.interface'; import { ExchangeRateDataService } from 'apps/api/src/services/exchange-rate-data.service'; import { Rule } from '../../rule'; diff --git a/apps/client/src/app/app.component.ts b/apps/client/src/app/app.component.ts index 1b2d4fa52..71fe416f5 100644 --- a/apps/client/src/app/app.component.ts +++ b/apps/client/src/app/app.component.ts @@ -6,6 +6,8 @@ import { OnInit } from '@angular/core'; import { NavigationEnd, Router } from '@angular/router'; +import { InfoItem } from '@ghostfolio/api/app/info/interfaces/info-item.interface'; +import { User } from '@ghostfolio/api/app/user/interfaces/user.interface'; import { hasPermission, permissions, @@ -13,8 +15,6 @@ import { secondaryColorHex } from '@ghostfolio/helper'; import { MaterialCssVarsService } from 'angular-material-css-vars'; -import { InfoItem } from 'apps/api/src/app/info/interfaces/info-item.interface'; -import { User } from 'apps/api/src/app/user/interfaces/user.interface'; import { Subject } from 'rxjs'; import { filter, takeUntil } from 'rxjs/operators'; diff --git a/apps/client/src/app/components/access-table/access-table.component.ts b/apps/client/src/app/components/access-table/access-table.component.ts index 313efb7f2..b7004baa8 100644 --- a/apps/client/src/app/components/access-table/access-table.component.ts +++ b/apps/client/src/app/components/access-table/access-table.component.ts @@ -6,7 +6,7 @@ import { OnInit } from '@angular/core'; import { MatTableDataSource } from '@angular/material/table'; -import { Access } from 'apps/api/src/app/access/interfaces/access.interface'; +import { Access } from '@ghostfolio/api/app/access/interfaces/access.interface'; @Component({ selector: 'gf-access-table', diff --git a/apps/client/src/app/components/header/header.component.ts b/apps/client/src/app/components/header/header.component.ts index d0669463a..84c666758 100644 --- a/apps/client/src/app/components/header/header.component.ts +++ b/apps/client/src/app/components/header/header.component.ts @@ -6,17 +6,16 @@ import { } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { Router } from '@angular/router'; +import { InfoItem } from '@ghostfolio/api/app/info/interfaces/info-item.interface'; +import { User } from '@ghostfolio/api/app/user/interfaces/user.interface'; +import { LoginWithAccessTokenDialog } from '@ghostfolio/client/pages/login/login-with-access-token-dialog/login-with-access-token-dialog.component'; +import { DataService } from '@ghostfolio/client/services/data.service'; +import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service'; +import { TokenStorageService } from '@ghostfolio/client/services/token-storage.service'; import { hasPermission, permissions } from '@ghostfolio/helper'; -import { InfoItem } from 'apps/api/src/app/info/interfaces/info-item.interface'; -import { User } from 'apps/api/src/app/user/interfaces/user.interface'; import { EMPTY, Subject } from 'rxjs'; import { catchError, takeUntil } from 'rxjs/operators'; -import { LoginWithAccessTokenDialog } from '../../pages/login/login-with-access-token-dialog/login-with-access-token-dialog.component'; -import { DataService } from '../../services/data.service'; -import { ImpersonationStorageService } from '../../services/impersonation-storage.service'; -import { TokenStorageService } from '../../services/token-storage.service'; - @Component({ selector: 'gf-header', changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/apps/client/src/app/components/header/header.module.ts b/apps/client/src/app/components/header/header.module.ts index 44b492e78..b1cdbd24d 100644 --- a/apps/client/src/app/components/header/header.module.ts +++ b/apps/client/src/app/components/header/header.module.ts @@ -4,8 +4,8 @@ import { MatButtonModule } from '@angular/material/button'; import { MatMenuModule } from '@angular/material/menu'; import { MatToolbarModule } from '@angular/material/toolbar'; import { RouterModule } from '@angular/router'; +import { LoginWithAccessTokenDialogModule } from '@ghostfolio/client/pages/login/login-with-access-token-dialog/login-with-access-token-dialog.module'; -import { LoginWithAccessTokenDialogModule } from '../../pages/login/login-with-access-token-dialog/login-with-access-token-dialog.module'; import { GfLogoModule } from '../logo/logo.module'; import { HeaderComponent } from './header.component'; diff --git a/apps/client/src/app/components/investment-chart/investment-chart.component.ts b/apps/client/src/app/components/investment-chart/investment-chart.component.ts index 5a535983a..d90f5b1eb 100644 --- a/apps/client/src/app/components/investment-chart/investment-chart.component.ts +++ b/apps/client/src/app/components/investment-chart/investment-chart.component.ts @@ -9,8 +9,8 @@ import { OnInit, ViewChild } from '@angular/core'; +import { PortfolioItem } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-item.interface'; import { primaryColorRgb } from '@ghostfolio/helper'; -import { PortfolioItem } from 'apps/api/src/app/portfolio/interfaces/portfolio-item.interface'; import { LineController, LineElement, diff --git a/apps/client/src/app/components/performance-chart-dialog/performance-chart-dialog.component.ts b/apps/client/src/app/components/performance-chart-dialog/performance-chart-dialog.component.ts index f68f66c0e..0a4c9e4a3 100644 --- a/apps/client/src/app/components/performance-chart-dialog/performance-chart-dialog.component.ts +++ b/apps/client/src/app/components/performance-chart-dialog/performance-chart-dialog.component.ts @@ -5,9 +5,9 @@ import { Inject } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { DataService } from '@ghostfolio/client/services/data.service'; import { isToday, parse } from 'date-fns'; -import { DataService } from '../../services/data.service'; import { LineChartItem } from '../line-chart/interfaces/line-chart.interface'; import { PositionDetailDialogParams } from './interfaces/interfaces'; diff --git a/apps/client/src/app/components/performance-chart-dialog/performance-chart-dialog.module.ts b/apps/client/src/app/components/performance-chart-dialog/performance-chart-dialog.module.ts index 5a377d352..1db013464 100644 --- a/apps/client/src/app/components/performance-chart-dialog/performance-chart-dialog.module.ts +++ b/apps/client/src/app/components/performance-chart-dialog/performance-chart-dialog.module.ts @@ -2,9 +2,9 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; import { MatDialogModule } from '@angular/material/dialog'; +import { GfLineChartModule } from '@ghostfolio/client/components/line-chart/line-chart.module'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; -import { GfLineChartModule } from '../../components/line-chart/line-chart.module'; import { GfDialogFooterModule } from '../dialog-footer/dialog-footer.module'; import { GfDialogHeaderModule } from '../dialog-header/dialog-header.module'; import { GfFearAndGreedIndexModule } from '../fear-and-greed-index/fear-and-greed-index.module'; diff --git a/apps/client/src/app/components/portfolio-overview/portfolio-overview.component.ts b/apps/client/src/app/components/portfolio-overview/portfolio-overview.component.ts index 8dc9663e7..93086fdf9 100644 --- a/apps/client/src/app/components/portfolio-overview/portfolio-overview.component.ts +++ b/apps/client/src/app/components/portfolio-overview/portfolio-overview.component.ts @@ -5,8 +5,8 @@ import { OnChanges, OnInit } from '@angular/core'; +import { PortfolioOverview } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-overview.interface'; import { Currency } from '@prisma/client'; -import { PortfolioOverview } from 'apps/api/src/app/portfolio/interfaces/portfolio-overview.interface'; @Component({ selector: 'gf-portfolio-overview', diff --git a/apps/client/src/app/components/portfolio-performance-summary/portfolio-performance-summary.component.ts b/apps/client/src/app/components/portfolio-performance-summary/portfolio-performance-summary.component.ts index 8aac9cd7e..a7fbe5f71 100644 --- a/apps/client/src/app/components/portfolio-performance-summary/portfolio-performance-summary.component.ts +++ b/apps/client/src/app/components/portfolio-performance-summary/portfolio-performance-summary.component.ts @@ -7,8 +7,8 @@ import { OnInit, ViewChild } from '@angular/core'; +import { PortfolioPerformance } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-performance.interface'; import { Currency } from '@prisma/client'; -import { PortfolioPerformance } from 'apps/api/src/app/portfolio/interfaces/portfolio-performance.interface'; import { CountUp } from 'countup.js'; import { isNumber } from 'lodash'; diff --git a/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts b/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts index 65f6b08e1..e411af378 100644 --- a/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts +++ b/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts @@ -4,8 +4,8 @@ import { Input, OnInit } from '@angular/core'; +import { PortfolioPerformance } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-performance.interface'; import { Currency } from '@prisma/client'; -import { PortfolioPerformance } from 'apps/api/src/app/portfolio/interfaces/portfolio-performance.interface'; @Component({ selector: 'gf-portfolio-performance', diff --git a/apps/client/src/app/components/portfolio-positions-chart/portfolio-positions-chart.component.ts b/apps/client/src/app/components/portfolio-positions-chart/portfolio-positions-chart.component.ts index 4fbfce576..5c2497c14 100644 --- a/apps/client/src/app/components/portfolio-positions-chart/portfolio-positions-chart.component.ts +++ b/apps/client/src/app/components/portfolio-positions-chart/portfolio-positions-chart.component.ts @@ -7,7 +7,7 @@ import { OnChanges, OnInit } from '@angular/core'; -import { PortfolioItem } from 'apps/api/src/app/portfolio/interfaces/portfolio-item.interface'; +import { PortfolioItem } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-item.interface'; import { endOfDay, parseISO, startOfDay } from 'date-fns'; @Component({ diff --git a/apps/client/src/app/components/portfolio-proportion-chart/portfolio-proportion-chart.component.ts b/apps/client/src/app/components/portfolio-proportion-chart/portfolio-proportion-chart.component.ts index 48ec59d1c..d1cbd333e 100644 --- a/apps/client/src/app/components/portfolio-proportion-chart/portfolio-proportion-chart.component.ts +++ b/apps/client/src/app/components/portfolio-proportion-chart/portfolio-proportion-chart.component.ts @@ -7,8 +7,8 @@ import { OnInit, ViewChild } from '@angular/core'; +import { PortfolioPosition } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-position.interface'; import { Currency } from '@prisma/client'; -import { PortfolioPosition } from 'apps/api/src/app/portfolio/interfaces/portfolio-position.interface'; import { Tooltip } from 'chart.js'; import { LinearScale } from 'chart.js'; import { ArcElement } from 'chart.js'; diff --git a/apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.component.ts b/apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.component.ts index 0cee091d3..7ee16d2ce 100644 --- a/apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.component.ts +++ b/apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.component.ts @@ -5,9 +5,9 @@ import { Inject } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { DataService } from '@ghostfolio/client/services/data.service'; import { format, isSameMonth, isToday, parseISO } from 'date-fns'; -import { DataService } from '../../../services/data.service'; import { LineChartItem } from '../../line-chart/interfaces/line-chart.interface'; import { PositionDetailDialogParams } from './interfaces/interfaces'; diff --git a/apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.module.ts b/apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.module.ts index 21ac8535f..38d42e914 100644 --- a/apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.module.ts +++ b/apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.module.ts @@ -2,9 +2,9 @@ import { CommonModule } from '@angular/common'; import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; import { MatDialogModule } from '@angular/material/dialog'; +import { GfLineChartModule } from '@ghostfolio/client/components/line-chart/line-chart.module'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; -import { GfLineChartModule } from '../../../components/line-chart/line-chart.module'; import { GfDialogFooterModule } from '../../dialog-footer/dialog-footer.module'; import { GfDialogHeaderModule } from '../../dialog-header/dialog-header.module'; import { GfValueModule } from '../../value/value.module'; diff --git a/apps/client/src/app/components/position/position.component.ts b/apps/client/src/app/components/position/position.component.ts index b1dc8c32f..4c18c9462 100644 --- a/apps/client/src/app/components/position/position.component.ts +++ b/apps/client/src/app/components/position/position.component.ts @@ -7,7 +7,7 @@ import { } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router } from '@angular/router'; -import { PortfolioPosition } from 'apps/api/src/app/portfolio/interfaces/portfolio-position.interface'; +import { PortfolioPosition } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-position.interface'; import { Subject, Subscription } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; diff --git a/apps/client/src/app/components/positions-table/positions-table.component.ts b/apps/client/src/app/components/positions-table/positions-table.component.ts index 9b15e1340..e934417ca 100644 --- a/apps/client/src/app/components/positions-table/positions-table.component.ts +++ b/apps/client/src/app/components/positions-table/positions-table.component.ts @@ -13,8 +13,8 @@ import { MatPaginator } from '@angular/material/paginator'; import { MatSort } from '@angular/material/sort'; import { MatTableDataSource } from '@angular/material/table'; import { ActivatedRoute, Router } from '@angular/router'; +import { PortfolioPosition } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-position.interface'; import { Order as OrderModel } from '@prisma/client'; -import { PortfolioPosition } from 'apps/api/src/app/portfolio/interfaces/portfolio-position.interface'; import { Subject, Subscription } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; diff --git a/apps/client/src/app/components/positions/positions.component.ts b/apps/client/src/app/components/positions/positions.component.ts index 5609fc3cf..1dcc991d3 100644 --- a/apps/client/src/app/components/positions/positions.component.ts +++ b/apps/client/src/app/components/positions/positions.component.ts @@ -5,7 +5,7 @@ import { OnChanges, OnInit } from '@angular/core'; -import { PortfolioPosition } from 'apps/api/src/app/portfolio/interfaces/portfolio-position.interface'; +import { PortfolioPosition } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-position.interface'; @Component({ selector: 'gf-positions', diff --git a/apps/client/src/app/components/rule/rule.component.ts b/apps/client/src/app/components/rule/rule.component.ts index 660fb3daf..2bf6fe4a5 100644 --- a/apps/client/src/app/components/rule/rule.component.ts +++ b/apps/client/src/app/components/rule/rule.component.ts @@ -4,7 +4,7 @@ import { Input, OnInit } from '@angular/core'; -import { PortfolioReportRule } from 'apps/api/src/app/portfolio/interfaces/portfolio-report.interface'; +import { PortfolioReportRule } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-report.interface'; @Component({ selector: 'gf-rule', diff --git a/apps/client/src/app/components/rules/rules.component.ts b/apps/client/src/app/components/rules/rules.component.ts index fcb6bae81..61af91883 100644 --- a/apps/client/src/app/components/rules/rules.component.ts +++ b/apps/client/src/app/components/rules/rules.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; -import { PortfolioReportRule } from 'apps/api/src/app/portfolio/interfaces/portfolio-report.interface'; +import { PortfolioReportRule } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-report.interface'; @Component({ selector: 'gf-rules', diff --git a/apps/client/src/app/components/rules/rules.module.ts b/apps/client/src/app/components/rules/rules.module.ts index 6d0b0783d..5a6a5bc8b 100644 --- a/apps/client/src/app/components/rules/rules.module.ts +++ b/apps/client/src/app/components/rules/rules.module.ts @@ -2,7 +2,7 @@ import { CommonModule } from '@angular/common'; import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; import { MatCardModule } from '@angular/material/card'; -import { GfRuleModule } from 'apps/client/src/app/components/rule/rule.module'; +import { GfRuleModule } from '@ghostfolio/client/components/rule/rule.module'; import { GfNoTransactionsInfoModule } from '../no-transactions-info/no-transactions-info.module'; import { GfPositionModule } from '../position/position.module'; diff --git a/apps/client/src/app/core/http-response.interceptor.ts b/apps/client/src/app/core/http-response.interceptor.ts index a44db3320..72de866d2 100644 --- a/apps/client/src/app/core/http-response.interceptor.ts +++ b/apps/client/src/app/core/http-response.interceptor.ts @@ -19,6 +19,7 @@ import { Router } from '@angular/router'; import { StatusCodes } from 'http-status-codes'; import { Observable, throwError } from 'rxjs'; import { catchError, tap } from 'rxjs/operators'; + import { TokenStorageService } from '../services/token-storage.service'; @Injectable() diff --git a/apps/client/src/app/pages/about/about-page.component.ts b/apps/client/src/app/pages/about/about-page.component.ts index 0bbd94266..4a677a9ee 100644 --- a/apps/client/src/app/pages/about/about-page.component.ts +++ b/apps/client/src/app/pages/about/about-page.component.ts @@ -1,12 +1,12 @@ import { ChangeDetectorRef, Component, OnInit } from '@angular/core'; +import { User } from '@ghostfolio/api/app/user/interfaces/user.interface'; +import { DataService } from '@ghostfolio/client/services/data.service'; +import { TokenStorageService } from '@ghostfolio/client/services/token-storage.service'; import { baseCurrency } from '@ghostfolio/helper'; -import { User } from 'apps/api/src/app/user/interfaces/user.interface'; -import { environment } from 'apps/client/src/environments/environment'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; -import { DataService } from '../../services/data.service'; -import { TokenStorageService } from '../../services/token-storage.service'; +import { environment } from '../../../environments/environment'; @Component({ selector: 'gf-about-page', diff --git a/apps/client/src/app/pages/account/account-page-routing.module.ts b/apps/client/src/app/pages/account/account-page-routing.module.ts index 14bdb3bb4..fc0fd0349 100644 --- a/apps/client/src/app/pages/account/account-page-routing.module.ts +++ b/apps/client/src/app/pages/account/account-page-routing.module.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; +import { AuthGuard } from '@ghostfolio/client/core/auth.guard'; -import { AuthGuard } from '../../core/auth.guard'; import { AccountPageComponent } from './account-page.component'; const routes: Routes = [ diff --git a/apps/client/src/app/pages/account/account-page.component.ts b/apps/client/src/app/pages/account/account-page.component.ts index 605eaf70c..069e10042 100644 --- a/apps/client/src/app/pages/account/account-page.component.ts +++ b/apps/client/src/app/pages/account/account-page.component.ts @@ -1,12 +1,12 @@ import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; +import { Access } from '@ghostfolio/api/app/access/interfaces/access.interface'; +import { User } from '@ghostfolio/api/app/user/interfaces/user.interface'; +import { DataService } from '@ghostfolio/client/services/data.service'; +import { TokenStorageService } from '@ghostfolio/client/services/token-storage.service'; import { DEFAULT_DATE_FORMAT } from '@ghostfolio/helper'; -import { Access } from 'apps/api/src/app/access/interfaces/access.interface'; -import { User } from 'apps/api/src/app/user/interfaces/user.interface'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; -import { DataService } from '../../services/data.service'; -import { TokenStorageService } from '../../services/token-storage.service'; import { Currency } from '.prisma/client'; @Component({ diff --git a/apps/client/src/app/pages/account/account-page.module.ts b/apps/client/src/app/pages/account/account-page.module.ts index fd3dd63cc..3c44a988f 100644 --- a/apps/client/src/app/pages/account/account-page.module.ts +++ b/apps/client/src/app/pages/account/account-page.module.ts @@ -4,8 +4,8 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { MatCardModule } from '@angular/material/card'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatSelectModule } from '@angular/material/select'; +import { GfPortfolioAccessTableModule } from '@ghostfolio/client/components/access-table/access-table.module'; -import { GfPortfolioAccessTableModule } from '../../components/access-table/access-table.module'; import { AccountPageRoutingModule } from './account-page-routing.module'; import { AccountPageComponent } from './account-page.component'; diff --git a/apps/client/src/app/pages/admin/admin-page-routing.module.ts b/apps/client/src/app/pages/admin/admin-page-routing.module.ts index e69d3139b..1362cec53 100644 --- a/apps/client/src/app/pages/admin/admin-page-routing.module.ts +++ b/apps/client/src/app/pages/admin/admin-page-routing.module.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; +import { AuthGuard } from '@ghostfolio/client/core/auth.guard'; -import { AuthGuard } from '../../core/auth.guard'; import { AdminPageComponent } from './admin-page.component'; const routes: Routes = [ diff --git a/apps/client/src/app/pages/admin/admin-page.component.ts b/apps/client/src/app/pages/admin/admin-page.component.ts index 16cc969e3..d37483972 100644 --- a/apps/client/src/app/pages/admin/admin-page.component.ts +++ b/apps/client/src/app/pages/admin/admin-page.component.ts @@ -1,14 +1,13 @@ import { ChangeDetectorRef, Component, OnInit } from '@angular/core'; +import { AdminData } from '@ghostfolio/api/app/admin/interfaces/admin-data.interface'; +import { AdminService } from '@ghostfolio/client/services/admin.service'; +import { CacheService } from '@ghostfolio/client/services/cache.service'; +import { DataService } from '@ghostfolio/client/services/data.service'; import { DEFAULT_DATE_FORMAT } from '@ghostfolio/helper'; -import { AdminData } from 'apps/api/src/app/admin/interfaces/admin-data.interface'; import { formatDistanceToNow, isValid, parseISO, sub } from 'date-fns'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; -import { AdminService } from '../../services/admin.service'; -import { CacheService } from '../../services/cache.service'; -import { DataService } from '../../services/data.service'; - @Component({ selector: 'gf-admin-page', templateUrl: './admin-page.html', diff --git a/apps/client/src/app/pages/admin/admin-page.module.ts b/apps/client/src/app/pages/admin/admin-page.module.ts index c5ac591ae..dae85ecea 100644 --- a/apps/client/src/app/pages/admin/admin-page.module.ts +++ b/apps/client/src/app/pages/admin/admin-page.module.ts @@ -2,8 +2,8 @@ import { CommonModule } from '@angular/common'; import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; import { MatCardModule } from '@angular/material/card'; +import { CacheService } from '@ghostfolio/client/services/cache.service'; -import { CacheService } from '../../services/cache.service'; import { AdminPageRoutingModule } from './admin-page-routing.module'; import { AdminPageComponent } from './admin-page.component'; diff --git a/apps/client/src/app/pages/analysis/analysis-page-routing.module.ts b/apps/client/src/app/pages/analysis/analysis-page-routing.module.ts index 8c156c2f5..2b2356fed 100644 --- a/apps/client/src/app/pages/analysis/analysis-page-routing.module.ts +++ b/apps/client/src/app/pages/analysis/analysis-page-routing.module.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; +import { AuthGuard } from '@ghostfolio/client/core/auth.guard'; -import { AuthGuard } from '../../core/auth.guard'; import { AnalysisPageComponent } from './analysis-page.component'; const routes: Routes = [ diff --git a/apps/client/src/app/pages/analysis/analysis-page.component.ts b/apps/client/src/app/pages/analysis/analysis-page.component.ts index 839dc43c9..795882943 100644 --- a/apps/client/src/app/pages/analysis/analysis-page.component.ts +++ b/apps/client/src/app/pages/analysis/analysis-page.component.ts @@ -1,16 +1,15 @@ import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; -import { PortfolioItem } from 'apps/api/src/app/portfolio/interfaces/portfolio-item.interface'; -import { PortfolioPosition } from 'apps/api/src/app/portfolio/interfaces/portfolio-position.interface'; -import { User } from 'apps/api/src/app/user/interfaces/user.interface'; +import { PortfolioItem } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-item.interface'; +import { PortfolioPosition } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-position.interface'; +import { User } from '@ghostfolio/api/app/user/interfaces/user.interface'; +import { ToggleOption } from '@ghostfolio/client/components/toggle/interfaces/toggle-option.type'; +import { DataService } from '@ghostfolio/client/services/data.service'; +import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service'; +import { TokenStorageService } from '@ghostfolio/client/services/token-storage.service'; import { DeviceDetectorService } from 'ngx-device-detector'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; -import { ToggleOption } from '../../components/toggle/interfaces/toggle-option.type'; -import { DataService } from '../../services/data.service'; -import { ImpersonationStorageService } from '../../services/impersonation-storage.service'; -import { TokenStorageService } from '../../services/token-storage.service'; - @Component({ selector: 'gf-analysis-page', templateUrl: './analysis-page.html', diff --git a/apps/client/src/app/pages/analysis/analysis-page.module.ts b/apps/client/src/app/pages/analysis/analysis-page.module.ts index 8a15fa83d..c3081dc9e 100644 --- a/apps/client/src/app/pages/analysis/analysis-page.module.ts +++ b/apps/client/src/app/pages/analysis/analysis-page.module.ts @@ -1,12 +1,12 @@ import { CommonModule } from '@angular/common'; import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; import { MatCardModule } from '@angular/material/card'; +import { GfInvestmentChartModule } from '@ghostfolio/client/components/investment-chart/investment-chart.module'; +import { PortfolioPositionsChartModule } from '@ghostfolio/client/components/portfolio-positions-chart/portfolio-positions-chart.module'; +import { PortfolioProportionChartModule } from '@ghostfolio/client/components/portfolio-proportion-chart/portfolio-proportion-chart.module'; +import { GfPositionsTableModule } from '@ghostfolio/client/components/positions-table/positions-table.module'; +import { GfToggleModule } from '@ghostfolio/client/components/toggle/toggle.module'; -import { GfInvestmentChartModule } from '../../components/investment-chart/investment-chart.module'; -import { PortfolioPositionsChartModule } from '../../components/portfolio-positions-chart/portfolio-positions-chart.module'; -import { PortfolioProportionChartModule } from '../../components/portfolio-proportion-chart/portfolio-proportion-chart.module'; -import { GfPositionsTableModule } from '../../components/positions-table/positions-table.module'; -import { GfToggleModule } from '../../components/toggle/toggle.module'; import { AnalysisPageRoutingModule } from './analysis-page-routing.module'; import { AnalysisPageComponent } from './analysis-page.component'; diff --git a/apps/client/src/app/pages/auth/auth-page.component.ts b/apps/client/src/app/pages/auth/auth-page.component.ts index b25be8fc5..70f4f6563 100644 --- a/apps/client/src/app/pages/auth/auth-page.component.ts +++ b/apps/client/src/app/pages/auth/auth-page.component.ts @@ -1,7 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; - -import { TokenStorageService } from '../../services/token-storage.service'; +import { TokenStorageService } from '@ghostfolio/client/services/token-storage.service'; @Component({ selector: 'gf-auth-page', diff --git a/apps/client/src/app/pages/home/home-page-routing.module.ts b/apps/client/src/app/pages/home/home-page-routing.module.ts index ddde044f3..ab5a539aa 100644 --- a/apps/client/src/app/pages/home/home-page-routing.module.ts +++ b/apps/client/src/app/pages/home/home-page-routing.module.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; +import { AuthGuard } from '@ghostfolio/client/core/auth.guard'; -import { AuthGuard } from '../../core/auth.guard'; import { HomePageComponent } from './home-page.component'; const routes: Routes = [ diff --git a/apps/client/src/app/pages/home/home-page.component.ts b/apps/client/src/app/pages/home/home-page.component.ts index 38a18592b..d91c3a7ad 100644 --- a/apps/client/src/app/pages/home/home-page.component.ts +++ b/apps/client/src/app/pages/home/home-page.component.ts @@ -1,27 +1,26 @@ import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router } from '@angular/router'; -import { hasPermission, permissions } from '@ghostfolio/helper'; -import { DateRange } from 'apps/api/src/app/portfolio/interfaces/date-range.type'; -import { PortfolioOverview } from 'apps/api/src/app/portfolio/interfaces/portfolio-overview.interface'; -import { PortfolioPerformance } from 'apps/api/src/app/portfolio/interfaces/portfolio-performance.interface'; -import { PortfolioPosition } from 'apps/api/src/app/portfolio/interfaces/portfolio-position.interface'; -import { User } from 'apps/api/src/app/user/interfaces/user.interface'; +import { DateRange } from '@ghostfolio/api/app/portfolio/interfaces/date-range.type'; +import { PortfolioOverview } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-overview.interface'; +import { PortfolioPerformance } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-performance.interface'; +import { PortfolioPosition } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-position.interface'; +import { User } from '@ghostfolio/api/app/user/interfaces/user.interface'; +import { LineChartItem } from '@ghostfolio/client/components/line-chart/interfaces/line-chart.interface'; +import { PerformanceChartDialog } from '@ghostfolio/client/components/performance-chart-dialog/performance-chart-dialog.component'; +import { ToggleOption } from '@ghostfolio/client/components/toggle/interfaces/toggle-option.type'; +import { DataService } from '@ghostfolio/client/services/data.service'; +import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service'; import { RANGE, SettingsStorageService -} from 'apps/client/src/app/services/settings-storage.service'; +} from '@ghostfolio/client/services/settings-storage.service'; +import { TokenStorageService } from '@ghostfolio/client/services/token-storage.service'; +import { hasPermission, permissions } from '@ghostfolio/helper'; import { DeviceDetectorService } from 'ngx-device-detector'; import { Subject, Subscription } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; -import { LineChartItem } from '../../components/line-chart/interfaces/line-chart.interface'; -import { PerformanceChartDialog } from '../../components/performance-chart-dialog/performance-chart-dialog.component'; -import { ToggleOption } from '../../components/toggle/interfaces/toggle-option.type'; -import { DataService } from '../../services/data.service'; -import { ImpersonationStorageService } from '../../services/impersonation-storage.service'; -import { TokenStorageService } from '../../services/token-storage.service'; - @Component({ selector: 'gf-home-page', templateUrl: './home-page.html', diff --git a/apps/client/src/app/pages/home/home-page.module.ts b/apps/client/src/app/pages/home/home-page.module.ts index dc86d2b9f..9f3c495e2 100644 --- a/apps/client/src/app/pages/home/home-page.module.ts +++ b/apps/client/src/app/pages/home/home-page.module.ts @@ -3,14 +3,14 @@ import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; import { MatCardModule } from '@angular/material/card'; import { RouterModule } from '@angular/router'; +import { GfLineChartModule } from '@ghostfolio/client/components/line-chart/line-chart.module'; +import { GfPerformanceChartDialogModule } from '@ghostfolio/client/components/performance-chart-dialog/performance-chart-dialog.module'; +import { GfPortfolioOverviewModule } from '@ghostfolio/client/components/portfolio-overview/portfolio-overview.module'; +import { GfPortfolioPerformanceSummaryModule } from '@ghostfolio/client/components/portfolio-performance-summary/portfolio-performance-summary.module'; +import { GfPortfolioPerformanceModule } from '@ghostfolio/client/components/portfolio-performance/portfolio-performance.module'; +import { GfPositionsModule } from '@ghostfolio/client/components/positions/positions.module'; +import { GfToggleModule } from '@ghostfolio/client/components/toggle/toggle.module'; -import { GfLineChartModule } from '../../components/line-chart/line-chart.module'; -import { GfPerformanceChartDialogModule } from '../../components/performance-chart-dialog/performance-chart-dialog.module'; -import { GfPortfolioOverviewModule } from '../../components/portfolio-overview/portfolio-overview.module'; -import { GfPortfolioPerformanceSummaryModule } from '../../components/portfolio-performance-summary/portfolio-performance-summary.module'; -import { GfPortfolioPerformanceModule } from '../../components/portfolio-performance/portfolio-performance.module'; -import { GfPositionsModule } from '../../components/positions/positions.module'; -import { GfToggleModule } from '../../components/toggle/toggle.module'; import { HomePageRoutingModule } from './home-page-routing.module'; import { HomePageComponent } from './home-page.component'; diff --git a/apps/client/src/app/pages/login/login-page-routing.module.ts b/apps/client/src/app/pages/login/login-page-routing.module.ts index 213e32637..63829706e 100644 --- a/apps/client/src/app/pages/login/login-page-routing.module.ts +++ b/apps/client/src/app/pages/login/login-page-routing.module.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; +import { AuthGuard } from '@ghostfolio/client/core/auth.guard'; -import { AuthGuard } from '../../core/auth.guard'; import { LoginPageComponent } from './login-page.component'; const routes: Routes = [ diff --git a/apps/client/src/app/pages/login/login-page.component.ts b/apps/client/src/app/pages/login/login-page.component.ts index e7615008d..d1dd0bfbc 100644 --- a/apps/client/src/app/pages/login/login-page.component.ts +++ b/apps/client/src/app/pages/login/login-page.component.ts @@ -1,14 +1,13 @@ import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { Router } from '@angular/router'; -import { hasPermission, permissions } from '@ghostfolio/helper'; +import { LineChartItem } from '@ghostfolio/client/components/line-chart/interfaces/line-chart.interface'; +import { DataService } from '@ghostfolio/client/services/data.service'; +import { TokenStorageService } from '@ghostfolio/client/services/token-storage.service'; import { format } from 'date-fns'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; -import { LineChartItem } from '../../components/line-chart/interfaces/line-chart.interface'; -import { DataService } from '../../services/data.service'; -import { TokenStorageService } from '../../services/token-storage.service'; import { ShowAccessTokenDialog } from './show-access-token-dialog/show-access-token-dialog.component'; @Component({ diff --git a/apps/client/src/app/pages/login/login-page.module.ts b/apps/client/src/app/pages/login/login-page.module.ts index 5eb16eaaa..6ff7480e0 100644 --- a/apps/client/src/app/pages/login/login-page.module.ts +++ b/apps/client/src/app/pages/login/login-page.module.ts @@ -2,9 +2,9 @@ import { CommonModule } from '@angular/common'; import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; import { RouterModule } from '@angular/router'; +import { GfLineChartModule } from '@ghostfolio/client/components/line-chart/line-chart.module'; +import { GfLogoModule } from '@ghostfolio/client/components/logo/logo.module'; -import { GfLineChartModule } from '../../components/line-chart/line-chart.module'; -import { GfLogoModule } from '../../components/logo/logo.module'; import { LoginPageRoutingModule } from './login-page-routing.module'; import { LoginPageComponent } from './login-page.component'; import { ShowAccessTokenDialogModule } from './show-access-token-dialog/show-access-token-dialog.module'; diff --git a/apps/client/src/app/pages/report/report-page-routing.module.ts b/apps/client/src/app/pages/report/report-page-routing.module.ts index 0e5a41016..e1306a6f5 100644 --- a/apps/client/src/app/pages/report/report-page-routing.module.ts +++ b/apps/client/src/app/pages/report/report-page-routing.module.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; +import { AuthGuard } from '@ghostfolio/client/core/auth.guard'; -import { AuthGuard } from '../../core/auth.guard'; import { ReportPageComponent } from './report-page.component'; const routes: Routes = [ diff --git a/apps/client/src/app/pages/report/report-page.component.ts b/apps/client/src/app/pages/report/report-page.component.ts index b0d0dca65..7d08956eb 100644 --- a/apps/client/src/app/pages/report/report-page.component.ts +++ b/apps/client/src/app/pages/report/report-page.component.ts @@ -1,10 +1,9 @@ import { ChangeDetectorRef, Component, OnInit } from '@angular/core'; -import { PortfolioReportRule } from 'apps/api/src/app/portfolio/interfaces/portfolio-report.interface'; +import { PortfolioReportRule } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-report.interface'; +import { DataService } from '@ghostfolio/client/services/data.service'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; -import { DataService } from '../../services/data.service'; - @Component({ selector: 'gf-report-page', templateUrl: './report-page.html', diff --git a/apps/client/src/app/pages/report/report-page.module.ts b/apps/client/src/app/pages/report/report-page.module.ts index 29585dd15..1f11e2f15 100644 --- a/apps/client/src/app/pages/report/report-page.module.ts +++ b/apps/client/src/app/pages/report/report-page.module.ts @@ -1,6 +1,6 @@ import { CommonModule } from '@angular/common'; import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; -import { RulesModule } from 'apps/client/src/app/components/rules/rules.module'; +import { RulesModule } from '@ghostfolio/client/components/rules/rules.module'; import { ReportPageRoutingModule } from './report-page-routing.module'; import { ReportPageComponent } from './report-page.component'; diff --git a/apps/client/src/app/pages/transactions/create-or-update-transaction-dialog/create-or-update-transaction-dialog.component.ts b/apps/client/src/app/pages/transactions/create-or-update-transaction-dialog/create-or-update-transaction-dialog.component.ts index ecece2d50..7ffd1eafc 100644 --- a/apps/client/src/app/pages/transactions/create-or-update-transaction-dialog/create-or-update-transaction-dialog.component.ts +++ b/apps/client/src/app/pages/transactions/create-or-update-transaction-dialog/create-or-update-transaction-dialog.component.ts @@ -7,8 +7,8 @@ import { import { FormControl, Validators } from '@angular/forms'; import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { LookupItem } from '@ghostfolio/api/app/symbol/interfaces/lookup-item.interface'; import { Currency, Order as OrderModel } from '@prisma/client'; -import { LookupItem } from 'apps/api/src/app/symbol/interfaces/lookup-item.interface'; import { Observable, Subject } from 'rxjs'; import { debounceTime, diff --git a/apps/client/src/app/pages/transactions/transactions-page-routing.module.ts b/apps/client/src/app/pages/transactions/transactions-page-routing.module.ts index 3bfba31ef..ae3de4dba 100644 --- a/apps/client/src/app/pages/transactions/transactions-page-routing.module.ts +++ b/apps/client/src/app/pages/transactions/transactions-page-routing.module.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; +import { AuthGuard } from '@ghostfolio/client/core/auth.guard'; -import { AuthGuard } from '../../core/auth.guard'; import { TransactionsPageComponent } from './transactions-page.component'; const routes: Routes = [ diff --git a/apps/client/src/app/pages/transactions/transactions-page.component.ts b/apps/client/src/app/pages/transactions/transactions-page.component.ts index 565afbd97..1e357c434 100644 --- a/apps/client/src/app/pages/transactions/transactions-page.component.ts +++ b/apps/client/src/app/pages/transactions/transactions-page.component.ts @@ -1,17 +1,17 @@ import { ChangeDetectorRef, Component, OnInit } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router } from '@angular/router'; +import { UpdateOrderDto } from '@ghostfolio/api/app/order/update-order.dto'; +import { User } from '@ghostfolio/api/app/user/interfaces/user.interface'; +import { DataService } from '@ghostfolio/client/services/data.service'; +import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service'; +import { TokenStorageService } from '@ghostfolio/client/services/token-storage.service'; import { hasPermission, permissions } from '@ghostfolio/helper'; import { Order as OrderModel } from '@prisma/client'; -import { UpdateOrderDto } from 'apps/api/src/app/order/update-order.dto'; -import { User } from 'apps/api/src/app/user/interfaces/user.interface'; import { DeviceDetectorService } from 'ngx-device-detector'; import { Subject, Subscription } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; -import { DataService } from '../../services/data.service'; -import { ImpersonationStorageService } from '../../services/impersonation-storage.service'; -import { TokenStorageService } from '../../services/token-storage.service'; import { CreateOrUpdateTransactionDialog } from './create-or-update-transaction-dialog/create-or-update-transaction-dialog.component'; @Component({ diff --git a/apps/client/src/app/pages/transactions/transactions-page.module.ts b/apps/client/src/app/pages/transactions/transactions-page.module.ts index 126868b76..b44ed4226 100644 --- a/apps/client/src/app/pages/transactions/transactions-page.module.ts +++ b/apps/client/src/app/pages/transactions/transactions-page.module.ts @@ -2,8 +2,8 @@ import { CommonModule } from '@angular/common'; import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; import { RouterModule } from '@angular/router'; +import { GfTransactionsTableModule } from '@ghostfolio/client/components/transactions-table/transactions-table.module'; -import { GfTransactionsTableModule } from '../../components/transactions-table/transactions-table.module'; import { CreateOrUpdateTransactionDialogModule } from './create-or-update-transaction-dialog/create-or-update-transaction-dialog.module'; import { TransactionsPageRoutingModule } from './transactions-page-routing.module'; import { TransactionsPageComponent } from './transactions-page.component'; diff --git a/apps/client/src/app/services/data.service.ts b/apps/client/src/app/services/data.service.ts index d9f859cd1..b29807df7 100644 --- a/apps/client/src/app/services/data.service.ts +++ b/apps/client/src/app/services/data.service.ts @@ -1,24 +1,24 @@ import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; -import { Order as OrderModel } from '@prisma/client'; -import { Access } from 'apps/api/src/app/access/interfaces/access.interface'; -import { AdminData } from 'apps/api/src/app/admin/interfaces/admin-data.interface'; -import { InfoItem } from 'apps/api/src/app/info/interfaces/info-item.interface'; -import { UpdateOrderDto } from 'apps/api/src/app/order/update-order.dto'; -import { PortfolioItem } from 'apps/api/src/app/portfolio/interfaces/portfolio-item.interface'; -import { PortfolioOverview } from 'apps/api/src/app/portfolio/interfaces/portfolio-overview.interface'; -import { PortfolioPerformance } from 'apps/api/src/app/portfolio/interfaces/portfolio-performance.interface'; +import { Access } from '@ghostfolio/api/app/access/interfaces/access.interface'; +import { AdminData } from '@ghostfolio/api/app/admin/interfaces/admin-data.interface'; +import { InfoItem } from '@ghostfolio/api/app/info/interfaces/info-item.interface'; +import { UpdateOrderDto } from '@ghostfolio/api/app/order/update-order.dto'; +import { PortfolioItem } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-item.interface'; +import { PortfolioOverview } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-overview.interface'; +import { PortfolioPerformance } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-performance.interface'; import { HistoricalDataItem, PortfolioPositionDetail -} from 'apps/api/src/app/portfolio/interfaces/portfolio-position-detail.interface'; -import { PortfolioPosition } from 'apps/api/src/app/portfolio/interfaces/portfolio-position.interface'; -import { PortfolioReport } from 'apps/api/src/app/portfolio/interfaces/portfolio-report.interface'; -import { LookupItem } from 'apps/api/src/app/symbol/interfaces/lookup-item.interface'; -import { SymbolItem } from 'apps/api/src/app/symbol/interfaces/symbol-item.interface'; -import { UserItem } from 'apps/api/src/app/user/interfaces/user-item.interface'; -import { User } from 'apps/api/src/app/user/interfaces/user.interface'; -import { UpdateUserSettingsDto } from 'apps/api/src/app/user/update-user-settings.dto'; +} from '@ghostfolio/api/app/portfolio/interfaces/portfolio-position-detail.interface'; +import { PortfolioPosition } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-position.interface'; +import { PortfolioReport } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-report.interface'; +import { LookupItem } from '@ghostfolio/api/app/symbol/interfaces/lookup-item.interface'; +import { SymbolItem } from '@ghostfolio/api/app/symbol/interfaces/symbol-item.interface'; +import { UserItem } from '@ghostfolio/api/app/user/interfaces/user-item.interface'; +import { User } from '@ghostfolio/api/app/user/interfaces/user.interface'; +import { UpdateUserSettingsDto } from '@ghostfolio/api/app/user/update-user-settings.dto'; +import { Order as OrderModel } from '@prisma/client'; @Injectable({ providedIn: 'root' diff --git a/tsconfig.base.json b/tsconfig.base.json index 584da9d8f..cc4def900 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -16,6 +16,8 @@ "skipDefaultLibCheck": true, "baseUrl": ".", "paths": { + "@ghostfolio/api/*": ["apps/api/src/*"], + "@ghostfolio/client/*": ["apps/client/src/app/*"], "@ghostfolio/helper": ["libs/helper/src/index.ts"] } },