|
|
@ -74,12 +74,15 @@ export class PortfolioController {
|
|
|
|
@Get('details')
|
|
|
|
@Get('details')
|
|
|
|
@UseGuards(AuthGuard('jwt'), HasPermissionGuard)
|
|
|
|
@UseGuards(AuthGuard('jwt'), HasPermissionGuard)
|
|
|
|
@UseInterceptors(RedactValuesInResponseInterceptor)
|
|
|
|
@UseInterceptors(RedactValuesInResponseInterceptor)
|
|
|
|
|
|
|
|
@UseInterceptors(TransformDataSourceInRequestInterceptor)
|
|
|
|
@UseInterceptors(TransformDataSourceInResponseInterceptor)
|
|
|
|
@UseInterceptors(TransformDataSourceInResponseInterceptor)
|
|
|
|
public async getDetails(
|
|
|
|
public async getDetails(
|
|
|
|
@Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string,
|
|
|
|
@Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string,
|
|
|
|
@Query('accounts') filterByAccounts?: string,
|
|
|
|
@Query('accounts') filterByAccounts?: string,
|
|
|
|
@Query('assetClasses') filterByAssetClasses?: string,
|
|
|
|
@Query('assetClasses') filterByAssetClasses?: string,
|
|
|
|
|
|
|
|
@Query('dataSource') filterByDataSource?: string,
|
|
|
|
@Query('range') dateRange: DateRange = 'max',
|
|
|
|
@Query('range') dateRange: DateRange = 'max',
|
|
|
|
|
|
|
|
@Query('symbol') filterBySymbol?: string,
|
|
|
|
@Query('tags') filterByTags?: string,
|
|
|
|
@Query('tags') filterByTags?: string,
|
|
|
|
@Query('withMarkets') withMarketsParam = 'false'
|
|
|
|
@Query('withMarkets') withMarketsParam = 'false'
|
|
|
|
): Promise<PortfolioDetails & { hasError: boolean }> {
|
|
|
|
): Promise<PortfolioDetails & { hasError: boolean }> {
|
|
|
@ -95,6 +98,8 @@ export class PortfolioController {
|
|
|
|
const filters = this.apiService.buildFiltersFromQueryParams({
|
|
|
|
const filters = this.apiService.buildFiltersFromQueryParams({
|
|
|
|
filterByAccounts,
|
|
|
|
filterByAccounts,
|
|
|
|
filterByAssetClasses,
|
|
|
|
filterByAssetClasses,
|
|
|
|
|
|
|
|
filterByDataSource,
|
|
|
|
|
|
|
|
filterBySymbol,
|
|
|
|
filterByTags
|
|
|
|
filterByTags
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -289,17 +294,22 @@ export class PortfolioController {
|
|
|
|
|
|
|
|
|
|
|
|
@Get('dividends')
|
|
|
|
@Get('dividends')
|
|
|
|
@UseGuards(AuthGuard('jwt'), HasPermissionGuard)
|
|
|
|
@UseGuards(AuthGuard('jwt'), HasPermissionGuard)
|
|
|
|
|
|
|
|
@UseInterceptors(TransformDataSourceInRequestInterceptor)
|
|
|
|
public async getDividends(
|
|
|
|
public async getDividends(
|
|
|
|
@Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string,
|
|
|
|
@Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string,
|
|
|
|
@Query('accounts') filterByAccounts?: string,
|
|
|
|
@Query('accounts') filterByAccounts?: string,
|
|
|
|
@Query('assetClasses') filterByAssetClasses?: string,
|
|
|
|
@Query('assetClasses') filterByAssetClasses?: string,
|
|
|
|
|
|
|
|
@Query('dataSource') filterByDataSource?: string,
|
|
|
|
@Query('groupBy') groupBy?: GroupBy,
|
|
|
|
@Query('groupBy') groupBy?: GroupBy,
|
|
|
|
@Query('range') dateRange: DateRange = 'max',
|
|
|
|
@Query('range') dateRange: DateRange = 'max',
|
|
|
|
|
|
|
|
@Query('symbol') filterBySymbol?: string,
|
|
|
|
@Query('tags') filterByTags?: string
|
|
|
|
@Query('tags') filterByTags?: string
|
|
|
|
): Promise<PortfolioDividends> {
|
|
|
|
): Promise<PortfolioDividends> {
|
|
|
|
const filters = this.apiService.buildFiltersFromQueryParams({
|
|
|
|
const filters = this.apiService.buildFiltersFromQueryParams({
|
|
|
|
filterByAccounts,
|
|
|
|
filterByAccounts,
|
|
|
|
filterByAssetClasses,
|
|
|
|
filterByAssetClasses,
|
|
|
|
|
|
|
|
filterByDataSource,
|
|
|
|
|
|
|
|
filterBySymbol,
|
|
|
|
filterByTags
|
|
|
|
filterByTags
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -356,21 +366,26 @@ export class PortfolioController {
|
|
|
|
@Get('holdings')
|
|
|
|
@Get('holdings')
|
|
|
|
@UseGuards(AuthGuard('jwt'), HasPermissionGuard)
|
|
|
|
@UseGuards(AuthGuard('jwt'), HasPermissionGuard)
|
|
|
|
@UseInterceptors(RedactValuesInResponseInterceptor)
|
|
|
|
@UseInterceptors(RedactValuesInResponseInterceptor)
|
|
|
|
|
|
|
|
@UseInterceptors(TransformDataSourceInRequestInterceptor)
|
|
|
|
@UseInterceptors(TransformDataSourceInResponseInterceptor)
|
|
|
|
@UseInterceptors(TransformDataSourceInResponseInterceptor)
|
|
|
|
public async getHoldings(
|
|
|
|
public async getHoldings(
|
|
|
|
@Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string,
|
|
|
|
@Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string,
|
|
|
|
@Query('accounts') filterByAccounts?: string,
|
|
|
|
@Query('accounts') filterByAccounts?: string,
|
|
|
|
@Query('assetClasses') filterByAssetClasses?: string,
|
|
|
|
@Query('assetClasses') filterByAssetClasses?: string,
|
|
|
|
|
|
|
|
@Query('dataSource') filterByDataSource?: string,
|
|
|
|
@Query('holdingType') filterByHoldingType?: string,
|
|
|
|
@Query('holdingType') filterByHoldingType?: string,
|
|
|
|
@Query('query') filterBySearchQuery?: string,
|
|
|
|
@Query('query') filterBySearchQuery?: string,
|
|
|
|
@Query('range') dateRange: DateRange = 'max',
|
|
|
|
@Query('range') dateRange: DateRange = 'max',
|
|
|
|
|
|
|
|
@Query('symbol') filterBySymbol?: string,
|
|
|
|
@Query('tags') filterByTags?: string
|
|
|
|
@Query('tags') filterByTags?: string
|
|
|
|
): Promise<PortfolioHoldingsResponse> {
|
|
|
|
): Promise<PortfolioHoldingsResponse> {
|
|
|
|
const filters = this.apiService.buildFiltersFromQueryParams({
|
|
|
|
const filters = this.apiService.buildFiltersFromQueryParams({
|
|
|
|
filterByAccounts,
|
|
|
|
filterByAccounts,
|
|
|
|
filterByAssetClasses,
|
|
|
|
filterByAssetClasses,
|
|
|
|
|
|
|
|
filterByDataSource,
|
|
|
|
filterByHoldingType,
|
|
|
|
filterByHoldingType,
|
|
|
|
filterBySearchQuery,
|
|
|
|
filterBySearchQuery,
|
|
|
|
|
|
|
|
filterBySymbol,
|
|
|
|
filterByTags
|
|
|
|
filterByTags
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -386,17 +401,22 @@ export class PortfolioController {
|
|
|
|
|
|
|
|
|
|
|
|
@Get('investments')
|
|
|
|
@Get('investments')
|
|
|
|
@UseGuards(AuthGuard('jwt'), HasPermissionGuard)
|
|
|
|
@UseGuards(AuthGuard('jwt'), HasPermissionGuard)
|
|
|
|
|
|
|
|
@UseInterceptors(TransformDataSourceInRequestInterceptor)
|
|
|
|
public async getInvestments(
|
|
|
|
public async getInvestments(
|
|
|
|
@Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string,
|
|
|
|
@Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string,
|
|
|
|
@Query('accounts') filterByAccounts?: string,
|
|
|
|
@Query('accounts') filterByAccounts?: string,
|
|
|
|
@Query('assetClasses') filterByAssetClasses?: string,
|
|
|
|
@Query('assetClasses') filterByAssetClasses?: string,
|
|
|
|
|
|
|
|
@Query('dataSource') filterByDataSource?: string,
|
|
|
|
@Query('groupBy') groupBy?: GroupBy,
|
|
|
|
@Query('groupBy') groupBy?: GroupBy,
|
|
|
|
@Query('range') dateRange: DateRange = 'max',
|
|
|
|
@Query('range') dateRange: DateRange = 'max',
|
|
|
|
|
|
|
|
@Query('symbol') filterBySymbol?: string,
|
|
|
|
@Query('tags') filterByTags?: string
|
|
|
|
@Query('tags') filterByTags?: string
|
|
|
|
): Promise<PortfolioInvestments> {
|
|
|
|
): Promise<PortfolioInvestments> {
|
|
|
|
const filters = this.apiService.buildFiltersFromQueryParams({
|
|
|
|
const filters = this.apiService.buildFiltersFromQueryParams({
|
|
|
|
filterByAccounts,
|
|
|
|
filterByAccounts,
|
|
|
|
filterByAssetClasses,
|
|
|
|
filterByAssetClasses,
|
|
|
|
|
|
|
|
filterByDataSource,
|
|
|
|
|
|
|
|
filterBySymbol,
|
|
|
|
filterByTags
|
|
|
|
filterByTags
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -451,13 +471,16 @@ export class PortfolioController {
|
|
|
|
@Get('performance')
|
|
|
|
@Get('performance')
|
|
|
|
@UseGuards(AuthGuard('jwt'), HasPermissionGuard)
|
|
|
|
@UseGuards(AuthGuard('jwt'), HasPermissionGuard)
|
|
|
|
@UseInterceptors(PerformanceLoggingInterceptor)
|
|
|
|
@UseInterceptors(PerformanceLoggingInterceptor)
|
|
|
|
|
|
|
|
@UseInterceptors(TransformDataSourceInRequestInterceptor)
|
|
|
|
@UseInterceptors(TransformDataSourceInResponseInterceptor)
|
|
|
|
@UseInterceptors(TransformDataSourceInResponseInterceptor)
|
|
|
|
@Version('2')
|
|
|
|
@Version('2')
|
|
|
|
public async getPerformanceV2(
|
|
|
|
public async getPerformanceV2(
|
|
|
|
@Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string,
|
|
|
|
@Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string,
|
|
|
|
@Query('accounts') filterByAccounts?: string,
|
|
|
|
@Query('accounts') filterByAccounts?: string,
|
|
|
|
@Query('assetClasses') filterByAssetClasses?: string,
|
|
|
|
@Query('assetClasses') filterByAssetClasses?: string,
|
|
|
|
|
|
|
|
@Query('dataSource') filterByDataSource?: string,
|
|
|
|
@Query('range') dateRange: DateRange = 'max',
|
|
|
|
@Query('range') dateRange: DateRange = 'max',
|
|
|
|
|
|
|
|
@Query('symbol') filterBySymbol?: string,
|
|
|
|
@Query('tags') filterByTags?: string,
|
|
|
|
@Query('tags') filterByTags?: string,
|
|
|
|
@Query('withExcludedAccounts') withExcludedAccountsParam = 'false'
|
|
|
|
@Query('withExcludedAccounts') withExcludedAccountsParam = 'false'
|
|
|
|
): Promise<PortfolioPerformanceResponse> {
|
|
|
|
): Promise<PortfolioPerformanceResponse> {
|
|
|
@ -466,6 +489,8 @@ export class PortfolioController {
|
|
|
|
const filters = this.apiService.buildFiltersFromQueryParams({
|
|
|
|
const filters = this.apiService.buildFiltersFromQueryParams({
|
|
|
|
filterByAccounts,
|
|
|
|
filterByAccounts,
|
|
|
|
filterByAssetClasses,
|
|
|
|
filterByAssetClasses,
|
|
|
|
|
|
|
|
filterByDataSource,
|
|
|
|
|
|
|
|
filterBySymbol,
|
|
|
|
filterByTags
|
|
|
|
filterByTags
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|