mirror of https://github.com/ghostfolio/ghostfolio
				
				
			
				 36 changed files with 167 additions and 142 deletions
			
			
		@ -1,28 +0,0 @@ | 
				
			|||||
import { EnhancedSymbolProfile } from '@ghostfolio/common/interfaces'; | 
					 | 
				
			||||
import { AccountWithPlatform } from '@ghostfolio/common/types'; | 
					 | 
				
			||||
 | 
					 | 
				
			||||
import { Order, Tag } from '@prisma/client'; | 
					 | 
				
			||||
 | 
					 | 
				
			||||
export interface Activities { | 
					 | 
				
			||||
  activities: Activity[]; | 
					 | 
				
			||||
  count: number; | 
					 | 
				
			||||
} | 
					 | 
				
			||||
 | 
					 | 
				
			||||
export interface Activity extends Order { | 
					 | 
				
			||||
  account?: AccountWithPlatform; | 
					 | 
				
			||||
  error?: ActivityError; | 
					 | 
				
			||||
  feeInAssetProfileCurrency: number; | 
					 | 
				
			||||
  feeInBaseCurrency: number; | 
					 | 
				
			||||
  SymbolProfile?: EnhancedSymbolProfile; | 
					 | 
				
			||||
  tagIds?: string[]; | 
					 | 
				
			||||
  tags?: Tag[]; | 
					 | 
				
			||||
  unitPriceInAssetProfileCurrency: number; | 
					 | 
				
			||||
  updateAccountBalance?: boolean; | 
					 | 
				
			||||
  value: number; | 
					 | 
				
			||||
  valueInBaseCurrency: number; | 
					 | 
				
			||||
} | 
					 | 
				
			||||
 | 
					 | 
				
			||||
export interface ActivityError { | 
					 | 
				
			||||
  code: 'IS_DUPLICATE'; | 
					 | 
				
			||||
  message?: string; | 
					 | 
				
			||||
} | 
					 | 
				
			||||
@ -1,11 +1,10 @@ | 
				
			|||||
import { Activity } from '@ghostfolio/api/app/order/interfaces/activities.interface'; | 
					import { ActivityResponse, User } from '@ghostfolio/common/interfaces'; | 
				
			||||
import { User } from '@ghostfolio/common/interfaces'; | 
					 | 
				
			||||
 | 
					
 | 
				
			||||
import { Account } from '@prisma/client'; | 
					import { Account } from '@prisma/client'; | 
				
			||||
 | 
					
 | 
				
			||||
export interface CreateOrUpdateActivityDialogParams { | 
					export interface CreateOrUpdateActivityDialogParams { | 
				
			||||
  accountId: string; | 
					  accountId: string; | 
				
			||||
  accounts: Account[]; | 
					  accounts: Account[]; | 
				
			||||
  activity: Activity; | 
					  activity: ActivityResponse; | 
				
			||||
  user: User; | 
					  user: User; | 
				
			||||
} | 
					} | 
				
			||||
 | 
				
			|||||
@ -1,3 +1,28 @@ | 
				
			|||||
import { Activity } from '@ghostfolio/api/app/order/interfaces/activities.interface'; | 
					import { EnhancedSymbolProfile } from '@ghostfolio/common/interfaces'; | 
				
			||||
 | 
					import { AccountWithPlatform } from '@ghostfolio/common/types'; | 
				
			||||
 | 
					
 | 
				
			||||
export interface ActivityResponse extends Activity {} | 
					import { Order, Tag } from '@prisma/client'; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					export interface ActivitiesResponse { | 
				
			||||
 | 
					  activities: ActivityResponse[]; | 
				
			||||
 | 
					  count: number; | 
				
			||||
 | 
					} | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					export interface ActivityResponse extends Order { | 
				
			||||
 | 
					  account?: AccountWithPlatform; | 
				
			||||
 | 
					  error?: ActivityErrorResponse; | 
				
			||||
 | 
					  feeInAssetProfileCurrency: number; | 
				
			||||
 | 
					  feeInBaseCurrency: number; | 
				
			||||
 | 
					  SymbolProfile?: EnhancedSymbolProfile; | 
				
			||||
 | 
					  tagIds?: string[]; | 
				
			||||
 | 
					  tags?: Tag[]; | 
				
			||||
 | 
					  unitPriceInAssetProfileCurrency: number; | 
				
			||||
 | 
					  updateAccountBalance?: boolean; | 
				
			||||
 | 
					  value: number; | 
				
			||||
 | 
					  valueInBaseCurrency: number; | 
				
			||||
 | 
					} | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					export interface ActivityErrorResponse { | 
				
			||||
 | 
					  code: 'IS_DUPLICATE'; | 
				
			||||
 | 
					  message?: string; | 
				
			||||
 | 
					} | 
				
			||||
 | 
				
			|||||
@ -1,5 +1,5 @@ | 
				
			|||||
import { Activity } from '@ghostfolio/api/app/order/interfaces/activities.interface'; | 
					import { ActivityResponse } from './activity-response.interface'; | 
				
			||||
 | 
					
 | 
				
			||||
export interface ImportResponse { | 
					export interface ImportResponse { | 
				
			||||
  activities: Activity[]; | 
					  activities: ActivityResponse[]; | 
				
			||||
} | 
					} | 
				
			||||
 | 
				
			|||||
					Loading…
					
					
				
		Reference in new issue