import type { MorningstarConverterOptions, MorningstarHoldingAmountOptions, MorningstarHoldingWeightOptions, MorningstarMetadata, MorningstarOptions } from '../Shared/MorningstarOptions'; import XRayJSON from './XRayJSON'; export interface XRayMetadata extends MorningstarMetadata { json: XRayJSON.XRayResponse; } export interface XRayBenchmarkDataPointOptions { /** * A comma-separated list of benchmark data points to return. */ dataPoints: Array; /** * Type of data points. */ type: 'benchmark'; } export type XRayBenchmarkDataPoints = ('GrowthSeries' | 'HistoricalPerformanceSeries' | 'PerformanceReturn' | ['PerformanceReturn', ...Array] | 'ShowBreakdown'); export interface XRayConverterOptions extends MorningstarConverterOptions { json: XRayJSON.XRayResponse; } export type XRayDataPointOptions = (XRayBenchmarkDataPointOptions | XRayHoldingDataPointOptions | XRayPortfolioDataPointOptions); export interface XRayHoldingDataPointOptions { /** * A comma-separated list of holding data points to return. */ dataPoints: Array; /** * Type of data points. */ type: 'holding'; } /** * @todo Consider sub-collections or reduction to `string` */ export type XRayHoldingDataPoints = ('Alpha' | 'ArithmeticMean' | 'AveragePrice' | 'Beta' | 'CalculatedSRRI' | 'CalmarRatio' | 'CouponFrequency' | 'CouponType' | 'CurrencyId' | 'CurrencyName' | 'DiscountPremium' | 'EquityWeighting' | 'EquityWeightingLong' | 'HoldingId' | 'HoldingType' | 'InitialAmount' | 'InitialWeight' | 'Kurtosis' | 'MarketValue' | 'MorningstarRiskM255' | 'Name' | 'NAVCFLC' | 'NAVCFLE' | 'NAVCFLP' | 'NAVEPLC' | 'NAVEPLE' | 'NAVEPLP' | 'OngoingCharge' | 'PortfolioId' | 'RiskRewardVolatility' | 'SecurityId' | 'SecurityType' | 'SharpeRatio' | 'SortinoRatio' | 'SRRI' | 'StandardDeviation' | 'StarRating' | 'TDYNAV' | 'UCITS' | 'Weight'); export type XRayHoldingOptions = (Array | Array); export interface XRayOptions extends MorningstarOptions { /** * Morningstar-defined unique identifier of a benchmark. * * If no benchmark is set, it will default to * `Morningstar US Market TR USD`. * * @default 'XIUSA0010V' */ benchmarkId?: string; /** * Options related to the x-ray data parser. */ converter?: XRayConverterOptions; /** * Currency of the portfolio. ISO 4217 3-character currency code. */ currencyId?: string; /** * Data points for the x-ray. */ dataPoints?: XRayDataPointOptions | Array; /** * Array of portfolio holdings. */ holdings?: XRayHoldingOptions; } export interface XRayPortfolioDataPointOptions { /** * A comma-separated list of portfolio data points to return. */ dataPoints: Array; /** * Type of data points. */ type: 'portfolio'; } export type XRayPortfolioDataPoints = ('ActualManagementFee' | 'Alpha' | 'ArithmeticMean' | 'AssetAllocation' | 'AssetAllocationMorningstarEUR3' | 'AssetAllocationMorningstarUK6' | 'AssetAllocationMorningstarUK5' | 'AssetAllocationMorningstarUK4' | 'AssetAllocationMorningstarEUR6' | 'AssetAllocationMorningstarUK7' | 'AssetAllocationMorningstarUSA5' | 'AssetAllocationMorningstarEUR4Com' | 'AssetAllocationMorningstarSA12' | 'AssetAllocationFrenchEuroFunds5' | 'AssetAllocationMorningstarSA8' | 'AssetAllocationMorningstarNZL12' | 'AssetAllocationMorningstarMYS8' | 'AssetAllocationMorningstarAUS10' | 'BenchmarkId' | 'BenchmarkName' | 'BestWorstPeriods' | 'Beta' | 'BondStyleBox' | 'CalmarRatio' | 'Correlation' | 'CorrelationMatrix' | ['CorrelationMatrix', ...Array] | 'CountryExposure' | 'CreditQuality' | 'CumulativePerformanceSeries' | 'CurrencyId' | 'DailyGrowthSeries' | 'DailyPerformanceReturn' | ['DailyPerformanceReturn', ...Array] | 'DownsideCaptureRatio' | 'EffectiveDuration' | 'EffectiveMaturity' | 'Esg' | 'ExcessReturnArithmetic' | 'ExcessReturnGeometric' | 'ExpenseRatio' | 'GlobalBondSector' | 'GlobalStockSector' | 'GrowthSeries' | 'HistoricalPerformanceSeries' | ['HistoricalPerformanceSeries', ...Array] | 'HoldingCount' | 'InformationRatio' | 'Kurtosis' | 'ManagementExpenseRatio' | 'ManagementFee' | 'MarketCapital' | 'NegativeHoldingCount' | 'OngoingCharge' | 'PerformanceReturn' | ['PerformanceReturn', ...Array] | 'PortfolioId' | 'PositiveHoldingCount' | 'ProspectiveBookValueYield' | 'ProspectiveCashFlowYield' | 'ProspectiveEarningsYield' | 'ProspectiveRevenueYield' | 'RegionalExposure' | 'RSquared' | 'SharpeRatio' | ['SharpeRatio', ...Array] | 'Skewness' | 'SortinoRatio' | 'SRRI' | 'StandardDeviation' | ['StandardDeviation', ...Array] | 'StyleBox' | 'TrackingError' | 'TreynorRatio' | 'Type' | 'UnderlyingHolding' | 'UpsideCaptureRatio' | 'portfolioriskscoreV2'); export default XRayOptions;