gemcap-be-common 1.4.211 → 1.4.213

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.
@@ -38,43 +38,11 @@ export declare enum ETotalType {
38
38
  APR_GROSS = "APR_GROSS",
39
39
  APR_LIFE_GROSS = "APR_LIFE_GROSS"
40
40
  }
41
- export declare const YIELD_TOTALS_MAP: {
42
- AVERAGE_BALANCE: {
43
- order: number;
44
- title: string;
45
- class: string;
46
- };
47
- AVERAGE_LIFE_BALANCE: {
48
- order: number;
49
- title: string;
50
- class: string;
51
- };
52
- GROSS: {
53
- order: number;
54
- title: string;
55
- class: string;
56
- };
57
- BROKER: {
58
- order: number;
59
- title: string;
60
- class: string;
61
- };
62
- NET: {
63
- order: number;
64
- title: string;
65
- class: string;
66
- };
67
- APR_GROSS: {
68
- order: number;
69
- title: string;
70
- class: string;
71
- };
72
- APR_LIFE_GROSS: {
73
- order: number;
74
- title: string;
75
- class: string;
76
- };
77
- };
41
+ export declare const YIELD_TOTALS_MAP: Record<ETotalType, {
42
+ order: number;
43
+ title: string;
44
+ class: string;
45
+ }>;
78
46
  export interface IYieldParams {
79
47
  periodStart?: ISelectedMonth;
80
48
  periodEnd?: ISelectedMonth;
@@ -96,7 +64,8 @@ export interface IYieldViewData {
96
64
  product: ILoanProductLean;
97
65
  title: string;
98
66
  class?: string;
99
- [data: string]: number | string | ILoanChargeLean | ILoanProductLean;
67
+ [key: `value-${string}`]: number | string | ILoanChargeLean | ILoanProductLean;
68
+ [key: `valuePercent-${string}`]: number | string | ILoanChargeLean | ILoanProductLean;
100
69
  }
101
70
  export interface IYieldDataDoc extends IYieldData, mongoose.Document {
102
71
  _id: mongoose.Types.ObjectId;
@@ -36,6 +36,7 @@ exports.YIELD_TOTALS_MAP = {
36
36
  [ETotalType.GROSS]: { order: 1, title: 'Gross income $', class: 'whiteOnGray' },
37
37
  [ETotalType.BROKER]: { order: 2, title: 'Broker Fees $', class: 'whiteOnGray' },
38
38
  [ETotalType.NET]: { order: 3, title: 'Net income $', class: 'whiteOnGray' },
39
+ [ETotalType.APR]: { order: 5, title: 'Yield APR', class: 'whiteOnGray' },
39
40
  [ETotalType.APR_GROSS]: { order: 6, title: 'Yield in month', class: 'whiteOnBlack' },
40
41
  [ETotalType.APR_LIFE_GROSS]: { order: 7, title: 'Yield since inception', class: 'whiteOnBlack' },
41
42
  };
@@ -30,12 +30,20 @@ export enum ETotalType {
30
30
  APR_LIFE_GROSS = 'APR_LIFE_GROSS',
31
31
  }
32
32
 
33
- export const YIELD_TOTALS_MAP = {
33
+ export const YIELD_TOTALS_MAP: Record<
34
+ ETotalType,
35
+ {
36
+ order: number;
37
+ title: string;
38
+ class: string;
39
+ }
40
+ > = {
34
41
  [ETotalType.AVERAGE_BALANCE]: { order: -2, title: 'Average Balance in Month $', class: 'whiteOnOrange' },
35
42
  [ETotalType.AVERAGE_LIFE_BALANCE]: { order: -1, title: 'Average loan life balance $', class: 'whiteOnOrange' },
36
43
  [ETotalType.GROSS]: { order: 1, title: 'Gross income $', class: 'whiteOnGray' },
37
44
  [ETotalType.BROKER]: { order: 2, title: 'Broker Fees $', class: 'whiteOnGray' },
38
45
  [ETotalType.NET]: { order: 3, title: 'Net income $', class: 'whiteOnGray' },
46
+ [ETotalType.APR]: { order: 5, title: 'Yield APR', class: 'whiteOnGray' },
39
47
  [ETotalType.APR_GROSS]: { order: 6, title: 'Yield in month', class: 'whiteOnBlack' },
40
48
  [ETotalType.APR_LIFE_GROSS]: { order: 7, title: 'Yield since inception', class: 'whiteOnBlack' },
41
49
  };
@@ -64,7 +72,8 @@ export interface IYieldViewData {
64
72
  title: string;
65
73
  class?: string;
66
74
 
67
- [data: string]: number | string | ILoanChargeLean | ILoanProductLean;
75
+ [key: `value-${string}`]: number | string | ILoanChargeLean | ILoanProductLean;
76
+ [key: `valuePercent-${string}`]: number | string | ILoanChargeLean | ILoanProductLean;
68
77
  }
69
78
 
70
79
  export interface IYieldDataDoc extends IYieldData, mongoose.Document {
@@ -31,10 +31,10 @@ export declare const allSchemas: {
31
31
  createdAt: NativeDate;
32
32
  updatedAt: NativeDate;
33
33
  } & {
34
- amount: number;
35
34
  order: number;
36
35
  bbcSheetId: import("mongoose").Types.ObjectId;
37
36
  apDate: Date;
37
+ amount: number;
38
38
  __v?: number;
39
39
  poNumber?: string;
40
40
  customerName?: string;
@@ -45,10 +45,10 @@ export declare const allSchemas: {
45
45
  createdAt: NativeDate;
46
46
  updatedAt: NativeDate;
47
47
  } & {
48
- amount: number;
49
48
  order: number;
50
49
  bbcSheetId: import("mongoose").Types.ObjectId;
51
50
  apDate: Date;
51
+ amount: number;
52
52
  __v?: number;
53
53
  poNumber?: string;
54
54
  customerName?: string;
@@ -59,10 +59,10 @@ export declare const allSchemas: {
59
59
  createdAt: NativeDate;
60
60
  updatedAt: NativeDate;
61
61
  } & {
62
- amount: number;
63
62
  order: number;
64
63
  bbcSheetId: import("mongoose").Types.ObjectId;
65
64
  apDate: Date;
65
+ amount: number;
66
66
  __v?: number;
67
67
  poNumber?: string;
68
68
  customerName?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.4.211",
3
+ "version": "1.4.213",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -4,7 +4,8 @@ import mongoose from 'mongoose';
4
4
  import { convertSelectedMonthToDate, getStartOfMonthsBetweenDates, ISelectedMonth } from '../helpers/date.helper';
5
5
  import {
6
6
  ETotalType,
7
- IYieldParams, IYieldViewData,
7
+ IYieldParams,
8
+ IYieldViewData,
8
9
  YIELD_TOTALS_MAP,
9
10
  YieldData,
10
11
  yieldParamsValidationSchema,