Backend security / security (push) Successful in 8s
Backend verify / verify (push) Failing after 10m45s
Conventional commits / commits (pull_request) Successful in 29s
Backend security / security (pull_request) Successful in 8s
Backend verify / verify (pull_request) Failing after 10m37s
Store account membership, portfolio, operations, forecasts and market sources in SQLite. Coalesce scoped refreshes, fence connection revisions, preserve complete financial snapshots and stabilize operation period state. BREAKING CHANGE: investment reads return data/meta resource envelopes and locally persisted snapshots; consumers must use the matching OpenAPI contract and explicit synchronization endpoints.
55 lines
1.5 KiB
TypeScript
55 lines
1.5 KiB
TypeScript
import { InvestmentResourceMetaDto } from '../investment-resource.dto';
|
|
import { ApiProperty } from '@nestjs/swagger';
|
|
import { MoneyDto } from '../../../common/money.dto';
|
|
|
|
export class PortfolioSummaryDto {
|
|
@ApiProperty({ type: MoneyDto, isArray: true })
|
|
declare totalsByCurrency: MoneyDto[];
|
|
|
|
@ApiProperty({
|
|
type: 'integer',
|
|
minimum: 0,
|
|
description: 'Number of non-zero stock positions, not the number of units.',
|
|
})
|
|
declare stockPositionCount: number;
|
|
|
|
@ApiProperty({
|
|
type: 'integer',
|
|
minimum: 0,
|
|
description: 'Number of non-zero bond positions, not the number of units.',
|
|
})
|
|
declare bondPositionCount: number;
|
|
}
|
|
|
|
export class BrokerageAccountDto {
|
|
@ApiProperty()
|
|
declare id: string;
|
|
|
|
@ApiProperty()
|
|
declare name: string;
|
|
|
|
@ApiProperty({
|
|
enum: [
|
|
'BROKERAGE',
|
|
'INDIVIDUAL_INVESTMENT',
|
|
'INVEST_BOX',
|
|
'MONEY_MARKET_FUND',
|
|
],
|
|
})
|
|
declare type:
|
|
'BROKERAGE' | 'INDIVIDUAL_INVESTMENT' | 'INVEST_BOX' | 'MONEY_MARKET_FUND';
|
|
|
|
@ApiProperty({ type: String, nullable: true, format: 'date' })
|
|
declare openedOn: string | null;
|
|
|
|
@ApiProperty({ type: PortfolioSummaryDto, nullable: true })
|
|
portfolioSummary?: PortfolioSummaryDto | null;
|
|
}
|
|
|
|
export class BrokerageAccountsResourceDto {
|
|
@ApiProperty({ type: BrokerageAccountDto, isArray: true, nullable: true })
|
|
declare data: BrokerageAccountDto[] | null;
|
|
@ApiProperty({ type: InvestmentResourceMetaDto })
|
|
declare meta: InvestmentResourceMetaDto;
|
|
}
|