@decafhub/decaf-client-extras 0.0.5 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +15 -0
- package/commons/-currency.d.ts +22 -6
- package/commons/-currency.js +12 -6
- package/commons/{-date-type.d.ts → -datetype.d.ts} +1 -1
- package/commons/{-date-type.js → -datetype.js} +2 -2
- package/commons/-id.d.ts +109 -17
- package/commons/-id.js +73 -0
- package/commons/index.d.ts +4 -1
- package/commons/index.js +17 -1
- package/es/commons/-currency.d.ts +22 -6
- package/es/commons/-currency.js +12 -6
- package/es/commons/{-date-type.d.ts → -datetype.d.ts} +1 -1
- package/es/commons/{-date-type.js → -datetype.js} +1 -1
- package/es/commons/-id.d.ts +109 -17
- package/es/commons/-id.js +70 -1
- package/es/commons/index.d.ts +4 -1
- package/es/commons/index.js +4 -1
- package/es/reports/valuation/-remote-valuation-report-portfolio.d.ts +15 -15
- package/es/reports/valuation/-remote-valuation-report-portfolio.js +32 -32
- package/es/reports/valuation/-remote-valuation-report-shared.d.ts +4 -4
- package/es/reports/valuation/-remote-valuation-report-shared.js +29 -26
- package/es/reports/valuation/-valuation-report-holdings-tree/-machinery.js +1 -3
- package/es/reports/valuation/-valuation-report-portfolio.d.ts +14 -14
- package/es/reports/valuation/-valuation-report-shared.d.ts +6 -6
- package/nix/default.nix +59 -0
- package/nix/sources.json +14 -0
- package/nix/sources.nix +194 -0
- package/package.json +2 -2
- package/reports/valuation/-remote-valuation-report-portfolio.d.ts +15 -15
- package/reports/valuation/-remote-valuation-report-portfolio.js +31 -31
- package/reports/valuation/-remote-valuation-report-shared.d.ts +4 -4
- package/reports/valuation/-remote-valuation-report-shared.js +28 -25
- package/reports/valuation/-valuation-report-holdings-tree/-machinery.js +7 -9
- package/reports/valuation/-valuation-report-portfolio.d.ts +14 -14
- package/reports/valuation/-valuation-report-shared.d.ts +6 -6
- package/shell.nix +5 -20
- package/src/commons/-currency.test.ts +27 -0
- package/src/commons/-currency.ts +24 -9
- package/src/commons/-datetype.test.ts +10 -0
- package/src/commons/{-date-type.ts → -datetype.ts} +1 -1
- package/src/commons/-id.test.ts +27 -0
- package/src/commons/-id.ts +112 -17
- package/src/commons/index.ts +4 -1
- package/src/index.test.ts +5 -5
- package/src/reports/valuation/-remote-valuation-report-portfolio.ts +54 -54
- package/src/reports/valuation/-remote-valuation-report-shared.ts +34 -31
- package/src/reports/valuation/-valuation-report-holdings-tree/-machinery.ts +5 -7
- package/src/reports/valuation/-valuation-report-portfolio.ts +20 -20
- package/src/reports/valuation/-valuation-report-shared.ts +13 -6
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { DecafClient } from '@decafhub/decaf-client';
|
|
2
2
|
import {
|
|
3
|
-
asDecimal,
|
|
4
3
|
CustomError,
|
|
5
4
|
customError,
|
|
5
|
+
decimalFromNullable,
|
|
6
6
|
Either,
|
|
7
7
|
Left,
|
|
8
8
|
Maybe,
|
|
9
|
-
maybeDecimal,
|
|
10
9
|
Right,
|
|
11
10
|
sanitizedNonEmptyText,
|
|
12
11
|
SDate,
|
|
13
12
|
SDateTime,
|
|
13
|
+
unsafeDecimal,
|
|
14
14
|
zero,
|
|
15
15
|
} from '@telostat/prelude';
|
|
16
16
|
import {
|
|
17
|
-
ActionId,
|
|
18
17
|
CurrencyCode,
|
|
19
18
|
DateType,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
DecafActionId,
|
|
20
|
+
DecafExternalValuationId,
|
|
21
|
+
DecafOhlcSeriesId,
|
|
22
|
+
DecafPortfolioId,
|
|
23
|
+
DecafPrincipalId,
|
|
24
|
+
DecafShareClassFeeScheduleId,
|
|
25
|
+
DecafShareClassId,
|
|
26
26
|
} from '../../commons';
|
|
27
27
|
import { recompileBaseValuationReport, RemoteBaseValuationReport } from './-remote-valuation-report-shared';
|
|
28
28
|
import { PortfolioValuationReport, PortfolioValuationReportShareClassValue } from './-valuation-report-portfolio';
|
|
@@ -50,7 +50,7 @@ export interface PortfolioValuationReportQuery {
|
|
|
50
50
|
/**
|
|
51
51
|
* Portfolio the valuation report is requested for.
|
|
52
52
|
*/
|
|
53
|
-
portfolio:
|
|
53
|
+
portfolio: DecafPortfolioId;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
/**
|
|
@@ -88,13 +88,13 @@ export interface RemoteValuationShareClassValue {
|
|
|
88
88
|
* Type definition for share class on the remote portfolio valuation report.
|
|
89
89
|
*/
|
|
90
90
|
export interface RemoteValuationShareClass {
|
|
91
|
-
id:
|
|
91
|
+
id: DecafShareClassId;
|
|
92
92
|
created: SDateTime;
|
|
93
|
-
creator:
|
|
93
|
+
creator: DecafPrincipalId;
|
|
94
94
|
updated: SDateTime;
|
|
95
|
-
updater:
|
|
95
|
+
updater: DecafPrincipalId;
|
|
96
96
|
guid: string;
|
|
97
|
-
portfolio:
|
|
97
|
+
portfolio: DecafPortfolioId;
|
|
98
98
|
name: string;
|
|
99
99
|
currency: CurrencyCode;
|
|
100
100
|
isin?: string;
|
|
@@ -106,11 +106,11 @@ export interface RemoteValuationShareClass {
|
|
|
106
106
|
subredperiod?: string;
|
|
107
107
|
freqmngt?: number;
|
|
108
108
|
freqperf?: number;
|
|
109
|
-
benchmark?:
|
|
109
|
+
benchmark?: DecafOhlcSeriesId;
|
|
110
110
|
description?: string;
|
|
111
|
-
feeschedules:
|
|
112
|
-
effectivefeeschedule?:
|
|
113
|
-
subscriptions:
|
|
111
|
+
feeschedules: DecafShareClassFeeScheduleId[];
|
|
112
|
+
effectivefeeschedule?: DecafShareClassFeeScheduleId;
|
|
113
|
+
subscriptions: DecafActionId[];
|
|
114
114
|
outstanding?: number;
|
|
115
115
|
}
|
|
116
116
|
|
|
@@ -119,14 +119,14 @@ export interface RemoteValuationShareClass {
|
|
|
119
119
|
* report.
|
|
120
120
|
*/
|
|
121
121
|
export interface RemoteValuationExternalValue {
|
|
122
|
-
id:
|
|
122
|
+
id: DecafExternalValuationId;
|
|
123
123
|
created: SDateTime;
|
|
124
|
-
creator:
|
|
124
|
+
creator: DecafPrincipalId;
|
|
125
125
|
updated: SDateTime;
|
|
126
|
-
updater:
|
|
126
|
+
updater: DecafPrincipalId;
|
|
127
127
|
guid: string;
|
|
128
|
-
portfolio:
|
|
129
|
-
shareclass?:
|
|
128
|
+
portfolio: DecafPortfolioId;
|
|
129
|
+
shareclass?: DecafShareClassId;
|
|
130
130
|
date: SDate;
|
|
131
131
|
ccy: CurrencyCode;
|
|
132
132
|
shares?: number;
|
|
@@ -203,7 +203,7 @@ export function toShareClassValue(x: RemoteValuationShareClassValue): PortfolioV
|
|
|
203
203
|
feeScheduleIds: x.shareclass.feeschedules,
|
|
204
204
|
effectiveFeeScheduleId: Maybe.fromNullable(x.shareclass.effectivefeeschedule),
|
|
205
205
|
subscriptionIds: x.shareclass.subscriptions,
|
|
206
|
-
outstanding:
|
|
206
|
+
outstanding: decimalFromNullable(x.shareclass.outstanding),
|
|
207
207
|
},
|
|
208
208
|
external: Maybe.fromNullable(x.external).map((ev) => ({
|
|
209
209
|
id: ev.id,
|
|
@@ -216,36 +216,36 @@ export function toShareClassValue(x: RemoteValuationShareClassValue): PortfolioV
|
|
|
216
216
|
shareclass: Maybe.fromNullable(ev.shareclass),
|
|
217
217
|
date: ev.date,
|
|
218
218
|
ccy: ev.ccy,
|
|
219
|
-
shares:
|
|
220
|
-
price:
|
|
221
|
-
nav:
|
|
222
|
-
aum:
|
|
223
|
-
hedgepnl:
|
|
224
|
-
feemngt:
|
|
225
|
-
feeperf:
|
|
226
|
-
otheraccrued:
|
|
227
|
-
totalaccrued:
|
|
228
|
-
subred:
|
|
229
|
-
perfdaily:
|
|
230
|
-
perfweekly:
|
|
231
|
-
perfmonthly:
|
|
232
|
-
perfytd:
|
|
233
|
-
perfstart:
|
|
234
|
-
coefficient:
|
|
219
|
+
shares: decimalFromNullable(ev.shares),
|
|
220
|
+
price: decimalFromNullable(ev.price),
|
|
221
|
+
nav: decimalFromNullable(ev.nav),
|
|
222
|
+
aum: decimalFromNullable(ev.aum),
|
|
223
|
+
hedgepnl: decimalFromNullable(ev.hedgepnl),
|
|
224
|
+
feemngt: decimalFromNullable(ev.feemngt),
|
|
225
|
+
feeperf: decimalFromNullable(ev.feeperf),
|
|
226
|
+
otheraccrued: decimalFromNullable(ev.otheraccrued),
|
|
227
|
+
totalaccrued: decimalFromNullable(ev.totalaccrued),
|
|
228
|
+
subred: decimalFromNullable(ev.subred),
|
|
229
|
+
perfdaily: decimalFromNullable(ev.perfdaily),
|
|
230
|
+
perfweekly: decimalFromNullable(ev.perfweekly),
|
|
231
|
+
perfmonthly: decimalFromNullable(ev.perfmonthly),
|
|
232
|
+
perfytd: decimalFromNullable(ev.perfytd),
|
|
233
|
+
perfstart: decimalFromNullable(ev.perfstart),
|
|
234
|
+
coefficient: decimalFromNullable(ev.coefficient),
|
|
235
235
|
})),
|
|
236
|
-
nav:
|
|
237
|
-
navAdjusted:
|
|
238
|
-
navAdjustedTotal:
|
|
239
|
-
coefficient:
|
|
240
|
-
gavRefccy:
|
|
241
|
-
gavClsccy:
|
|
242
|
-
sharecountPrev:
|
|
243
|
-
sharecountCurr:
|
|
244
|
-
sharecountDiff:
|
|
245
|
-
pxRefCcy:
|
|
246
|
-
pxClsCcy:
|
|
247
|
-
ytdExt:
|
|
248
|
-
ytdInt:
|
|
236
|
+
nav: unsafeDecimal(x.nav),
|
|
237
|
+
navAdjusted: unsafeDecimal(x.nav_adjusted),
|
|
238
|
+
navAdjustedTotal: unsafeDecimal(x.nav_adjusted_total),
|
|
239
|
+
coefficient: unsafeDecimal(x.coefficient),
|
|
240
|
+
gavRefccy: unsafeDecimal(x.gav_refccy),
|
|
241
|
+
gavClsccy: unsafeDecimal(x.gav_clsccy),
|
|
242
|
+
sharecountPrev: unsafeDecimal(x.sharecount_prev),
|
|
243
|
+
sharecountCurr: unsafeDecimal(x.sharecount_curr),
|
|
244
|
+
sharecountDiff: unsafeDecimal(x.sharecount_diff),
|
|
245
|
+
pxRefCcy: decimalFromNullable(x.px_refccy),
|
|
246
|
+
pxClsCcy: decimalFromNullable(x.px_clsccy),
|
|
247
|
+
ytdExt: decimalFromNullable(x.ytdext),
|
|
248
|
+
ytdInt: decimalFromNullable(x.ytdint),
|
|
249
249
|
};
|
|
250
250
|
}
|
|
251
251
|
|
|
@@ -268,7 +268,7 @@ export function recompilePortfolioValuationReport(
|
|
|
268
268
|
return {
|
|
269
269
|
...report,
|
|
270
270
|
portfolio: x.portfolio,
|
|
271
|
-
subscriptions:
|
|
271
|
+
subscriptions: decimalFromNullable(x.subscriptions).orDefault(zero),
|
|
272
272
|
shareClassValues: x.scvals.map(toShareClassValue),
|
|
273
273
|
};
|
|
274
274
|
});
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
|
-
asDecimal,
|
|
3
2
|
CustomError,
|
|
4
3
|
Decimal,
|
|
4
|
+
decimalFromNullable,
|
|
5
5
|
Either,
|
|
6
6
|
Just,
|
|
7
7
|
Maybe,
|
|
8
|
-
maybeDecimal,
|
|
9
8
|
Right,
|
|
10
9
|
safeDiv,
|
|
11
10
|
sanitizedNonEmptyText,
|
|
12
11
|
SDate,
|
|
13
12
|
SDateTime,
|
|
13
|
+
unsafeDecimal,
|
|
14
14
|
zero,
|
|
15
15
|
} from '@telostat/prelude';
|
|
16
|
-
import {
|
|
16
|
+
import { CurrencyCode, DateType, DecafArtifactId, DecafArtifactTypeId } from '../../commons';
|
|
17
17
|
import {
|
|
18
18
|
BaseValuationReport,
|
|
19
19
|
BaseValuationReportHolding,
|
|
@@ -124,9 +124,9 @@ export interface RemoteValuationReportChildHolding {
|
|
|
124
124
|
* Valuation artifact.
|
|
125
125
|
*/
|
|
126
126
|
export interface RemoteValuationReportArtifact {
|
|
127
|
-
id:
|
|
127
|
+
id: DecafArtifactId;
|
|
128
128
|
guid: string;
|
|
129
|
-
type: { id:
|
|
129
|
+
type: { id: DecafArtifactTypeId; name: string; order: number };
|
|
130
130
|
stype?: string;
|
|
131
131
|
symbol: string;
|
|
132
132
|
name?: string;
|
|
@@ -140,7 +140,7 @@ export interface RemoteValuationReportArtifact {
|
|
|
140
140
|
isin?: string;
|
|
141
141
|
figi?: string;
|
|
142
142
|
expiry?: SDate;
|
|
143
|
-
underlying_id?:
|
|
143
|
+
underlying_id?: DecafArtifactId;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
/**
|
|
@@ -179,7 +179,7 @@ export function toArtifact(x: RemoteValuationReportArtifact): ValuationReportArt
|
|
|
179
179
|
symbol: x.symbol,
|
|
180
180
|
name: sanitizedNonEmptyText(x.name),
|
|
181
181
|
ccy: Maybe.fromNullable(x.ccy),
|
|
182
|
-
quantity:
|
|
182
|
+
quantity: unsafeDecimal(x.quantity),
|
|
183
183
|
country: sanitizedNonEmptyText(x.country),
|
|
184
184
|
issuer: sanitizedNonEmptyText(x.issuer),
|
|
185
185
|
sector: sanitizedNonEmptyText(x.sector),
|
|
@@ -195,14 +195,17 @@ export function toArtifact(x: RemoteValuationReportArtifact): ValuationReportArt
|
|
|
195
195
|
export function toAccrual(x: RemoteValuationReportAccrual): ValuationReportAccrual {
|
|
196
196
|
return {
|
|
197
197
|
name: x.name,
|
|
198
|
-
value:
|
|
198
|
+
value: unsafeDecimal(x.value),
|
|
199
199
|
accounts: x.accounts.map((y) => ({
|
|
200
200
|
account: y.account,
|
|
201
|
-
value:
|
|
201
|
+
value: unsafeDecimal(y.value),
|
|
202
202
|
accruals: y.accruals.map((z) => ({
|
|
203
203
|
artifact: toArtifact(z.artifact),
|
|
204
204
|
ccy: z.ccy,
|
|
205
|
-
value: {
|
|
205
|
+
value: {
|
|
206
|
+
org: decimalFromNullable(z.value.org).orDefault(zero),
|
|
207
|
+
ref: decimalFromNullable(z.value.ref).orDefault(zero),
|
|
208
|
+
},
|
|
206
209
|
})),
|
|
207
210
|
})),
|
|
208
211
|
};
|
|
@@ -210,14 +213,14 @@ export function toAccrual(x: RemoteValuationReportAccrual): ValuationReportAccru
|
|
|
210
213
|
|
|
211
214
|
export function toOrgRef(x: { org?: number; ref?: number }): ValuationReportFigureOrgRef {
|
|
212
215
|
return {
|
|
213
|
-
org:
|
|
214
|
-
ref:
|
|
216
|
+
org: decimalFromNullable(x.org).orDefault(zero),
|
|
217
|
+
ref: decimalFromNullable(x.ref).orDefault(zero),
|
|
215
218
|
};
|
|
216
219
|
}
|
|
217
220
|
|
|
218
221
|
export function toMaybeOrgRef(x?: { org?: number; ref?: number }): Maybe<ValuationReportFigureOrgRef> {
|
|
219
222
|
return Maybe.fromNullable(x).chain(({ org, ref }) =>
|
|
220
|
-
|
|
223
|
+
decimalFromNullable(org).chain((o) => decimalFromNullable(ref).chain((r) => Just({ org: o, ref: r })))
|
|
221
224
|
);
|
|
222
225
|
}
|
|
223
226
|
|
|
@@ -227,7 +230,7 @@ export function toBaseHolding(
|
|
|
227
230
|
): BaseValuationReportHolding {
|
|
228
231
|
return {
|
|
229
232
|
artifact: toArtifact(x.artifact),
|
|
230
|
-
quantity:
|
|
233
|
+
quantity: unsafeDecimal(x.quantity),
|
|
231
234
|
investment: {
|
|
232
235
|
px: toOrgRef(x.investment.px),
|
|
233
236
|
txncosts: toMaybeOrgRef(x.investment.txncosts),
|
|
@@ -246,12 +249,12 @@ export function toBaseHolding(
|
|
|
246
249
|
abs: toOrgRef(x.valuation.exposure.abs),
|
|
247
250
|
},
|
|
248
251
|
},
|
|
249
|
-
valuePercentage: safeDiv(
|
|
250
|
-
netExposurePercentage: safeDiv(
|
|
251
|
-
absExposurePercentage: safeDiv(
|
|
252
|
-
change:
|
|
253
|
-
pnl:
|
|
254
|
-
pnlToInvestment:
|
|
252
|
+
valuePercentage: safeDiv(decimalFromNullable(x.valuation.value.net.ref).orDefault(zero), nav),
|
|
253
|
+
netExposurePercentage: safeDiv(decimalFromNullable(x.valuation.exposure.net.ref).orDefault(zero), nav),
|
|
254
|
+
absExposurePercentage: safeDiv(decimalFromNullable(x.valuation.exposure.abs.ref).orDefault(zero), nav),
|
|
255
|
+
change: decimalFromNullable(x.change),
|
|
256
|
+
pnl: decimalFromNullable(x.pnl).orDefault(zero),
|
|
257
|
+
pnlToInvestment: decimalFromNullable(x.pnl_to_investment),
|
|
255
258
|
opendate: x.opendate,
|
|
256
259
|
lastdate: x.lastdate,
|
|
257
260
|
};
|
|
@@ -282,7 +285,7 @@ export function toHolding(nav: Decimal, x: RemoteValuationReportHolding): Valuat
|
|
|
282
285
|
* report.
|
|
283
286
|
*/
|
|
284
287
|
export function recompileBaseValuationReport(x: RemoteBaseValuationReport): Either<CustomError, BaseValuationReport> {
|
|
285
|
-
const nav =
|
|
288
|
+
const nav = decimalFromNullable(x.nav).orDefault(zero);
|
|
286
289
|
|
|
287
290
|
const report: BaseValuationReport = {
|
|
288
291
|
asof: x.reported,
|
|
@@ -292,20 +295,20 @@ export function recompileBaseValuationReport(x: RemoteBaseValuationReport): Eith
|
|
|
292
295
|
accounts: x.accounts,
|
|
293
296
|
holdings: x.holdings.map((rh) => toHolding(nav, rh)),
|
|
294
297
|
accruals: x.accruals.map(toAccrual),
|
|
295
|
-
fxRates: x.fxrates.map((r) => ({ ccy1: r.ccy1, ccy2: r.ccy2, value:
|
|
298
|
+
fxRates: x.fxrates.map((r) => ({ ccy1: r.ccy1, ccy2: r.ccy2, value: unsafeDecimal(r.value), asof: r.asof })),
|
|
296
299
|
figures: {
|
|
297
|
-
investment:
|
|
300
|
+
investment: decimalFromNullable(x.investment).orDefault(zero),
|
|
298
301
|
valuation: {
|
|
299
|
-
net:
|
|
300
|
-
abs:
|
|
302
|
+
net: decimalFromNullable(x.valuation_net).orDefault(zero),
|
|
303
|
+
abs: decimalFromNullable(x.valuation_abs).orDefault(zero),
|
|
301
304
|
},
|
|
302
|
-
accrued:
|
|
303
|
-
liabilities:
|
|
304
|
-
gav:
|
|
305
|
+
accrued: decimalFromNullable(x.accrued).orDefault(zero),
|
|
306
|
+
liabilities: decimalFromNullable(x.liabilities).orDefault(zero),
|
|
307
|
+
gav: decimalFromNullable(x.gav).orDefault(zero),
|
|
305
308
|
nav,
|
|
306
|
-
aum:
|
|
307
|
-
pnl:
|
|
308
|
-
pnlToInvestment:
|
|
309
|
+
aum: decimalFromNullable(x.aum).orDefault(zero),
|
|
310
|
+
pnl: decimalFromNullable(x.pnl).orDefault(zero),
|
|
311
|
+
pnlToInvestment: decimalFromNullable(x.pnl_to_investment),
|
|
309
312
|
},
|
|
310
313
|
};
|
|
311
314
|
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { Decimal, safeDiv, sumDecimals, Tuple, zero } from '@telostat/prelude';
|
|
2
|
-
import { Just, Maybe, Nothing } from 'purify-ts';
|
|
3
|
-
import { List } from 'purify-ts/List';
|
|
1
|
+
import { Decimal, Just, List, Maybe, Nothing, safeDiv, sumDecimals, Tuple, zero } from '@telostat/prelude';
|
|
4
2
|
import { ValuationReportHolding, ValuationReportHoldingClassification } from '../-valuation-report-shared';
|
|
5
|
-
import {
|
|
3
|
+
import { DecafArtifactTypeId } from '../../../commons';
|
|
6
4
|
import { ValuationReportHoldingsTreeNode, ValuationReportHoldingsTreeNodeValue } from './-types';
|
|
7
5
|
import { compareStringArrays } from './-utils';
|
|
8
6
|
|
|
@@ -41,9 +39,9 @@ export function updateTotals(
|
|
|
41
39
|
const holdingsForExposure = holdings.filter(
|
|
42
40
|
(h) =>
|
|
43
41
|
!(
|
|
44
|
-
h.artifact.type.id === ('CCY' as unknown as
|
|
45
|
-
h.artifact.type.id === ('DEPO' as unknown as
|
|
46
|
-
h.artifact.type.id === ('LOAN' as unknown as
|
|
42
|
+
h.artifact.type.id === ('CCY' as unknown as DecafArtifactTypeId) ||
|
|
43
|
+
h.artifact.type.id === ('DEPO' as unknown as DecafArtifactTypeId) ||
|
|
44
|
+
h.artifact.type.id === ('LOAN' as unknown as DecafArtifactTypeId)
|
|
47
45
|
)
|
|
48
46
|
);
|
|
49
47
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Decimal, Maybe, SDate, SDateTime } from '@telostat/prelude';
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
DecafActionId,
|
|
4
4
|
CurrencyCode,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
DecafExternalValuationId,
|
|
6
|
+
DecafOhlcSeriesId,
|
|
7
|
+
DecafPortfolioId,
|
|
8
|
+
DecafPrincipalId,
|
|
9
|
+
DecafShareClassFeeScheduleId,
|
|
10
|
+
DecafShareClassId,
|
|
11
11
|
} from '../../commons';
|
|
12
12
|
import { BaseValuationReport, ValuationReportPortfolio } from './-valuation-report-shared';
|
|
13
13
|
|
|
@@ -36,13 +36,13 @@ export interface PortfolioValuationReportShareClassValue {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
export interface PortfolioValuationReportShareClass {
|
|
39
|
-
id:
|
|
39
|
+
id: DecafShareClassId;
|
|
40
40
|
created: SDateTime;
|
|
41
|
-
creator: Maybe<
|
|
41
|
+
creator: Maybe<DecafPrincipalId>;
|
|
42
42
|
updated: SDateTime;
|
|
43
|
-
updater: Maybe<
|
|
43
|
+
updater: Maybe<DecafPrincipalId>;
|
|
44
44
|
guid: string;
|
|
45
|
-
portfolio:
|
|
45
|
+
portfolio: DecafPortfolioId;
|
|
46
46
|
name: string;
|
|
47
47
|
currency: CurrencyCode;
|
|
48
48
|
isin: Maybe<string>;
|
|
@@ -54,23 +54,23 @@ export interface PortfolioValuationReportShareClass {
|
|
|
54
54
|
subscriptionRedemptionPeriod: Maybe<string>;
|
|
55
55
|
managementFeeFrequency: Maybe<number>;
|
|
56
56
|
performanceFeeFrequency: Maybe<number>;
|
|
57
|
-
benchmark: Maybe<
|
|
57
|
+
benchmark: Maybe<DecafOhlcSeriesId>;
|
|
58
58
|
description: Maybe<string>;
|
|
59
|
-
feeScheduleIds:
|
|
60
|
-
effectiveFeeScheduleId: Maybe<
|
|
61
|
-
subscriptionIds:
|
|
59
|
+
feeScheduleIds: DecafShareClassFeeScheduleId[];
|
|
60
|
+
effectiveFeeScheduleId: Maybe<DecafShareClassFeeScheduleId>;
|
|
61
|
+
subscriptionIds: DecafActionId[];
|
|
62
62
|
outstanding: Maybe<Decimal>;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
export interface PortfolioValuationReportExternalValue {
|
|
66
|
-
id:
|
|
66
|
+
id: DecafExternalValuationId;
|
|
67
67
|
created: SDateTime;
|
|
68
|
-
creator: Maybe<
|
|
68
|
+
creator: Maybe<DecafPrincipalId>;
|
|
69
69
|
updated: SDateTime;
|
|
70
|
-
updater: Maybe<
|
|
70
|
+
updater: Maybe<DecafPrincipalId>;
|
|
71
71
|
guid: string;
|
|
72
|
-
portfolio:
|
|
73
|
-
shareclass: Maybe<
|
|
72
|
+
portfolio: DecafPortfolioId;
|
|
73
|
+
shareclass: Maybe<DecafShareClassId>;
|
|
74
74
|
date: SDate;
|
|
75
75
|
ccy: CurrencyCode;
|
|
76
76
|
shares: Maybe<Decimal>;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { Decimal, Maybe, SDate, SDateTime } from '@telostat/prelude';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
CurrencyCode,
|
|
4
|
+
DateType,
|
|
5
|
+
DecafAccountId,
|
|
6
|
+
DecafArtifactId,
|
|
7
|
+
DecafArtifactTypeId,
|
|
8
|
+
DecafPortfolioId,
|
|
9
|
+
} from '../../commons';
|
|
3
10
|
|
|
4
11
|
/**
|
|
5
12
|
* Type definition for base valuation report.
|
|
@@ -33,7 +40,7 @@ export interface BaseValuationReport {
|
|
|
33
40
|
* Type definition for account reference in valuation reports.
|
|
34
41
|
*/
|
|
35
42
|
export interface ValuationReportAccount {
|
|
36
|
-
id:
|
|
43
|
+
id: DecafAccountId;
|
|
37
44
|
guid: string;
|
|
38
45
|
name: string;
|
|
39
46
|
}
|
|
@@ -42,7 +49,7 @@ export interface ValuationReportAccount {
|
|
|
42
49
|
* Type definition for portfolio reference in valuation reports.
|
|
43
50
|
*/
|
|
44
51
|
export interface ValuationReportPortfolio {
|
|
45
|
-
id:
|
|
52
|
+
id: DecafPortfolioId;
|
|
46
53
|
guid: string;
|
|
47
54
|
name: string;
|
|
48
55
|
}
|
|
@@ -181,7 +188,7 @@ export interface ValuationReportAccrualByCurrency {
|
|
|
181
188
|
* Type definition of the FINREA artifact type.
|
|
182
189
|
*/
|
|
183
190
|
export interface ValuationReportArtifactType {
|
|
184
|
-
id:
|
|
191
|
+
id: DecafArtifactTypeId;
|
|
185
192
|
name: string;
|
|
186
193
|
order: number;
|
|
187
194
|
}
|
|
@@ -190,7 +197,7 @@ export interface ValuationReportArtifactType {
|
|
|
190
197
|
* Type definition for the artifact as reported in the valuation.
|
|
191
198
|
*/
|
|
192
199
|
export interface ValuationReportArtifact {
|
|
193
|
-
id:
|
|
200
|
+
id: DecafArtifactId;
|
|
194
201
|
guid: string;
|
|
195
202
|
type: ValuationReportArtifactType;
|
|
196
203
|
stype: Maybe<string>;
|
|
@@ -206,7 +213,7 @@ export interface ValuationReportArtifact {
|
|
|
206
213
|
isin: Maybe<string>;
|
|
207
214
|
figi: Maybe<string>;
|
|
208
215
|
expiry: Maybe<SDate>;
|
|
209
|
-
underlyingId: Maybe<
|
|
216
|
+
underlyingId: Maybe<DecafArtifactId>;
|
|
210
217
|
}
|
|
211
218
|
|
|
212
219
|
export interface ValuationReportFxRate {
|