Thomas Kaul
11 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
343 changed files with
827 additions and
499 deletions
-
.prettierignore
-
apps/api/src/app/access/access.controller.ts
-
apps/api/src/app/access/access.module.ts
-
apps/api/src/app/access/access.service.ts
-
apps/api/src/app/account-balance/account-balance.controller.ts
-
apps/api/src/app/account-balance/account-balance.module.ts
-
apps/api/src/app/account-balance/account-balance.service.ts
-
apps/api/src/app/account/account.controller.ts
-
apps/api/src/app/account/account.module.ts
-
apps/api/src/app/account/account.service.ts
-
apps/api/src/app/admin/admin.controller.ts
-
apps/api/src/app/admin/admin.module.ts
-
apps/api/src/app/admin/admin.service.ts
-
apps/api/src/app/admin/queue/queue.controller.ts
-
apps/api/src/app/admin/queue/queue.module.ts
-
apps/api/src/app/admin/queue/queue.service.ts
-
apps/api/src/app/app.controller.ts
-
apps/api/src/app/app.module.ts
-
apps/api/src/app/auth-device/auth-device.controller.ts
-
apps/api/src/app/auth-device/auth-device.module.ts
-
apps/api/src/app/auth-device/auth-device.service.ts
-
apps/api/src/app/auth/auth.controller.ts
-
apps/api/src/app/auth/auth.module.ts
-
apps/api/src/app/auth/auth.service.ts
-
apps/api/src/app/auth/google.strategy.ts
-
apps/api/src/app/auth/interfaces/interfaces.ts
-
apps/api/src/app/auth/jwt.strategy.ts
-
apps/api/src/app/auth/web-auth.service.ts
-
apps/api/src/app/benchmark/benchmark.controller.ts
-
apps/api/src/app/benchmark/benchmark.module.ts
-
apps/api/src/app/benchmark/benchmark.service.ts
-
apps/api/src/app/cache/cache.controller.ts
-
apps/api/src/app/cache/cache.module.ts
-
apps/api/src/app/exchange-rate/exchange-rate.controller.ts
-
apps/api/src/app/exchange-rate/exchange-rate.module.ts
-
apps/api/src/app/exchange-rate/exchange-rate.service.ts
-
apps/api/src/app/export/export.controller.ts
-
apps/api/src/app/export/export.module.ts
-
apps/api/src/app/export/export.service.ts
-
apps/api/src/app/health/health.controller.ts
-
apps/api/src/app/health/health.module.ts
-
apps/api/src/app/health/health.service.ts
-
apps/api/src/app/import/import-data.dto.ts
-
apps/api/src/app/import/import.controller.ts
-
apps/api/src/app/import/import.module.ts
-
apps/api/src/app/import/import.service.ts
-
apps/api/src/app/info/info.controller.ts
-
apps/api/src/app/info/info.module.ts
-
apps/api/src/app/info/info.service.ts
-
apps/api/src/app/logo/logo.controller.ts
-
apps/api/src/app/logo/logo.module.ts
-
apps/api/src/app/logo/logo.service.ts
-
apps/api/src/app/order/order.controller.ts
-
apps/api/src/app/order/order.module.ts
-
apps/api/src/app/order/order.service.ts
-
apps/api/src/app/platform/platform.controller.ts
-
apps/api/src/app/platform/platform.module.ts
-
apps/api/src/app/platform/platform.service.ts
-
apps/api/src/app/portfolio/current-rate.service.mock.ts
-
apps/api/src/app/portfolio/current-rate.service.spec.ts
-
apps/api/src/app/portfolio/current-rate.service.ts
-
apps/api/src/app/portfolio/interfaces/current-positions.interface.ts
-
apps/api/src/app/portfolio/interfaces/portfolio-position-detail.interface.ts
-
apps/api/src/app/portfolio/portfolio-calculator-baln-buy-and-sell.spec.ts
-
apps/api/src/app/portfolio/portfolio-calculator-baln-buy.spec.ts
-
apps/api/src/app/portfolio/portfolio-calculator-btcusd-buy-and-sell-partially.spec.ts
-
apps/api/src/app/portfolio/portfolio-calculator-googl-buy.spec.ts
-
apps/api/src/app/portfolio/portfolio-calculator-no-orders.spec.ts
-
apps/api/src/app/portfolio/portfolio-calculator-novn-buy-and-sell-partially.spec.ts
-
apps/api/src/app/portfolio/portfolio-calculator-novn-buy-and-sell.spec.ts
-
apps/api/src/app/portfolio/portfolio-calculator.spec.ts
-
apps/api/src/app/portfolio/portfolio-calculator.ts
-
apps/api/src/app/portfolio/portfolio.controller.ts
-
apps/api/src/app/portfolio/portfolio.module.ts
-
apps/api/src/app/portfolio/portfolio.service.ts
-
apps/api/src/app/portfolio/rules.service.ts
-
apps/api/src/app/redis-cache/redis-cache.module.ts
-
apps/api/src/app/redis-cache/redis-cache.service.ts
-
apps/api/src/app/sitemap/sitemap.controller.ts
-
apps/api/src/app/sitemap/sitemap.module.ts
-
apps/api/src/app/subscription/subscription.controller.ts
-
apps/api/src/app/subscription/subscription.module.ts
-
apps/api/src/app/subscription/subscription.service.ts
-
apps/api/src/app/symbol/interfaces/lookup-item.interface.ts
-
apps/api/src/app/symbol/symbol.controller.ts
-
apps/api/src/app/symbol/symbol.module.ts
-
apps/api/src/app/symbol/symbol.service.ts
-
apps/api/src/app/tag/tag.controller.ts
-
apps/api/src/app/tag/tag.module.ts
-
apps/api/src/app/tag/tag.service.ts
-
apps/api/src/app/user/update-user-setting.dto.ts
-
apps/api/src/app/user/user.controller.ts
-
apps/api/src/app/user/user.module.ts
-
apps/api/src/app/user/user.service.ts
-
apps/api/src/decorators/has-permission.decorator.ts
-
apps/api/src/guards/has-permission.guard.ts
-
apps/api/src/interceptors/redact-values-in-response.interceptor.ts
-
apps/api/src/interceptors/transform-data-source-in-request.interceptor.ts
-
apps/api/src/interceptors/transform-data-source-in-response.interceptor.ts
-
apps/api/src/middlewares/html-template.middleware.ts
|
|
@ -1,3 +1,4 @@ |
|
|
|
/.nx/cache |
|
|
|
/apps/client/src/polyfills.ts |
|
|
|
/dist |
|
|
|
/test/import |
|
|
|
|
|
@ -4,6 +4,7 @@ import { ConfigurationService } from '@ghostfolio/api/services/configuration/con |
|
|
|
import { Access } from '@ghostfolio/common/interfaces'; |
|
|
|
import { permissions } from '@ghostfolio/common/permissions'; |
|
|
|
import type { RequestWithUser } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { |
|
|
|
Body, |
|
|
|
Controller, |
|
|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
import { ConfigurationModule } from '@ghostfolio/api/services/configuration/configuration.module'; |
|
|
|
import { PrismaModule } from '@ghostfolio/api/services/prisma/prisma.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
|
|
|
|
import { AccessController } from './access.controller'; |
|
|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
import { PrismaService } from '@ghostfolio/api/services/prisma/prisma.service'; |
|
|
|
import { AccessWithGranteeUser } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { Injectable } from '@nestjs/common'; |
|
|
|
import { Access, Prisma } from '@prisma/client'; |
|
|
|
|
|
|
|
|
|
@ -2,6 +2,7 @@ import { HasPermission } from '@ghostfolio/api/decorators/has-permission.decorat |
|
|
|
import { HasPermissionGuard } from '@ghostfolio/api/guards/has-permission.guard'; |
|
|
|
import { permissions } from '@ghostfolio/common/permissions'; |
|
|
|
import type { RequestWithUser } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { |
|
|
|
Controller, |
|
|
|
Delete, |
|
|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
import { ExchangeRateDataModule } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.module'; |
|
|
|
import { PrismaModule } from '@ghostfolio/api/services/prisma/prisma.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
|
|
|
|
import { AccountBalanceController } from './account-balance.controller'; |
|
|
|
|
|
@ -2,6 +2,7 @@ import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate- |
|
|
|
import { PrismaService } from '@ghostfolio/api/services/prisma/prisma.service'; |
|
|
|
import { AccountBalancesResponse, Filter } from '@ghostfolio/common/interfaces'; |
|
|
|
import { UserWithSettings } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { Injectable } from '@nestjs/common'; |
|
|
|
import { AccountBalance, Prisma } from '@prisma/client'; |
|
|
|
|
|
|
|
|
|
@ -14,6 +14,7 @@ import type { |
|
|
|
AccountWithValue, |
|
|
|
RequestWithUser |
|
|
|
} from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { |
|
|
|
Body, |
|
|
|
Controller, |
|
|
|
|
|
@ -7,6 +7,7 @@ import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data- |
|
|
|
import { ExchangeRateDataModule } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.module'; |
|
|
|
import { ImpersonationModule } from '@ghostfolio/api/services/impersonation/impersonation.module'; |
|
|
|
import { PrismaModule } from '@ghostfolio/api/services/prisma/prisma.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
|
|
|
|
import { AccountController } from './account.controller'; |
|
|
|
|
|
@ -2,6 +2,7 @@ import { AccountBalanceService } from '@ghostfolio/api/app/account-balance/accou |
|
|
|
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; |
|
|
|
import { PrismaService } from '@ghostfolio/api/services/prisma/prisma.service'; |
|
|
|
import { Filter } from '@ghostfolio/common/interfaces'; |
|
|
|
|
|
|
|
import { Injectable } from '@nestjs/common'; |
|
|
|
import { Account, Order, Platform, Prisma } from '@prisma/client'; |
|
|
|
import Big from 'big.js'; |
|
|
|
|
|
@ -25,6 +25,7 @@ import type { |
|
|
|
MarketDataPreset, |
|
|
|
RequestWithUser |
|
|
|
} from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { |
|
|
|
Body, |
|
|
|
Controller, |
|
|
|
|
|
@ -8,6 +8,7 @@ import { MarketDataModule } from '@ghostfolio/api/services/market-data/market-da |
|
|
|
import { PrismaModule } from '@ghostfolio/api/services/prisma/prisma.module'; |
|
|
|
import { PropertyModule } from '@ghostfolio/api/services/property/property.module'; |
|
|
|
import { SymbolProfileModule } from '@ghostfolio/api/services/symbol-profile/symbol-profile.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
|
|
|
|
import { AdminController } from './admin.controller'; |
|
|
|
|
|
@ -22,6 +22,7 @@ import { |
|
|
|
UniqueAsset |
|
|
|
} from '@ghostfolio/common/interfaces'; |
|
|
|
import { MarketDataPreset } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { BadRequestException, Injectable } from '@nestjs/common'; |
|
|
|
import { |
|
|
|
AssetSubClass, |
|
|
|
|
|
@ -2,6 +2,7 @@ import { HasPermission } from '@ghostfolio/api/decorators/has-permission.decorat |
|
|
|
import { HasPermissionGuard } from '@ghostfolio/api/guards/has-permission.guard'; |
|
|
|
import { AdminJobs } from '@ghostfolio/common/interfaces'; |
|
|
|
import { permissions } from '@ghostfolio/common/permissions'; |
|
|
|
|
|
|
|
import { |
|
|
|
Controller, |
|
|
|
Delete, |
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
import { DataGatheringModule } from '@ghostfolio/api/services/data-gathering/data-gathering.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
|
|
|
|
import { QueueController } from './queue.controller'; |
|
|
|
|
|
@ -3,6 +3,7 @@ import { |
|
|
|
QUEUE_JOB_STATUS_LIST |
|
|
|
} from '@ghostfolio/common/config'; |
|
|
|
import { AdminJobs } from '@ghostfolio/common/interfaces'; |
|
|
|
|
|
|
|
import { InjectQueue } from '@nestjs/bull'; |
|
|
|
import { Injectable } from '@nestjs/common'; |
|
|
|
import { JobStatus, Queue } from 'bull'; |
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; |
|
|
|
|
|
|
|
import { Controller } from '@nestjs/common'; |
|
|
|
|
|
|
|
@Controller() |
|
|
|
|
|
@ -1,5 +1,3 @@ |
|
|
|
import { join } from 'path'; |
|
|
|
|
|
|
|
import { ConfigurationModule } from '@ghostfolio/api/services/configuration/configuration.module'; |
|
|
|
import { CronService } from '@ghostfolio/api/services/cron.service'; |
|
|
|
import { DataGatheringModule } from '@ghostfolio/api/services/data-gathering/data-gathering.module'; |
|
|
@ -12,12 +10,14 @@ import { |
|
|
|
DEFAULT_LANGUAGE_CODE, |
|
|
|
SUPPORTED_LANGUAGE_CODES |
|
|
|
} from '@ghostfolio/common/config'; |
|
|
|
|
|
|
|
import { BullModule } from '@nestjs/bull'; |
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
import { ConfigModule } from '@nestjs/config'; |
|
|
|
import { ScheduleModule } from '@nestjs/schedule'; |
|
|
|
import { ServeStaticModule } from '@nestjs/serve-static'; |
|
|
|
import { StatusCodes } from 'http-status-codes'; |
|
|
|
import { join } from 'path'; |
|
|
|
|
|
|
|
import { AccessModule } from './access/access.module'; |
|
|
|
import { AccountModule } from './account/account.module'; |
|
|
|
|
|
@ -2,6 +2,7 @@ import { AuthDeviceService } from '@ghostfolio/api/app/auth-device/auth-device.s |
|
|
|
import { HasPermission } from '@ghostfolio/api/decorators/has-permission.decorator'; |
|
|
|
import { HasPermissionGuard } from '@ghostfolio/api/guards/has-permission.guard'; |
|
|
|
import { permissions } from '@ghostfolio/common/permissions'; |
|
|
|
|
|
|
|
import { Controller, Delete, Param, UseGuards } from '@nestjs/common'; |
|
|
|
import { AuthGuard } from '@nestjs/passport'; |
|
|
|
|
|
|
|
|
|
@ -2,6 +2,7 @@ import { AuthDeviceController } from '@ghostfolio/api/app/auth-device/auth-devic |
|
|
|
import { AuthDeviceService } from '@ghostfolio/api/app/auth-device/auth-device.service'; |
|
|
|
import { ConfigurationModule } from '@ghostfolio/api/services/configuration/configuration.module'; |
|
|
|
import { PrismaModule } from '@ghostfolio/api/services/prisma/prisma.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
import { JwtModule } from '@nestjs/jwt'; |
|
|
|
|
|
|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; |
|
|
|
import { PrismaService } from '@ghostfolio/api/services/prisma/prisma.service'; |
|
|
|
|
|
|
|
import { Injectable } from '@nestjs/common'; |
|
|
|
import { AuthDevice, Prisma } from '@prisma/client'; |
|
|
|
|
|
|
|
|
|
@ -3,6 +3,7 @@ import { HasPermissionGuard } from '@ghostfolio/api/guards/has-permission.guard' |
|
|
|
import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; |
|
|
|
import { DEFAULT_LANGUAGE_CODE } from '@ghostfolio/common/config'; |
|
|
|
import { OAuthResponse } from '@ghostfolio/common/interfaces'; |
|
|
|
|
|
|
|
import { |
|
|
|
Body, |
|
|
|
Controller, |
|
|
|
|
|
@ -5,6 +5,7 @@ import { UserModule } from '@ghostfolio/api/app/user/user.module'; |
|
|
|
import { ConfigurationModule } from '@ghostfolio/api/services/configuration/configuration.module'; |
|
|
|
import { PrismaModule } from '@ghostfolio/api/services/prisma/prisma.module'; |
|
|
|
import { PropertyModule } from '@ghostfolio/api/services/property/property.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
import { JwtModule } from '@nestjs/jwt'; |
|
|
|
|
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
import { UserService } from '@ghostfolio/api/app/user/user.service'; |
|
|
|
import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; |
|
|
|
import { PropertyService } from '@ghostfolio/api/services/property/property.service'; |
|
|
|
|
|
|
|
import { Injectable, InternalServerErrorException } from '@nestjs/common'; |
|
|
|
import { JwtService } from '@nestjs/jwt'; |
|
|
|
import { Provider } from '@prisma/client'; |
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; |
|
|
|
|
|
|
|
import { Injectable, Logger } from '@nestjs/common'; |
|
|
|
import { PassportStrategy } from '@nestjs/passport'; |
|
|
|
import { Provider } from '@prisma/client'; |
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
import { AuthDeviceDto } from '@ghostfolio/api/app/auth-device/auth-device.dto'; |
|
|
|
|
|
|
|
import { Provider } from '@prisma/client'; |
|
|
|
|
|
|
|
export interface AuthDeviceDialogParams { |
|
|
|
|
|
@ -2,6 +2,7 @@ import { UserService } from '@ghostfolio/api/app/user/user.service'; |
|
|
|
import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; |
|
|
|
import { PrismaService } from '@ghostfolio/api/services/prisma/prisma.service'; |
|
|
|
import { HEADER_KEY_TIMEZONE } from '@ghostfolio/common/config'; |
|
|
|
|
|
|
|
import { Injectable, UnauthorizedException } from '@nestjs/common'; |
|
|
|
import { PassportStrategy } from '@nestjs/passport'; |
|
|
|
import * as countriesAndTimezones from 'countries-and-timezones'; |
|
|
|
|
|
@ -3,6 +3,7 @@ import { AuthDeviceService } from '@ghostfolio/api/app/auth-device/auth-device.s |
|
|
|
import { UserService } from '@ghostfolio/api/app/user/user.service'; |
|
|
|
import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; |
|
|
|
import type { RequestWithUser } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { |
|
|
|
Inject, |
|
|
|
Injectable, |
|
|
|
|
|
@ -9,6 +9,7 @@ import type { |
|
|
|
} from '@ghostfolio/common/interfaces'; |
|
|
|
import { permissions } from '@ghostfolio/common/permissions'; |
|
|
|
import type { RequestWithUser } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { |
|
|
|
Body, |
|
|
|
Controller, |
|
|
|
|
|
@ -7,6 +7,7 @@ import { MarketDataModule } from '@ghostfolio/api/services/market-data/market-da |
|
|
|
import { PrismaModule } from '@ghostfolio/api/services/prisma/prisma.module'; |
|
|
|
import { PropertyModule } from '@ghostfolio/api/services/property/property.module'; |
|
|
|
import { SymbolProfileModule } from '@ghostfolio/api/services/symbol-profile/symbol-profile.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
|
|
|
|
import { BenchmarkController } from './benchmark.controller'; |
|
|
|
|
|
@ -23,6 +23,7 @@ import { |
|
|
|
UniqueAsset |
|
|
|
} from '@ghostfolio/common/interfaces'; |
|
|
|
import { BenchmarkTrend } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { Injectable, Logger } from '@nestjs/common'; |
|
|
|
import { SymbolProfile } from '@prisma/client'; |
|
|
|
import Big from 'big.js'; |
|
|
|
|
|
@ -2,6 +2,7 @@ import { RedisCacheService } from '@ghostfolio/api/app/redis-cache/redis-cache.s |
|
|
|
import { HasPermission } from '@ghostfolio/api/decorators/has-permission.decorator'; |
|
|
|
import { HasPermissionGuard } from '@ghostfolio/api/guards/has-permission.guard'; |
|
|
|
import { permissions } from '@ghostfolio/common/permissions'; |
|
|
|
|
|
|
|
import { Controller, Post, UseGuards } from '@nestjs/common'; |
|
|
|
import { AuthGuard } from '@nestjs/passport'; |
|
|
|
|
|
|
|
|
|
@ -5,6 +5,7 @@ import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data- |
|
|
|
import { ExchangeRateDataModule } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.module'; |
|
|
|
import { PrismaModule } from '@ghostfolio/api/services/prisma/prisma.module'; |
|
|
|
import { SymbolProfileModule } from '@ghostfolio/api/services/symbol-profile/symbol-profile.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
|
|
|
|
import { CacheController } from './cache.controller'; |
|
|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
import { HasPermissionGuard } from '@ghostfolio/api/guards/has-permission.guard'; |
|
|
|
import { IDataProviderHistoricalResponse } from '@ghostfolio/api/services/interfaces/interfaces'; |
|
|
|
|
|
|
|
import { |
|
|
|
Controller, |
|
|
|
Get, |
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
import { ExchangeRateDataModule } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
|
|
|
|
import { ExchangeRateController } from './exchange-rate.controller'; |
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; |
|
|
|
|
|
|
|
import { Injectable } from '@nestjs/common'; |
|
|
|
|
|
|
|
@Injectable() |
|
|
|
|
|
@ -2,6 +2,7 @@ import { HasPermissionGuard } from '@ghostfolio/api/guards/has-permission.guard' |
|
|
|
import { ApiService } from '@ghostfolio/api/services/api/api.service'; |
|
|
|
import { Export } from '@ghostfolio/common/interfaces'; |
|
|
|
import type { RequestWithUser } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { Controller, Get, Inject, Query, UseGuards } from '@nestjs/common'; |
|
|
|
import { REQUEST } from '@nestjs/core'; |
|
|
|
import { AuthGuard } from '@nestjs/passport'; |
|
|
|
|
|
@ -5,6 +5,7 @@ import { ApiModule } from '@ghostfolio/api/services/api/api.module'; |
|
|
|
import { ConfigurationModule } from '@ghostfolio/api/services/configuration/configuration.module'; |
|
|
|
import { DataGatheringModule } from '@ghostfolio/api/services/data-gathering/data-gathering.module'; |
|
|
|
import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data-provider.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
|
|
|
|
import { ExportController } from './export.controller'; |
|
|
|
|
|
@ -2,6 +2,7 @@ import { AccountService } from '@ghostfolio/api/app/account/account.service'; |
|
|
|
import { OrderService } from '@ghostfolio/api/app/order/order.service'; |
|
|
|
import { environment } from '@ghostfolio/api/environments/environment'; |
|
|
|
import { Filter, Export } from '@ghostfolio/common/interfaces'; |
|
|
|
|
|
|
|
import { Injectable } from '@nestjs/common'; |
|
|
|
|
|
|
|
@Injectable() |
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
import { TransformDataSourceInRequestInterceptor } from '@ghostfolio/api/interceptors/transform-data-source-in-request.interceptor'; |
|
|
|
|
|
|
|
import { |
|
|
|
Controller, |
|
|
|
Get, |
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
import { ConfigurationModule } from '@ghostfolio/api/services/configuration/configuration.module'; |
|
|
|
import { DataEnhancerModule } from '@ghostfolio/api/services/data-provider/data-enhancer/data-enhancer.module'; |
|
|
|
import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data-provider.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
|
|
|
|
import { HealthController } from './health.controller'; |
|
|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
import { DataEnhancerService } from '@ghostfolio/api/services/data-provider/data-enhancer/data-enhancer.service'; |
|
|
|
import { DataProviderService } from '@ghostfolio/api/services/data-provider/data-provider.service'; |
|
|
|
|
|
|
|
import { Injectable } from '@nestjs/common'; |
|
|
|
import { DataSource } from '@prisma/client'; |
|
|
|
|
|
|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
import { CreateAccountDto } from '@ghostfolio/api/app/account/create-account.dto'; |
|
|
|
import { CreateOrderDto } from '@ghostfolio/api/app/order/create-order.dto'; |
|
|
|
|
|
|
|
import { Type } from 'class-transformer'; |
|
|
|
import { IsArray, IsOptional, ValidateNested } from 'class-validator'; |
|
|
|
|
|
|
|
|
|
@ -6,6 +6,7 @@ import { ConfigurationService } from '@ghostfolio/api/services/configuration/con |
|
|
|
import { ImportResponse } from '@ghostfolio/common/interfaces'; |
|
|
|
import { hasPermission, permissions } from '@ghostfolio/common/permissions'; |
|
|
|
import type { RequestWithUser } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { |
|
|
|
Body, |
|
|
|
Controller, |
|
|
|
|
|
@ -10,6 +10,7 @@ import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data- |
|
|
|
import { ExchangeRateDataModule } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.module'; |
|
|
|
import { PrismaModule } from '@ghostfolio/api/services/prisma/prisma.module'; |
|
|
|
import { SymbolProfileModule } from '@ghostfolio/api/services/symbol-profile/symbol-profile.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
|
|
|
|
import { ImportController } from './import.controller'; |
|
|
|
|
|
@ -24,6 +24,7 @@ import { |
|
|
|
OrderWithAccount, |
|
|
|
UserWithSettings |
|
|
|
} from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { Injectable } from '@nestjs/common'; |
|
|
|
import { DataSource, Prisma, SymbolProfile } from '@prisma/client'; |
|
|
|
import Big from 'big.js'; |
|
|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
import { TransformDataSourceInResponseInterceptor } from '@ghostfolio/api/interceptors/transform-data-source-in-response.interceptor'; |
|
|
|
import { InfoItem } from '@ghostfolio/common/interfaces'; |
|
|
|
|
|
|
|
import { Controller, Get, UseInterceptors } from '@nestjs/common'; |
|
|
|
|
|
|
|
import { InfoService } from './info.service'; |
|
|
|
|
|
@ -10,6 +10,7 @@ import { PrismaModule } from '@ghostfolio/api/services/prisma/prisma.module'; |
|
|
|
import { PropertyModule } from '@ghostfolio/api/services/property/property.module'; |
|
|
|
import { SymbolProfileModule } from '@ghostfolio/api/services/symbol-profile/symbol-profile.module'; |
|
|
|
import { TagModule } from '@ghostfolio/api/services/tag/tag.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
import { JwtModule } from '@nestjs/jwt'; |
|
|
|
|
|
|
|
|
|
@ -28,6 +28,7 @@ import { |
|
|
|
} from '@ghostfolio/common/interfaces'; |
|
|
|
import { permissions } from '@ghostfolio/common/permissions'; |
|
|
|
import { SubscriptionOffer } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { Injectable, Logger } from '@nestjs/common'; |
|
|
|
import { JwtService } from '@nestjs/jwt'; |
|
|
|
import * as cheerio from 'cheerio'; |
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
import { TransformDataSourceInRequestInterceptor } from '@ghostfolio/api/interceptors/transform-data-source-in-request.interceptor'; |
|
|
|
|
|
|
|
import { |
|
|
|
Controller, |
|
|
|
Get, |
|
|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
import { ConfigurationModule } from '@ghostfolio/api/services/configuration/configuration.module'; |
|
|
|
import { SymbolProfileModule } from '@ghostfolio/api/services/symbol-profile/symbol-profile.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
|
|
|
|
import { LogoController } from './logo.controller'; |
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; |
|
|
|
import { SymbolProfileService } from '@ghostfolio/api/services/symbol-profile/symbol-profile.service'; |
|
|
|
import { UniqueAsset } from '@ghostfolio/common/interfaces'; |
|
|
|
|
|
|
|
import { HttpException, Injectable } from '@nestjs/common'; |
|
|
|
import { DataSource } from '@prisma/client'; |
|
|
|
import got from 'got'; |
|
|
|
|
|
@ -9,6 +9,7 @@ import { ImpersonationService } from '@ghostfolio/api/services/impersonation/imp |
|
|
|
import { HEADER_KEY_IMPERSONATION } from '@ghostfolio/common/config'; |
|
|
|
import { hasPermission, permissions } from '@ghostfolio/common/permissions'; |
|
|
|
import type { RequestWithUser } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { |
|
|
|
Body, |
|
|
|
Controller, |
|
|
|
|
|
@ -11,6 +11,7 @@ import { ExchangeRateDataModule } from '@ghostfolio/api/services/exchange-rate-d |
|
|
|
import { ImpersonationModule } from '@ghostfolio/api/services/impersonation/impersonation.module'; |
|
|
|
import { PrismaModule } from '@ghostfolio/api/services/prisma/prisma.module'; |
|
|
|
import { SymbolProfileModule } from '@ghostfolio/api/services/symbol-profile/symbol-profile.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
|
|
|
|
import { OrderController } from './order.controller'; |
|
|
|
|
|
@ -10,6 +10,7 @@ import { |
|
|
|
import { getAssetProfileIdentifier } from '@ghostfolio/common/helper'; |
|
|
|
import { Filter } from '@ghostfolio/common/interfaces'; |
|
|
|
import { OrderWithAccount } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { Injectable } from '@nestjs/common'; |
|
|
|
import { |
|
|
|
AssetClass, |
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
import { HasPermission } from '@ghostfolio/api/decorators/has-permission.decorator'; |
|
|
|
import { HasPermissionGuard } from '@ghostfolio/api/guards/has-permission.guard'; |
|
|
|
import { permissions } from '@ghostfolio/common/permissions'; |
|
|
|
|
|
|
|
import { |
|
|
|
Body, |
|
|
|
Controller, |
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
import { PrismaModule } from '@ghostfolio/api/services/prisma/prisma.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
|
|
|
|
import { PlatformController } from './platform.controller'; |
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
import { PrismaService } from '@ghostfolio/api/services/prisma/prisma.service'; |
|
|
|
|
|
|
|
import { Injectable } from '@nestjs/common'; |
|
|
|
import { Platform, Prisma } from '@prisma/client'; |
|
|
|
|
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
import { parseDate, resetHours } from '@ghostfolio/common/helper'; |
|
|
|
|
|
|
|
import { addDays, endOfDay, isBefore, isSameDay } from 'date-fns'; |
|
|
|
|
|
|
|
import { GetValueObject } from './interfaces/get-value-object.interface'; |
|
|
|
|
|
@ -2,6 +2,7 @@ import { DataProviderService } from '@ghostfolio/api/services/data-provider/data |
|
|
|
import { MarketDataService } from '@ghostfolio/api/services/market-data/market-data.service'; |
|
|
|
import { PropertyService } from '@ghostfolio/api/services/property/property.service'; |
|
|
|
import { UniqueAsset } from '@ghostfolio/common/interfaces'; |
|
|
|
|
|
|
|
import { DataSource, MarketData } from '@prisma/client'; |
|
|
|
|
|
|
|
import { CurrentRateService } from './current-rate.service'; |
|
|
|
|
|
@ -6,6 +6,7 @@ import { |
|
|
|
ResponseError, |
|
|
|
UniqueAsset |
|
|
|
} from '@ghostfolio/common/interfaces'; |
|
|
|
|
|
|
|
import { Injectable } from '@nestjs/common'; |
|
|
|
import { isBefore, isToday } from 'date-fns'; |
|
|
|
import { flatten, isEmpty, uniqBy } from 'lodash'; |
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
import { ResponseError, TimelinePosition } from '@ghostfolio/common/interfaces'; |
|
|
|
|
|
|
|
import Big from 'big.js'; |
|
|
|
|
|
|
|
export interface CurrentPositions extends ResponseError { |
|
|
|
|
|
@ -4,6 +4,7 @@ import { |
|
|
|
HistoricalDataItem |
|
|
|
} from '@ghostfolio/common/interfaces'; |
|
|
|
import { OrderWithAccount } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { Tag } from '@prisma/client'; |
|
|
|
|
|
|
|
export interface PortfolioPositionDetail { |
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
import { CurrentRateService } from '@ghostfolio/api/app/portfolio/current-rate.service'; |
|
|
|
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; |
|
|
|
import { parseDate } from '@ghostfolio/common/helper'; |
|
|
|
|
|
|
|
import Big from 'big.js'; |
|
|
|
|
|
|
|
import { CurrentRateServiceMock } from './current-rate.service.mock'; |
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
import { CurrentRateService } from '@ghostfolio/api/app/portfolio/current-rate.service'; |
|
|
|
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; |
|
|
|
import { parseDate } from '@ghostfolio/common/helper'; |
|
|
|
|
|
|
|
import Big from 'big.js'; |
|
|
|
|
|
|
|
import { CurrentRateServiceMock } from './current-rate.service.mock'; |
|
|
|
|
|
@ -2,6 +2,7 @@ import { CurrentRateService } from '@ghostfolio/api/app/portfolio/current-rate.s |
|
|
|
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; |
|
|
|
import { ExchangeRateDataServiceMock } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service.mock'; |
|
|
|
import { parseDate } from '@ghostfolio/common/helper'; |
|
|
|
|
|
|
|
import Big from 'big.js'; |
|
|
|
|
|
|
|
import { CurrentRateServiceMock } from './current-rate.service.mock'; |
|
|
|
|
|
@ -2,6 +2,7 @@ import { CurrentRateService } from '@ghostfolio/api/app/portfolio/current-rate.s |
|
|
|
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; |
|
|
|
import { ExchangeRateDataServiceMock } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service.mock'; |
|
|
|
import { parseDate } from '@ghostfolio/common/helper'; |
|
|
|
|
|
|
|
import Big from 'big.js'; |
|
|
|
|
|
|
|
import { CurrentRateServiceMock } from './current-rate.service.mock'; |
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
import { CurrentRateService } from '@ghostfolio/api/app/portfolio/current-rate.service'; |
|
|
|
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; |
|
|
|
import { parseDate } from '@ghostfolio/common/helper'; |
|
|
|
|
|
|
|
import Big from 'big.js'; |
|
|
|
|
|
|
|
import { CurrentRateServiceMock } from './current-rate.service.mock'; |
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
import { CurrentRateService } from '@ghostfolio/api/app/portfolio/current-rate.service'; |
|
|
|
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; |
|
|
|
import { parseDate } from '@ghostfolio/common/helper'; |
|
|
|
|
|
|
|
import Big from 'big.js'; |
|
|
|
|
|
|
|
import { CurrentRateServiceMock } from './current-rate.service.mock'; |
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
import { CurrentRateService } from '@ghostfolio/api/app/portfolio/current-rate.service'; |
|
|
|
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; |
|
|
|
import { parseDate } from '@ghostfolio/common/helper'; |
|
|
|
|
|
|
|
import Big from 'big.js'; |
|
|
|
|
|
|
|
import { CurrentRateServiceMock } from './current-rate.service.mock'; |
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; |
|
|
|
|
|
|
|
import Big from 'big.js'; |
|
|
|
|
|
|
|
import { CurrentRateService } from './current-rate.service'; |
|
|
|
|
|
@ -10,6 +10,7 @@ import { |
|
|
|
TimelinePosition |
|
|
|
} from '@ghostfolio/common/interfaces'; |
|
|
|
import { GroupBy } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { Logger } from '@nestjs/common'; |
|
|
|
import { Type as TypeOfOrder } from '@prisma/client'; |
|
|
|
import Big from 'big.js'; |
|
|
|
|
|
@ -28,6 +28,7 @@ import type { |
|
|
|
GroupBy, |
|
|
|
RequestWithUser |
|
|
|
} from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { |
|
|
|
Controller, |
|
|
|
Get, |
|
|
|
|
|
@ -12,6 +12,7 @@ import { ImpersonationModule } from '@ghostfolio/api/services/impersonation/impe |
|
|
|
import { MarketDataModule } from '@ghostfolio/api/services/market-data/market-data.module'; |
|
|
|
import { PrismaModule } from '@ghostfolio/api/services/prisma/prisma.module'; |
|
|
|
import { SymbolProfileModule } from '@ghostfolio/api/services/symbol-profile/symbol-profile.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
|
|
|
|
import { CurrentRateService } from './current-rate.service'; |
|
|
|
|
|
@ -48,6 +48,7 @@ import type { |
|
|
|
RequestWithUser, |
|
|
|
UserWithSettings |
|
|
|
} from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { Inject, Injectable } from '@nestjs/common'; |
|
|
|
import { REQUEST } from '@nestjs/core'; |
|
|
|
import { |
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
import { RuleSettings } from '@ghostfolio/api/models/interfaces/rule-settings.interface'; |
|
|
|
import { Rule } from '@ghostfolio/api/models/rule'; |
|
|
|
import { UserSettings } from '@ghostfolio/common/interfaces'; |
|
|
|
|
|
|
|
import { Injectable } from '@nestjs/common'; |
|
|
|
|
|
|
|
@Injectable() |
|
|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
import { ConfigurationModule } from '@ghostfolio/api/services/configuration/configuration.module'; |
|
|
|
import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; |
|
|
|
|
|
|
|
import { CacheModule } from '@nestjs/cache-manager'; |
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
import * as redisStore from 'cache-manager-redis-store'; |
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; |
|
|
|
import { getAssetProfileIdentifier } from '@ghostfolio/common/helper'; |
|
|
|
import { UniqueAsset } from '@ghostfolio/common/interfaces'; |
|
|
|
|
|
|
|
import { CACHE_MANAGER } from '@nestjs/cache-manager'; |
|
|
|
import { Inject, Injectable, Logger } from '@nestjs/common'; |
|
|
|
|
|
|
|
|
|
@ -1,14 +1,14 @@ |
|
|
|
import * as fs from 'fs'; |
|
|
|
import * as path from 'path'; |
|
|
|
|
|
|
|
import { |
|
|
|
DATE_FORMAT, |
|
|
|
getYesterday, |
|
|
|
interpolate |
|
|
|
} from '@ghostfolio/common/helper'; |
|
|
|
|
|
|
|
import { Controller, Get, Res, VERSION_NEUTRAL, Version } from '@nestjs/common'; |
|
|
|
import { format } from 'date-fns'; |
|
|
|
import { Response } from 'express'; |
|
|
|
import * as fs from 'fs'; |
|
|
|
import * as path from 'path'; |
|
|
|
|
|
|
|
@Controller('sitemap.xml') |
|
|
|
export class SitemapController { |
|
|
|
|
|
@ -5,6 +5,7 @@ import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data- |
|
|
|
import { ExchangeRateDataModule } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.module'; |
|
|
|
import { PrismaModule } from '@ghostfolio/api/services/prisma/prisma.module'; |
|
|
|
import { SymbolProfileModule } from '@ghostfolio/api/services/symbol-profile/symbol-profile.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
|
|
|
|
import { SitemapController } from './sitemap.controller'; |
|
|
|
|
|
@ -7,6 +7,7 @@ import { |
|
|
|
} from '@ghostfolio/common/config'; |
|
|
|
import { Coupon } from '@ghostfolio/common/interfaces'; |
|
|
|
import type { RequestWithUser } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { |
|
|
|
Body, |
|
|
|
Controller, |
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
import { ConfigurationModule } from '@ghostfolio/api/services/configuration/configuration.module'; |
|
|
|
import { PrismaModule } from '@ghostfolio/api/services/prisma/prisma.module'; |
|
|
|
import { PropertyModule } from '@ghostfolio/api/services/property/property.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
|
|
|
|
import { SubscriptionController } from './subscription.controller'; |
|
|
|
|
|
@ -4,6 +4,7 @@ import { DEFAULT_LANGUAGE_CODE } from '@ghostfolio/common/config'; |
|
|
|
import { parseDate } from '@ghostfolio/common/helper'; |
|
|
|
import { SubscriptionOffer, UserWithSettings } from '@ghostfolio/common/types'; |
|
|
|
import { SubscriptionType } from '@ghostfolio/common/types/subscription-type.type'; |
|
|
|
|
|
|
|
import { Injectable, Logger } from '@nestjs/common'; |
|
|
|
import { Subscription } from '@prisma/client'; |
|
|
|
import { addMilliseconds, isBefore } from 'date-fns'; |
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
import { DataProviderInfo } from '@ghostfolio/common/interfaces'; |
|
|
|
|
|
|
|
import { AssetClass, AssetSubClass, DataSource } from '@prisma/client'; |
|
|
|
|
|
|
|
export interface LookupItem { |
|
|
|
|
|
@ -3,6 +3,7 @@ import { TransformDataSourceInRequestInterceptor } from '@ghostfolio/api/interce |
|
|
|
import { TransformDataSourceInResponseInterceptor } from '@ghostfolio/api/interceptors/transform-data-source-in-response.interceptor'; |
|
|
|
import { IDataProviderHistoricalResponse } from '@ghostfolio/api/services/interfaces/interfaces'; |
|
|
|
import type { RequestWithUser } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { |
|
|
|
Controller, |
|
|
|
Get, |
|
|
|
|
|
@ -2,6 +2,7 @@ import { ConfigurationModule } from '@ghostfolio/api/services/configuration/conf |
|
|
|
import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data-provider.module'; |
|
|
|
import { MarketDataModule } from '@ghostfolio/api/services/market-data/market-data.module'; |
|
|
|
import { PrismaModule } from '@ghostfolio/api/services/prisma/prisma.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
|
|
|
|
import { SymbolController } from './symbol.controller'; |
|
|
|
|
|
@ -7,6 +7,7 @@ import { MarketDataService } from '@ghostfolio/api/services/market-data/market-d |
|
|
|
import { DATE_FORMAT } from '@ghostfolio/common/helper'; |
|
|
|
import { HistoricalDataItem } from '@ghostfolio/common/interfaces'; |
|
|
|
import { UserWithSettings } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { Injectable, Logger } from '@nestjs/common'; |
|
|
|
import { format, subDays } from 'date-fns'; |
|
|
|
|
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
import { HasPermission } from '@ghostfolio/api/decorators/has-permission.decorator'; |
|
|
|
import { HasPermissionGuard } from '@ghostfolio/api/guards/has-permission.guard'; |
|
|
|
import { permissions } from '@ghostfolio/common/permissions'; |
|
|
|
|
|
|
|
import { |
|
|
|
Body, |
|
|
|
Controller, |
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
import { PrismaModule } from '@ghostfolio/api/services/prisma/prisma.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
|
|
|
|
import { TagController } from './tag.controller'; |
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
import { PrismaService } from '@ghostfolio/api/services/prisma/prisma.service'; |
|
|
|
|
|
|
|
import { Injectable } from '@nestjs/common'; |
|
|
|
import { Prisma, Tag } from '@prisma/client'; |
|
|
|
|
|
|
|
|
|
@ -3,6 +3,7 @@ import type { |
|
|
|
DateRange, |
|
|
|
ViewMode |
|
|
|
} from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { |
|
|
|
IsArray, |
|
|
|
IsBoolean, |
|
|
|
|
|
@ -4,6 +4,7 @@ import { PropertyService } from '@ghostfolio/api/services/property/property.serv |
|
|
|
import { User, UserSettings } from '@ghostfolio/common/interfaces'; |
|
|
|
import { hasPermission, permissions } from '@ghostfolio/common/permissions'; |
|
|
|
import type { RequestWithUser } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { |
|
|
|
Body, |
|
|
|
Controller, |
|
|
|
|
|
@ -3,6 +3,7 @@ import { ConfigurationModule } from '@ghostfolio/api/services/configuration/conf |
|
|
|
import { PrismaModule } from '@ghostfolio/api/services/prisma/prisma.module'; |
|
|
|
import { PropertyModule } from '@ghostfolio/api/services/property/property.module'; |
|
|
|
import { TagModule } from '@ghostfolio/api/services/tag/tag.module'; |
|
|
|
|
|
|
|
import { Module } from '@nestjs/common'; |
|
|
|
import { JwtModule } from '@nestjs/jwt'; |
|
|
|
|
|
|
|
|
|
@ -21,6 +21,7 @@ import { |
|
|
|
permissions |
|
|
|
} from '@ghostfolio/common/permissions'; |
|
|
|
import { UserWithSettings } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { Injectable } from '@nestjs/common'; |
|
|
|
import { Prisma, Role, User } from '@prisma/client'; |
|
|
|
import { differenceInDays } from 'date-fns'; |
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
import { SetMetadata } from '@nestjs/common'; |
|
|
|
|
|
|
|
export const HAS_PERMISSION_KEY = 'has_permission'; |
|
|
|
|
|
|
|
export function HasPermission(permission: string) { |
|
|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
import { HAS_PERMISSION_KEY } from '@ghostfolio/api/decorators/has-permission.decorator'; |
|
|
|
import { hasPermission } from '@ghostfolio/common/permissions'; |
|
|
|
|
|
|
|
import { |
|
|
|
CanActivate, |
|
|
|
ExecutionContext, |
|
|
|
|
|
@ -2,6 +2,7 @@ import { UserService } from '@ghostfolio/api/app/user/user.service'; |
|
|
|
import { redactAttributes } from '@ghostfolio/api/helper/object.helper'; |
|
|
|
import { HEADER_KEY_IMPERSONATION } from '@ghostfolio/common/config'; |
|
|
|
import { UserWithSettings } from '@ghostfolio/common/types'; |
|
|
|
|
|
|
|
import { |
|
|
|
CallHandler, |
|
|
|
ExecutionContext, |
|
|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; |
|
|
|
import { decodeDataSource } from '@ghostfolio/common/helper'; |
|
|
|
|
|
|
|
import { |
|
|
|
CallHandler, |
|
|
|
ExecutionContext, |
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
import { redactAttributes } from '@ghostfolio/api/helper/object.helper'; |
|
|
|
import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; |
|
|
|
import { encodeDataSource } from '@ghostfolio/common/helper'; |
|
|
|
|
|
|
|
import { |
|
|
|
CallHandler, |
|
|
|
ExecutionContext, |
|
|
|
|
|
@ -1,6 +1,3 @@ |
|
|
|
import * as fs from 'fs'; |
|
|
|
import { join } from 'path'; |
|
|
|
|
|
|
|
import { environment } from '@ghostfolio/api/environments/environment'; |
|
|
|
import { I18nService } from '@ghostfolio/api/services/i18n/i18n.service'; |
|
|
|
import { |
|
|
@ -9,8 +6,11 @@ import { |
|
|
|
SUPPORTED_LANGUAGE_CODES |
|
|
|
} from '@ghostfolio/common/config'; |
|
|
|
import { DATE_FORMAT, interpolate } from '@ghostfolio/common/helper'; |
|
|
|
|
|
|
|
import { format } from 'date-fns'; |
|
|
|
import { NextFunction, Request, Response } from 'express'; |
|
|
|
import * as fs from 'fs'; |
|
|
|
import { join } from 'path'; |
|
|
|
|
|
|
|
const i18nService = new I18nService(); |
|
|
|
|
|
|
|