diff --git a/apps/api/src/app/access/access.service.ts b/apps/api/src/app/access/access.service.ts index 316837dec..93448d15c 100644 --- a/apps/api/src/app/access/access.service.ts +++ b/apps/api/src/app/access/access.service.ts @@ -1,9 +1,8 @@ import { PrismaService } from '@ghostfolio/api/services/prisma.service'; +import { AccessWithGranteeUser } from '@ghostfolio/helper/types'; import { Injectable } from '@nestjs/common'; import { Prisma } from '@prisma/client'; -import { AccessWithGranteeUser } from './interfaces/access-with-grantee-user.type'; - @Injectable() export class AccessService { public constructor(private prisma: PrismaService) {} diff --git a/apps/api/src/app/experimental/experimental.service.ts b/apps/api/src/app/experimental/experimental.service.ts index 5594a8c91..7f4e815f8 100644 --- a/apps/api/src/app/experimental/experimental.service.ts +++ b/apps/api/src/app/experimental/experimental.service.ts @@ -3,11 +3,11 @@ import { DataProviderService } from '@ghostfolio/api/services/data-provider.serv 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 { OrderWithAccount } from '@ghostfolio/helper/types'; import { Injectable } from '@nestjs/common'; import { Currency, Type } from '@prisma/client'; import { parseISO } from 'date-fns'; -import { OrderWithAccount } from '../order/interfaces/order-with-account.type'; import { CreateOrderDto } from './create-order.dto'; import { Data } from './interfaces/data.interface'; diff --git a/apps/api/src/app/order/order.service.ts b/apps/api/src/app/order/order.service.ts index ede9ab9e4..73be22f3c 100644 --- a/apps/api/src/app/order/order.service.ts +++ b/apps/api/src/app/order/order.service.ts @@ -1,11 +1,11 @@ import { DataGatheringService } from '@ghostfolio/api/services/data-gathering.service'; import { PrismaService } from '@ghostfolio/api/services/prisma.service'; +import { OrderWithAccount } from '@ghostfolio/helper/types'; import { Injectable } from '@nestjs/common'; import { Order, Prisma } from '@prisma/client'; import { CacheService } from '../cache/cache.service'; import { RedisCacheService } from '../redis-cache/redis-cache.service'; -import { OrderWithAccount } from './interfaces/order-with-account.type'; @Injectable() export class OrderService { diff --git a/apps/api/src/models/portfolio.ts b/apps/api/src/models/portfolio.ts index 5143d0d0e..a865eca0d 100644 --- a/apps/api/src/models/portfolio.ts +++ b/apps/api/src/models/portfolio.ts @@ -8,6 +8,7 @@ import { Position } from '@ghostfolio/helper/interfaces'; import { DateRange } from '@ghostfolio/helper/types'; +import { OrderWithAccount } from '@ghostfolio/helper/types'; import { add, format, @@ -28,7 +29,6 @@ import { cloneDeep, isEmpty } from 'lodash'; import * as roundTo from 'round-to'; import { UserWithSettings } from '../app/interfaces/user-with-settings'; -import { OrderWithAccount } from '../app/order/interfaces/order-with-account.type'; import { DataProviderService } from '../services/data-provider.service'; import { ExchangeRateDataService } from '../services/exchange-rate-data.service'; import { IOrder } from '../services/interfaces/interfaces'; diff --git a/apps/client/src/app/components/transactions-table/transactions-table.component.ts b/apps/client/src/app/components/transactions-table/transactions-table.component.ts index 5b18561ed..d7008d6a8 100644 --- a/apps/client/src/app/components/transactions-table/transactions-table.component.ts +++ b/apps/client/src/app/components/transactions-table/transactions-table.component.ts @@ -21,8 +21,8 @@ import { MatDialog } from '@angular/material/dialog'; import { MatSort } from '@angular/material/sort'; import { MatTableDataSource } from '@angular/material/table'; import { ActivatedRoute, Router } from '@angular/router'; -import { OrderWithAccount } from '@ghostfolio/api/app/order/interfaces/order-with-account.type'; import { DEFAULT_DATE_FORMAT } from '@ghostfolio/helper/config'; +import { OrderWithAccount } from '@ghostfolio/helper/types'; import { format } from 'date-fns'; import { BehaviorSubject, Observable, Subject, Subscription } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; diff --git a/apps/api/src/app/access/interfaces/access-with-grantee-user.type.ts b/libs/helper/src/lib/types/access-with-grantee-user.type.ts similarity index 100% rename from apps/api/src/app/access/interfaces/access-with-grantee-user.type.ts rename to libs/helper/src/lib/types/access-with-grantee-user.type.ts diff --git a/libs/helper/src/lib/types/index.ts b/libs/helper/src/lib/types/index.ts index 1ef126373..194b53606 100644 --- a/libs/helper/src/lib/types/index.ts +++ b/libs/helper/src/lib/types/index.ts @@ -1,3 +1,5 @@ +import { AccessWithGranteeUser } from './access-with-grantee-user.type'; import { DateRange } from './date-range.type'; +import { OrderWithAccount } from './order-with-account.type'; -export { DateRange }; +export { AccessWithGranteeUser, DateRange, OrderWithAccount }; diff --git a/apps/api/src/app/order/interfaces/order-with-account.type.ts b/libs/helper/src/lib/types/order-with-account.type.ts similarity index 100% rename from apps/api/src/app/order/interfaces/order-with-account.type.ts rename to libs/helper/src/lib/types/order-with-account.type.ts