mirror of https://github.com/ghostfolio/ghostfolio
Browse Source
Reorganize helper lib (Move interfaces and types) * InfoItem * PortfolioItem * PortfolioOverview * PortfolioPerformance * Position * PortfolioPosition * PortfolioReport * PortfolioReportRule * User * UserSettings * DateRange * AdminData * AccessWithGranteeUser * OrderWithAccount * Granularity * UserWithSettings * RequestWithUserpull/102/head
committed by
GitHub
93 changed files with 244 additions and 213 deletions
@ -1,3 +0,0 @@ |
|||
export * from './lib/config'; |
|||
export * from './lib/helper'; |
|||
export * from './lib/permissions'; |
@ -0,0 +1,29 @@ |
|||
import { Access } from './access.interface'; |
|||
import { AdminData } from './admin-data.interface'; |
|||
import { InfoItem } from './info-item.interface'; |
|||
import { PortfolioItem } from './portfolio-item.interface'; |
|||
import { PortfolioOverview } from './portfolio-overview.interface'; |
|||
import { PortfolioPerformance } from './portfolio-performance.interface'; |
|||
import { PortfolioPosition } from './portfolio-position.interface'; |
|||
import { PortfolioReportRule } from './portfolio-report-rule.interface'; |
|||
import { PortfolioReport } from './portfolio-report.interface'; |
|||
import { Position } from './position.interface'; |
|||
import { UserSettings } from './user-settings.interface'; |
|||
import { UserWithSettings } from './user-with-settings'; |
|||
import { User } from './user.interface'; |
|||
|
|||
export { |
|||
Access, |
|||
AdminData, |
|||
InfoItem, |
|||
PortfolioItem, |
|||
PortfolioOverview, |
|||
PortfolioPerformance, |
|||
PortfolioPosition, |
|||
PortfolioReport, |
|||
PortfolioReportRule, |
|||
Position, |
|||
User, |
|||
UserSettings, |
|||
UserWithSettings |
|||
}; |
@ -0,0 +1,9 @@ |
|||
import { Position } from '@ghostfolio/helper/interfaces'; |
|||
|
|||
export interface PortfolioItem { |
|||
date: string; |
|||
grossPerformancePercent: number; |
|||
investment: number; |
|||
positions: { [symbol: string]: Position }; |
|||
value: number; |
|||
} |
@ -1,7 +1,3 @@ |
|||
export interface PortfolioReport { |
|||
rules: { [group: string]: PortfolioReportRule[] }; |
|||
} |
|||
|
|||
export interface PortfolioReportRule { |
|||
evaluation: string; |
|||
name: string; |
@ -0,0 +1,5 @@ |
|||
import { PortfolioReportRule } from './portfolio-report-rule.interface'; |
|||
|
|||
export interface PortfolioReport { |
|||
rules: { [group: string]: PortfolioReportRule[] }; |
|||
} |
@ -1,13 +1,5 @@ |
|||
import { Currency } from '@prisma/client'; |
|||
|
|||
export interface PortfolioItem { |
|||
date: string; |
|||
grossPerformancePercent: number; |
|||
investment: number; |
|||
positions: { [symbol: string]: Position }; |
|||
value: number; |
|||
} |
|||
|
|||
export interface Position { |
|||
averagePrice: number; |
|||
currency: Currency; |
@ -0,0 +1,6 @@ |
|||
import { Currency } from '@prisma/client'; |
|||
|
|||
export interface UserSettings { |
|||
baseCurrency: Currency; |
|||
locale: string; |
|||
} |
@ -0,0 +1,13 @@ |
|||
import { AccessWithGranteeUser } from './access-with-grantee-user.type'; |
|||
import { DateRange } from './date-range.type'; |
|||
import { Granularity } from './granularity.type'; |
|||
import { OrderWithAccount } from './order-with-account.type'; |
|||
import { RequestWithUser } from './request-with-user.type'; |
|||
|
|||
export { |
|||
AccessWithGranteeUser, |
|||
DateRange, |
|||
Granularity, |
|||
OrderWithAccount, |
|||
RequestWithUser |
|||
}; |
@ -1,3 +1,3 @@ |
|||
import { UserWithSettings } from './user-with-settings'; |
|||
import { UserWithSettings } from '@ghostfolio/helper/interfaces'; |
|||
|
|||
export type RequestWithUser = Request & { user: UserWithSettings }; |
Loading…
Reference in new issue