@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.
Files changed (50) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/CHANGELOG.md +15 -0
  3. package/commons/-currency.d.ts +22 -6
  4. package/commons/-currency.js +12 -6
  5. package/commons/{-date-type.d.ts → -datetype.d.ts} +1 -1
  6. package/commons/{-date-type.js → -datetype.js} +2 -2
  7. package/commons/-id.d.ts +109 -17
  8. package/commons/-id.js +73 -0
  9. package/commons/index.d.ts +4 -1
  10. package/commons/index.js +17 -1
  11. package/es/commons/-currency.d.ts +22 -6
  12. package/es/commons/-currency.js +12 -6
  13. package/es/commons/{-date-type.d.ts → -datetype.d.ts} +1 -1
  14. package/es/commons/{-date-type.js → -datetype.js} +1 -1
  15. package/es/commons/-id.d.ts +109 -17
  16. package/es/commons/-id.js +70 -1
  17. package/es/commons/index.d.ts +4 -1
  18. package/es/commons/index.js +4 -1
  19. package/es/reports/valuation/-remote-valuation-report-portfolio.d.ts +15 -15
  20. package/es/reports/valuation/-remote-valuation-report-portfolio.js +32 -32
  21. package/es/reports/valuation/-remote-valuation-report-shared.d.ts +4 -4
  22. package/es/reports/valuation/-remote-valuation-report-shared.js +29 -26
  23. package/es/reports/valuation/-valuation-report-holdings-tree/-machinery.js +1 -3
  24. package/es/reports/valuation/-valuation-report-portfolio.d.ts +14 -14
  25. package/es/reports/valuation/-valuation-report-shared.d.ts +6 -6
  26. package/nix/default.nix +59 -0
  27. package/nix/sources.json +14 -0
  28. package/nix/sources.nix +194 -0
  29. package/package.json +2 -2
  30. package/reports/valuation/-remote-valuation-report-portfolio.d.ts +15 -15
  31. package/reports/valuation/-remote-valuation-report-portfolio.js +31 -31
  32. package/reports/valuation/-remote-valuation-report-shared.d.ts +4 -4
  33. package/reports/valuation/-remote-valuation-report-shared.js +28 -25
  34. package/reports/valuation/-valuation-report-holdings-tree/-machinery.js +7 -9
  35. package/reports/valuation/-valuation-report-portfolio.d.ts +14 -14
  36. package/reports/valuation/-valuation-report-shared.d.ts +6 -6
  37. package/shell.nix +5 -20
  38. package/src/commons/-currency.test.ts +27 -0
  39. package/src/commons/-currency.ts +24 -9
  40. package/src/commons/-datetype.test.ts +10 -0
  41. package/src/commons/{-date-type.ts → -datetype.ts} +1 -1
  42. package/src/commons/-id.test.ts +27 -0
  43. package/src/commons/-id.ts +112 -17
  44. package/src/commons/index.ts +4 -1
  45. package/src/index.test.ts +5 -5
  46. package/src/reports/valuation/-remote-valuation-report-portfolio.ts +54 -54
  47. package/src/reports/valuation/-remote-valuation-report-shared.ts +34 -31
  48. package/src/reports/valuation/-valuation-report-holdings-tree/-machinery.ts +5 -7
  49. package/src/reports/valuation/-valuation-report-portfolio.ts +20 -20
  50. 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
- ExternalValuationId,
21
- OhlcSeriesId,
22
- PortfolioId,
23
- PrincipalId,
24
- ShareClassFeeScheduleId,
25
- ShareClassId,
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: PortfolioId;
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: ShareClassId;
91
+ id: DecafShareClassId;
92
92
  created: SDateTime;
93
- creator: PrincipalId;
93
+ creator: DecafPrincipalId;
94
94
  updated: SDateTime;
95
- updater: PrincipalId;
95
+ updater: DecafPrincipalId;
96
96
  guid: string;
97
- portfolio: PortfolioId;
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?: OhlcSeriesId;
109
+ benchmark?: DecafOhlcSeriesId;
110
110
  description?: string;
111
- feeschedules: ShareClassFeeScheduleId[];
112
- effectivefeeschedule?: ShareClassFeeScheduleId;
113
- subscriptions: ActionId[];
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: ExternalValuationId;
122
+ id: DecafExternalValuationId;
123
123
  created: SDateTime;
124
- creator: PrincipalId;
124
+ creator: DecafPrincipalId;
125
125
  updated: SDateTime;
126
- updater: PrincipalId;
126
+ updater: DecafPrincipalId;
127
127
  guid: string;
128
- portfolio: PortfolioId;
129
- shareclass?: ShareClassId;
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: maybeDecimal(x.shareclass.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: maybeDecimal(ev.shares),
220
- price: maybeDecimal(ev.price),
221
- nav: maybeDecimal(ev.nav),
222
- aum: maybeDecimal(ev.aum),
223
- hedgepnl: maybeDecimal(ev.hedgepnl),
224
- feemngt: maybeDecimal(ev.feemngt),
225
- feeperf: maybeDecimal(ev.feeperf),
226
- otheraccrued: maybeDecimal(ev.otheraccrued),
227
- totalaccrued: maybeDecimal(ev.totalaccrued),
228
- subred: maybeDecimal(ev.subred),
229
- perfdaily: maybeDecimal(ev.perfdaily),
230
- perfweekly: maybeDecimal(ev.perfweekly),
231
- perfmonthly: maybeDecimal(ev.perfmonthly),
232
- perfytd: maybeDecimal(ev.perfytd),
233
- perfstart: maybeDecimal(ev.perfstart),
234
- coefficient: maybeDecimal(ev.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: asDecimal(x.nav),
237
- navAdjusted: asDecimal(x.nav_adjusted),
238
- navAdjustedTotal: asDecimal(x.nav_adjusted_total),
239
- coefficient: asDecimal(x.coefficient),
240
- gavRefccy: asDecimal(x.gav_refccy),
241
- gavClsccy: asDecimal(x.gav_clsccy),
242
- sharecountPrev: asDecimal(x.sharecount_prev),
243
- sharecountCurr: asDecimal(x.sharecount_curr),
244
- sharecountDiff: asDecimal(x.sharecount_diff),
245
- pxRefCcy: maybeDecimal(x.px_refccy),
246
- pxClsCcy: maybeDecimal(x.px_clsccy),
247
- ytdExt: maybeDecimal(x.ytdext),
248
- ytdInt: maybeDecimal(x.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: maybeDecimal(x.subscriptions).orDefault(zero),
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 { ArtifactId, ArtifactTypeId, CurrencyCode, DateType } from '../../commons';
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: ArtifactId;
127
+ id: DecafArtifactId;
128
128
  guid: string;
129
- type: { id: ArtifactTypeId; name: string; order: number };
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?: ArtifactId;
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: asDecimal(x.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: asDecimal(x.value),
198
+ value: unsafeDecimal(x.value),
199
199
  accounts: x.accounts.map((y) => ({
200
200
  account: y.account,
201
- value: asDecimal(y.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: { org: asDecimal(z.value.org || 0), ref: asDecimal(z.value.ref || 0) },
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: maybeDecimal(x.org).orDefault(zero),
214
- ref: maybeDecimal(x.ref).orDefault(zero),
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
- maybeDecimal(org).chain((o) => maybeDecimal(ref).chain((r) => Just({ org: o, ref: r })))
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: asDecimal(x.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(maybeDecimal(x.valuation.value.net.ref).orDefault(zero), nav),
250
- netExposurePercentage: safeDiv(maybeDecimal(x.valuation.exposure.net.ref).orDefault(zero), nav),
251
- absExposurePercentage: safeDiv(maybeDecimal(x.valuation.exposure.abs.ref).orDefault(zero), nav),
252
- change: maybeDecimal(x.change),
253
- pnl: maybeDecimal(x.pnl).orDefault(zero),
254
- pnlToInvestment: maybeDecimal(x.pnl_to_investment),
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 = maybeDecimal(x.nav).orDefault(zero);
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: asDecimal(r.value), asof: r.asof })),
298
+ fxRates: x.fxrates.map((r) => ({ ccy1: r.ccy1, ccy2: r.ccy2, value: unsafeDecimal(r.value), asof: r.asof })),
296
299
  figures: {
297
- investment: maybeDecimal(x.investment).orDefault(zero),
300
+ investment: decimalFromNullable(x.investment).orDefault(zero),
298
301
  valuation: {
299
- net: maybeDecimal(x.valuation_net).orDefault(zero),
300
- abs: maybeDecimal(x.valuation_abs).orDefault(zero),
302
+ net: decimalFromNullable(x.valuation_net).orDefault(zero),
303
+ abs: decimalFromNullable(x.valuation_abs).orDefault(zero),
301
304
  },
302
- accrued: maybeDecimal(x.accrued).orDefault(zero),
303
- liabilities: maybeDecimal(x.liabilities).orDefault(zero),
304
- gav: maybeDecimal(x.gav).orDefault(zero),
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: maybeDecimal(x.aum).orDefault(zero),
307
- pnl: maybeDecimal(x.pnl).orDefault(zero),
308
- pnlToInvestment: maybeDecimal(x.pnl_to_investment),
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 { ArtifactTypeId } from '../../../commons';
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 ArtifactTypeId) ||
45
- h.artifact.type.id === ('DEPO' as unknown as ArtifactTypeId) ||
46
- h.artifact.type.id === ('LOAN' as unknown as ArtifactTypeId)
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
- ActionId,
3
+ DecafActionId,
4
4
  CurrencyCode,
5
- ExternalValuationId,
6
- OhlcSeriesId,
7
- PortfolioId,
8
- PrincipalId,
9
- ShareClassFeeScheduleId,
10
- ShareClassId,
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: ShareClassId;
39
+ id: DecafShareClassId;
40
40
  created: SDateTime;
41
- creator: Maybe<PrincipalId>;
41
+ creator: Maybe<DecafPrincipalId>;
42
42
  updated: SDateTime;
43
- updater: Maybe<PrincipalId>;
43
+ updater: Maybe<DecafPrincipalId>;
44
44
  guid: string;
45
- portfolio: PortfolioId;
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<OhlcSeriesId>;
57
+ benchmark: Maybe<DecafOhlcSeriesId>;
58
58
  description: Maybe<string>;
59
- feeScheduleIds: ShareClassFeeScheduleId[];
60
- effectiveFeeScheduleId: Maybe<ShareClassFeeScheduleId>;
61
- subscriptionIds: ActionId[];
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: ExternalValuationId;
66
+ id: DecafExternalValuationId;
67
67
  created: SDateTime;
68
- creator: Maybe<PrincipalId>;
68
+ creator: Maybe<DecafPrincipalId>;
69
69
  updated: SDateTime;
70
- updater: Maybe<PrincipalId>;
70
+ updater: Maybe<DecafPrincipalId>;
71
71
  guid: string;
72
- portfolio: PortfolioId;
73
- shareclass: Maybe<ShareClassId>;
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 { AccountId, ArtifactId, ArtifactTypeId, CurrencyCode, DateType, PortfolioId } from '../../commons';
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: AccountId;
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: PortfolioId;
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: ArtifactTypeId;
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: ArtifactId;
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<ArtifactId>;
216
+ underlyingId: Maybe<DecafArtifactId>;
210
217
  }
211
218
 
212
219
  export interface ValuationReportFxRate {