chore: strengthen backend eslint profile
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import { InvestmentReadQueryDto } from '../../investment-resource.dto';
|
||||
import { Controller, Get, Param, Req, Query, UseGuards } from '@nestjs/common';
|
||||
import { ApiBearerAuth, ApiOkResponse, ApiTags } from '@nestjs/swagger';
|
||||
import type { Request } from 'express';
|
||||
|
||||
import { Controller, Get, Param, Query, Req, UseGuards } from '@nestjs/common';
|
||||
import { ApiBearerAuth, ApiOkResponse, ApiTags } from '@nestjs/swagger';
|
||||
|
||||
import { ApiProblemResponses } from '../../../../common/decorators/api-safe-error-response.decorator';
|
||||
import { AccessPayload, JwtAuthGuard } from '../../../auth/auth.api';
|
||||
import { PortfolioResourceDto } from './portfolio.dto';
|
||||
import { InvestmentReadQueryDto } from '../../investment-resource.dto';
|
||||
import { PortfolioService } from '../application/portfolio.service';
|
||||
import { PortfolioResourceDto } from './portfolio.dto';
|
||||
|
||||
@ApiTags('brokerage-accounts')
|
||||
@ApiProblemResponses()
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
import { InvestmentResourceMetaDto } from '../../investment-resource.dto';
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
|
||||
import { MoneyDto } from '../../../../common/money.dto';
|
||||
import { AccountReferenceDto } from '../../account-reference.dto';
|
||||
import { InvestmentResourceMetaDto } from '../../investment-resource.dto';
|
||||
|
||||
export class PortfolioPositionDto {
|
||||
@ApiPropertyOptional({ type: String, nullable: true })
|
||||
instrumentUid?: string | null;
|
||||
instrumentUid?: null | string;
|
||||
|
||||
@ApiPropertyOptional({ type: AccountReferenceDto })
|
||||
account?: AccountReferenceDto;
|
||||
|
||||
@ApiProperty({ type: String, nullable: true })
|
||||
declare figi: string | null;
|
||||
declare figi: null | string;
|
||||
|
||||
@ApiProperty()
|
||||
declare displayName: string;
|
||||
@@ -44,13 +45,13 @@ export class PortfolioPositionDto {
|
||||
declare absoluteReturn: MoneyDto | null;
|
||||
|
||||
@ApiProperty({ type: String, nullable: true })
|
||||
declare isin: string | null;
|
||||
declare isin: null | string;
|
||||
|
||||
@ApiProperty({ type: String, nullable: true })
|
||||
declare ticker: string | null;
|
||||
declare ticker: null | string;
|
||||
|
||||
@ApiProperty({ type: String, nullable: true })
|
||||
declare logoName: string | null;
|
||||
declare logoName: null | string;
|
||||
}
|
||||
|
||||
export class PortfolioStructureCategoryDto {
|
||||
@@ -66,7 +67,7 @@ export class PortfolioStructureCategoryDto {
|
||||
description:
|
||||
'Percentage including cash, rounded to six decimal places. Null for incomplete, negative or zero-total compositions.',
|
||||
})
|
||||
declare sharePercent: string | null;
|
||||
declare sharePercent: null | string;
|
||||
}
|
||||
|
||||
export class PortfolioStructureCurrencyDto {
|
||||
@@ -81,7 +82,7 @@ export class PortfolioStructureCurrencyDto {
|
||||
})
|
||||
declare hasNegativeValues: boolean;
|
||||
|
||||
@ApiProperty({ type: [PortfolioStructureCategoryDto] })
|
||||
@ApiProperty({ type: PortfolioStructureCategoryDto, isArray: true })
|
||||
declare categories: PortfolioStructureCategoryDto[];
|
||||
}
|
||||
|
||||
@@ -94,11 +95,11 @@ export class PortfolioUnvaluedCategoryDto {
|
||||
}
|
||||
|
||||
export class PortfolioStructureDto {
|
||||
@ApiProperty({ type: [PortfolioStructureCurrencyDto] })
|
||||
@ApiProperty({ type: PortfolioStructureCurrencyDto, isArray: true })
|
||||
declare currencies: PortfolioStructureCurrencyDto[];
|
||||
|
||||
@ApiProperty({
|
||||
type: [PortfolioUnvaluedCategoryDto],
|
||||
type: PortfolioUnvaluedCategoryDto, isArray: true,
|
||||
description:
|
||||
'Positions without current value and known valuation currency. Shares are unavailable across all currencies when nonempty.',
|
||||
})
|
||||
@@ -127,7 +128,8 @@ export class PortfolioDto {
|
||||
|
||||
export class PortfolioResourceDto {
|
||||
@ApiProperty({ type: PortfolioDto, nullable: true })
|
||||
declare data: PortfolioDto | null;
|
||||
declare data: null | PortfolioDto;
|
||||
|
||||
@ApiProperty({ type: InvestmentResourceMetaDto })
|
||||
declare meta: InvestmentResourceMetaDto;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user