@fintekkers/ledger-models 0.1.114 → 0.1.115

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.
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const security_1 = __importDefault(require("./security"));
7
+ const security_type_pb_1 = require("../../../fintekkers/models/security/security_type_pb");
8
+ const date_1 = require("../utils/date");
9
+ const coupon_frequency_1 = require("./coupon_frequency");
10
+ const coupon_type_1 = require("./coupon_type");
11
+ const term_1 = require("./term");
12
+ const tenor_type_pb_1 = require("../../../fintekkers/models/security/tenor_type_pb");
13
+ class BondSecurity extends security_1.default {
14
+ constructor(proto) {
15
+ super(proto);
16
+ if (proto.getSecurityType() !== security_type_pb_1.SecurityTypeProto.BOND_SECURITY) {
17
+ throw new Error(`BondSecurity requires BOND_SECURITY type, got ${security_type_pb_1.SecurityTypeProto[proto.getSecurityType()]}`);
18
+ }
19
+ }
20
+ /** Returns the tenor (term) of the bond as a Tenor object */
21
+ getTenor() {
22
+ const issueDate = this.getIssueDate().toDate();
23
+ const maturityDate = this.getMaturityDate().toDate();
24
+ // Calculate the period between issue date and maturity date
25
+ const period = this.calculatePeriod(issueDate, maturityDate);
26
+ return new term_1.Tenor(tenor_type_pb_1.TenorTypeProto.TERM, period);
27
+ }
28
+ /**
29
+ * Calculates the period between two dates in years, months, and days.
30
+ * This method handles month and year boundaries correctly.
31
+ */
32
+ calculatePeriod(startDate, endDate) {
33
+ let years = endDate.getFullYear() - startDate.getFullYear();
34
+ let months = endDate.getMonth() - startDate.getMonth();
35
+ let days = endDate.getDate() - startDate.getDate();
36
+ // Adjust for negative days (e.g., if end day is before start day)
37
+ if (days < 0) {
38
+ months--;
39
+ // Get the number of days in the previous month
40
+ const lastDayOfPrevMonth = new Date(endDate.getFullYear(), endDate.getMonth(), 0).getDate();
41
+ days += lastDayOfPrevMonth;
42
+ }
43
+ // Adjust for negative months
44
+ if (months < 0) {
45
+ years--;
46
+ months += 12;
47
+ }
48
+ return {
49
+ years,
50
+ months,
51
+ days
52
+ };
53
+ }
54
+ getCouponRate() {
55
+ const rate = this.proto.getCouponRate();
56
+ if (!rate)
57
+ throw new Error("Coupon rate is required for bonds");
58
+ return rate;
59
+ }
60
+ getFaceValue() {
61
+ const faceValue = this.proto.getFaceValue();
62
+ if (!faceValue)
63
+ throw new Error("Face value is required for bonds");
64
+ return faceValue;
65
+ }
66
+ getCouponType() {
67
+ const couponType = this.proto.getCouponType();
68
+ if (!couponType)
69
+ throw new Error("Coupon Type is required for bonds");
70
+ return new coupon_type_1.CouponType(couponType);
71
+ }
72
+ getCouponFrequency() {
73
+ const couponFrequency = this.proto.getCouponFrequency();
74
+ if (!couponFrequency)
75
+ throw new Error("Coupon Frequency is required for bonds");
76
+ return new coupon_frequency_1.CouponFrequency(couponFrequency);
77
+ }
78
+ getDatedDate() {
79
+ const datedDate = this.proto.getDatedDate();
80
+ return datedDate ? new date_1.LocalDate(datedDate) : undefined;
81
+ }
82
+ getIssuanceInfo() {
83
+ return this.proto.getIssuanceInfoList();
84
+ }
85
+ }
86
+ exports.default = BondSecurity;
87
+ //# sourceMappingURL=BondSecurity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BondSecurity.js","sourceRoot":"","sources":["BondSecurity.ts"],"names":[],"mappings":";;;;;AAAA,0DAAkC;AAElC,2FAAyF;AAEzF,wCAA0C;AAE1C,yDAAqD;AACrD,+CAA2C;AAC3C,iCAAuC;AACvC,qFAAmF;AAEnF,MAAM,YAAa,SAAQ,kBAAQ;IACjC,YAAY,KAAoB;QAC9B,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,KAAK,CAAC,eAAe,EAAE,KAAK,oCAAiB,CAAC,aAAa,EAAE,CAAC;YAChE,MAAM,IAAI,KAAK,CACb,iDAAiD,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M,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;QACxC,IAAI,CAAC,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;QAChE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,YAAY;QACV,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAC5C,IAAI,CAAC,SAAS;YAAE,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;QACpE,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,aAAa;QACX,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;QAC9C,IAAI,CAAC,UAAU;YAAE,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;QACtE,OAAO,IAAI,wBAAU,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;IAED,kBAAkB;QAChB,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE,CAAC;QACxD,IAAI,CAAC,eAAe;YAAE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAChF,OAAO,IAAI,kCAAe,CAAC,eAAe,CAAC,CAAC;IAC9C,CAAC;IAED,YAAY;QACV,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAC5C,OAAO,SAAS,CAAC,CAAC,CAAC,IAAI,gBAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC1D,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,mBAAmB,EAAE,CAAC;IAC1C,CAAC;CACF;AAED,kBAAe,YAAY,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { TenorTypeProto } from '../../../fintekkers/models/security/tenor_type_pb';
2
+ /**
3
+ * Represents a period of time with years, months, and total days.
4
+ * Similar to Java's Period class. Days includes weeks converted to days.
5
+ */
6
+ export interface Period {
7
+ years: number;
8
+ months: number;
9
+ days: number;
10
+ }
11
+ /**
12
+ * Tenor class representing the maturity or term of a security.
13
+ * Can be UNKNOWN, PERPETUAL, or TERM (with a specific period).
14
+ */
15
+ export declare class Tenor {
16
+ static readonly UNKNOWN_TENOR: Tenor;
17
+ static tenorTypeEnumMap: Map<number, string>;
18
+ private type;
19
+ private tenor;
20
+ constructor(type: TenorTypeProto);
21
+ constructor(type: TenorTypeProto, term: string);
22
+ constructor(type: TenorTypeProto, tenor: Period);
23
+ getType(): TenorTypeProto;
24
+ getTenor(): Period | null;
25
+ getTenorDescription(): string;
26
+ toString(): string;
27
+ /**
28
+ * Parses a tenor description string (e.g., "2Y3M") into a Period object.
29
+ * @param tenorDescription - String like "2Y3M", "1Y6M2W", "5D", etc.
30
+ * @returns Period object or null if the description is empty
31
+ */
32
+ static fromTenorDescription(tenorDescription: string): Period | null;
33
+ /**
34
+ * Converts a Period object to a string representation (e.g., "2Y3M").
35
+ * @param period - Period object to convert
36
+ * @returns String representation like "2Y3M" or empty string if period is negative
37
+ */
38
+ static periodToString(period: Period): string;
39
+ /**
40
+ * Checks if a period is negative (has any negative component).
41
+ */
42
+ private static isPeriodNegative;
43
+ /**
44
+ * Parses a period string (e.g., "2Y3M", "1Y6M2W5D") into a Period object.
45
+ * @param periodString - String like "2Y3M", "1Y6M2W", "5D", etc.
46
+ * @returns Period object
47
+ * @throws Error if the period string contains invalid characters
48
+ */
49
+ static parsePeriod(periodString: string): Period;
50
+ }
@@ -0,0 +1,157 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Tenor = void 0;
4
+ const tenor_type_pb_1 = require("../../../fintekkers/models/security/tenor_type_pb");
5
+ /**
6
+ * Tenor class representing the maturity or term of a security.
7
+ * Can be UNKNOWN, PERPETUAL, or TERM (with a specific period).
8
+ */
9
+ class Tenor {
10
+ constructor(type, termOrTenor) {
11
+ this.type = type;
12
+ if (termOrTenor === undefined) {
13
+ this.tenor = null;
14
+ }
15
+ else if (typeof termOrTenor === 'string') {
16
+ this.tenor = Tenor.fromTenorDescription(termOrTenor);
17
+ }
18
+ else {
19
+ if (type !== tenor_type_pb_1.TenorTypeProto.TERM) {
20
+ throw new Error('Cannot instantiate a tenor with a term unless the TenorType is TERM');
21
+ }
22
+ this.tenor = termOrTenor;
23
+ }
24
+ }
25
+ getType() {
26
+ return this.type;
27
+ }
28
+ getTenor() {
29
+ return this.tenor;
30
+ }
31
+ getTenorDescription() {
32
+ const tenor = this.getTenor();
33
+ if (!tenor) {
34
+ return '';
35
+ }
36
+ return Tenor.periodToString(tenor);
37
+ }
38
+ toString() {
39
+ var _a;
40
+ let str = (_a = Tenor.tenorTypeEnumMap.get(this.type)) !== null && _a !== void 0 ? _a : 'UNKNOWN';
41
+ if (this.type === tenor_type_pb_1.TenorTypeProto.TERM) {
42
+ str += ': ';
43
+ str += this.getTenorDescription();
44
+ }
45
+ return str;
46
+ }
47
+ /**
48
+ * Parses a tenor description string (e.g., "2Y3M") into a Period object.
49
+ * @param tenorDescription - String like "2Y3M", "1Y6M2W", "5D", etc.
50
+ * @returns Period object or null if the description is empty
51
+ */
52
+ static fromTenorDescription(tenorDescription) {
53
+ if (!tenorDescription || tenorDescription.trim() === '') {
54
+ return null;
55
+ }
56
+ return Tenor.parsePeriod(tenorDescription);
57
+ }
58
+ /**
59
+ * Converts a Period object to a string representation (e.g., "2Y3M").
60
+ * @param period - Period object to convert
61
+ * @returns String representation like "2Y3M" or empty string if period is negative
62
+ */
63
+ static periodToString(period) {
64
+ if (Tenor.isPeriodNegative(period)) {
65
+ return '';
66
+ }
67
+ const years = period.years;
68
+ const months = period.months;
69
+ // Extract weeks and remaining days from total days (matching Java behavior)
70
+ const weeks = Math.floor(period.days / 7);
71
+ const days = period.days % 7;
72
+ const parts = [];
73
+ if (years > 0) {
74
+ parts.push(`${years}Y`);
75
+ }
76
+ if (months > 0) {
77
+ parts.push(`${months}M`);
78
+ }
79
+ if (weeks > 0) {
80
+ parts.push(`${weeks}W`);
81
+ }
82
+ if (days > 0) {
83
+ parts.push(`${days}D`);
84
+ }
85
+ return parts.join('');
86
+ }
87
+ /**
88
+ * Checks if a period is negative (has any negative component).
89
+ */
90
+ static isPeriodNegative(period) {
91
+ return period.years < 0 || period.months < 0 || period.days < 0;
92
+ }
93
+ /**
94
+ * Parses a period string (e.g., "2Y3M", "1Y6M2W5D") into a Period object.
95
+ * @param periodString - String like "2Y3M", "1Y6M2W", "5D", etc.
96
+ * @returns Period object
97
+ * @throws Error if the period string contains invalid characters
98
+ */
99
+ static parsePeriod(periodString) {
100
+ let years = 0;
101
+ let months = 0;
102
+ let weeks = 0;
103
+ let days = 0;
104
+ let numberString = '';
105
+ for (let i = 0; i < periodString.length; i++) {
106
+ const c = periodString.charAt(i);
107
+ if (/\d/.test(c)) {
108
+ numberString += c;
109
+ }
110
+ else {
111
+ if (numberString === '') {
112
+ throw new Error(`Invalid period string: expected number before '${c}'`);
113
+ }
114
+ const number = parseInt(numberString, 10);
115
+ switch (c) {
116
+ case 'Y':
117
+ years = number;
118
+ break;
119
+ case 'M':
120
+ // Check if next character is 'W' (for months-weeks ambiguity)
121
+ if (i < periodString.length - 1 && periodString.charAt(i + 1) === 'W') {
122
+ weeks = number;
123
+ i++; // Skip next character (W)
124
+ }
125
+ else {
126
+ months = number;
127
+ }
128
+ break;
129
+ case 'W':
130
+ weeks = number;
131
+ break;
132
+ case 'D':
133
+ days = number;
134
+ break;
135
+ default:
136
+ throw new Error(`Invalid character in period string: ${c}`);
137
+ }
138
+ numberString = '';
139
+ }
140
+ }
141
+ // Convert weeks to days and combine with days (matching Java Period.of behavior)
142
+ return {
143
+ years,
144
+ months,
145
+ days: days + weeks * 7
146
+ };
147
+ }
148
+ }
149
+ exports.Tenor = Tenor;
150
+ Tenor.UNKNOWN_TENOR = new Tenor(tenor_type_pb_1.TenorTypeProto.UNKNOWN_TENOR_TYPE);
151
+ (() => {
152
+ Tenor.tenorTypeEnumMap = new Map();
153
+ Object.keys(tenor_type_pb_1.TenorTypeProto).forEach(key => {
154
+ Tenor.tenorTypeEnumMap.set(tenor_type_pb_1.TenorTypeProto[key], key);
155
+ });
156
+ })();
157
+ //# sourceMappingURL=term.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"term.js","sourceRoot":"","sources":["term.ts"],"names":[],"mappings":";;;AAAA,qFAAmF;AAYnF;;;GAGG;AACH,MAAa,KAAK;IAmBd,YAAY,IAAoB,EAAE,WAA6B;QAC3D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QAEjB,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC5B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QACtB,CAAC;aAAM,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE,CAAC;YACzC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAC;QACzD,CAAC;aAAM,CAAC;YACJ,IAAI,IAAI,KAAK,8BAAc,CAAC,IAAI,EAAE,CAAC;gBAC/B,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAC;YAC3F,CAAC;YACD,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC;QAC7B,CAAC;IACL,CAAC;IAED,OAAO;QACH,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IAED,QAAQ;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,mBAAmB;QACf,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC9B,IAAI,CAAC,KAAK,EAAE,CAAC;YACT,OAAO,EAAE,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IAED,QAAQ;;QACJ,IAAI,GAAG,GAAG,MAAA,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,mCAAI,SAAS,CAAC;Q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AM,GAAG,CAAC,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;4BACpE,KAAK,GAAG,MAAM,CAAC;4BACf,CAAC,EAAE,CAAC,CAAC,0BAA0B;wBACnC,CAAC;6BAAM,CAAC;4BACJ,MAAM,GAAG,MAAM,CAAC;wBACpB,CAAC;wBACD,MAAM;oBACV,KAAK,GAAG;wBACJ,KAAK,GAAG,MAAM,CAAC;wBACf,MAAM;oBACV,KAAK,GAAG;wBACJ,IAAI,GAAG,MAAM,CAAC;wBACd,MAAM;oBACV;wBACI,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,EAAE,CAAC,CAAC;gBACpE,CAAC;gBACD,YAAY,GAAG,EAAE,CAAC;YACtB,CAAC;QACL,CAAC;QAED,iFAAiF;QACjF,OAAO;YACH,KAAK;YACL,MAAM;YACN,IAAI,EAAE,IAAI,GAAG,KAAK,GAAG,CAAC;SACzB,CAAC;IACN,CAAC;;AAxKL,sBAyKC;AAxK0B,mBAAa,GAAG,IAAI,KAAK,CAAC,8BAAc,CAAC,kBAAkB,CAAC,CAAC;AAIpF;IACI,KAAK,CAAC,gBAAgB,GAAG,IAAI,GAAG,EAAkB,CAAC;IAEnD,MAAM,CAAC,IAAI,CAAC,8BAAc,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QACtC,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,8BAAc,CAAC,GAAkC,CAAC,EAAE,GAAG,CAAC,CAAC;IACxF,CAAC,CAAC,CAAC;AACP,CAAC,GAAA,CAAA"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,253 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const assert = require("assert");
4
+ const term_1 = require("./term");
5
+ const tenor_type_pb_1 = require("../../../fintekkers/models/security/tenor_type_pb");
6
+ test('test Tenor.UNKNOWN_TENOR has correct type', () => {
7
+ testUnknownTenor();
8
+ });
9
+ test('test Tenor constructor with type only', () => {
10
+ testTenorConstructorTypeOnly();
11
+ });
12
+ test('test Tenor constructor with type and string term', () => {
13
+ testTenorConstructorWithString();
14
+ });
15
+ test('test Tenor constructor with type and Period', () => {
16
+ testTenorConstructorWithPeriod();
17
+ });
18
+ test('test Tenor constructor throws error for non-TERM type with Period', () => {
19
+ testTenorConstructorError();
20
+ });
21
+ test('test Tenor.getType() returns correct type', () => {
22
+ testGetType();
23
+ });
24
+ test('test Tenor.getTenor() returns correct period', () => {
25
+ testGetTenor();
26
+ });
27
+ test('test Tenor.getTenorDescription() returns correct string', () => {
28
+ testGetTenorDescription();
29
+ });
30
+ test('test Tenor.toString() returns correct representation', () => {
31
+ testToString();
32
+ });
33
+ test('test Tenor.fromTenorDescription() parses various formats', () => {
34
+ testFromTenorDescription();
35
+ });
36
+ test('test Tenor.periodToString() converts period to string', () => {
37
+ testPeriodToString();
38
+ });
39
+ test('test Tenor.parsePeriod() parses period strings', () => {
40
+ testParsePeriod();
41
+ });
42
+ test('test Tenor.parsePeriod() handles edge cases', () => {
43
+ testParsePeriodEdgeCases();
44
+ });
45
+ test('test Tenor.parsePeriod() throws error for invalid input', () => {
46
+ testParsePeriodErrors();
47
+ });
48
+ function testUnknownTenor() {
49
+ const unknownTenor = term_1.Tenor.UNKNOWN_TENOR;
50
+ assert(unknownTenor.getType() === tenor_type_pb_1.TenorTypeProto.UNKNOWN_TENOR_TYPE, 'UNKNOWN_TENOR should have UNKNOWN_TENOR_TYPE');
51
+ assert(unknownTenor.getTenor() === null, 'UNKNOWN_TENOR should have null tenor');
52
+ }
53
+ function testTenorConstructorTypeOnly() {
54
+ const perpetualTenor = new term_1.Tenor(tenor_type_pb_1.TenorTypeProto.PERPETUAL);
55
+ assert(perpetualTenor.getType() === tenor_type_pb_1.TenorTypeProto.PERPETUAL, 'Should create PERPETUAL tenor');
56
+ assert(perpetualTenor.getTenor() === null, 'Should have null tenor when only type is provided');
57
+ }
58
+ function testTenorConstructorWithString() {
59
+ const termTenor = new term_1.Tenor(tenor_type_pb_1.TenorTypeProto.TERM, '2Y3M');
60
+ assert(termTenor.getType() === tenor_type_pb_1.TenorTypeProto.TERM, 'Should create TERM tenor');
61
+ const period = termTenor.getTenor();
62
+ assert(period !== null, 'Should have a period');
63
+ if (period) {
64
+ assert(period.years === 2, 'Should parse 2 years');
65
+ assert(period.months === 3, 'Should parse 3 months');
66
+ }
67
+ }
68
+ function testTenorConstructorWithPeriod() {
69
+ const period = { years: 5, months: 6, days: 14 };
70
+ const termTenor = new term_1.Tenor(tenor_type_pb_1.TenorTypeProto.TERM, period);
71
+ assert(termTenor.getType() === tenor_type_pb_1.TenorTypeProto.TERM, 'Should create TERM tenor');
72
+ const returnedPeriod = termTenor.getTenor();
73
+ assert(returnedPeriod !== null, 'Should have a period');
74
+ if (returnedPeriod) {
75
+ assert(returnedPeriod.years === 5, 'Should have 5 years');
76
+ assert(returnedPeriod.months === 6, 'Should have 6 months');
77
+ assert(returnedPeriod.days === 14, 'Should have 14 days');
78
+ }
79
+ }
80
+ function testTenorConstructorError() {
81
+ const period = { years: 1, months: 0, days: 0 };
82
+ try {
83
+ new term_1.Tenor(tenor_type_pb_1.TenorTypeProto.PERPETUAL, period);
84
+ assert(false, 'Should have thrown an error');
85
+ }
86
+ catch (error) {
87
+ assert(error instanceof Error, 'Should throw Error');
88
+ assert(error.message.includes('TERM'), 'Error message should mention TERM');
89
+ }
90
+ }
91
+ function testGetType() {
92
+ const tenor1 = new term_1.Tenor(tenor_type_pb_1.TenorTypeProto.UNKNOWN_TENOR_TYPE);
93
+ assert(tenor1.getType() === tenor_type_pb_1.TenorTypeProto.UNKNOWN_TENOR_TYPE, 'Should return UNKNOWN_TENOR_TYPE');
94
+ const tenor2 = new term_1.Tenor(tenor_type_pb_1.TenorTypeProto.PERPETUAL);
95
+ assert(tenor2.getType() === tenor_type_pb_1.TenorTypeProto.PERPETUAL, 'Should return PERPETUAL');
96
+ const tenor3 = new term_1.Tenor(tenor_type_pb_1.TenorTypeProto.TERM, '1Y');
97
+ assert(tenor3.getType() === tenor_type_pb_1.TenorTypeProto.TERM, 'Should return TERM');
98
+ }
99
+ function testGetTenor() {
100
+ const tenor1 = new term_1.Tenor(tenor_type_pb_1.TenorTypeProto.PERPETUAL);
101
+ assert(tenor1.getTenor() === null, 'PERPETUAL should have null tenor');
102
+ const period = { years: 3, months: 4, days: 21 };
103
+ const tenor2 = new term_1.Tenor(tenor_type_pb_1.TenorTypeProto.TERM, period);
104
+ const returnedPeriod = tenor2.getTenor();
105
+ assert(returnedPeriod !== null, 'TERM should have a period');
106
+ if (returnedPeriod) {
107
+ assert(returnedPeriod.years === 3, 'Should return correct years');
108
+ assert(returnedPeriod.months === 4, 'Should return correct months');
109
+ assert(returnedPeriod.days === 21, 'Should return correct days');
110
+ }
111
+ }
112
+ function testGetTenorDescription() {
113
+ const tenor1 = new term_1.Tenor(tenor_type_pb_1.TenorTypeProto.PERPETUAL);
114
+ assert(tenor1.getTenorDescription() === '', 'PERPETUAL should return empty string');
115
+ const tenor2 = new term_1.Tenor(tenor_type_pb_1.TenorTypeProto.TERM, '2Y3M');
116
+ assert(tenor2.getTenorDescription() === '2Y3M', 'Should return "2Y3M"');
117
+ const tenor3 = new term_1.Tenor(tenor_type_pb_1.TenorTypeProto.TERM, '1Y6M2W5D');
118
+ assert(tenor3.getTenorDescription() === '1Y6M2W5D', 'Should return "1Y6M2W5D"');
119
+ }
120
+ function testToString() {
121
+ const tenor1 = term_1.Tenor.UNKNOWN_TENOR;
122
+ assert(tenor1.toString() === 'UNKNOWN_TENOR_TYPE', 'UNKNOWN should return "UNKNOWN_TENOR_TYPE"');
123
+ const tenor2 = new term_1.Tenor(tenor_type_pb_1.TenorTypeProto.PERPETUAL);
124
+ assert(tenor2.toString() === 'PERPETUAL', 'PERPETUAL should return "PERPETUAL"');
125
+ const tenor3 = new term_1.Tenor(tenor_type_pb_1.TenorTypeProto.TERM, '2Y3M');
126
+ assert(tenor3.toString() === 'TERM: 2Y3M', 'TERM should return "TERM: 2Y3M"');
127
+ }
128
+ function testFromTenorDescription() {
129
+ // Test empty string
130
+ const period1 = term_1.Tenor.fromTenorDescription('');
131
+ assert(period1 === null, 'Empty string should return null');
132
+ // Test whitespace
133
+ const period2 = term_1.Tenor.fromTenorDescription(' ');
134
+ assert(period2 === null, 'Whitespace should return null');
135
+ // Test various formats
136
+ const period3 = term_1.Tenor.fromTenorDescription('2Y');
137
+ assert(period3 !== null, 'Should parse "2Y"');
138
+ if (period3) {
139
+ assert(period3.years === 2, 'Should have 2 years');
140
+ assert(period3.months === 0, 'Should have 0 months');
141
+ assert(period3.days === 0, 'Should have 0 days');
142
+ }
143
+ const period4 = term_1.Tenor.fromTenorDescription('3M');
144
+ assert(period4 !== null, 'Should parse "3M"');
145
+ if (period4) {
146
+ assert(period4.years === 0, 'Should have 0 years');
147
+ assert(period4.months === 3, 'Should have 3 months');
148
+ }
149
+ const period5 = term_1.Tenor.fromTenorDescription('2W');
150
+ assert(period5 !== null, 'Should parse "2W"');
151
+ if (period5) {
152
+ assert(period5.days === 14, 'Should convert 2 weeks to 14 days');
153
+ }
154
+ const period6 = term_1.Tenor.fromTenorDescription('5D');
155
+ assert(period6 !== null, 'Should parse "5D"');
156
+ if (period6) {
157
+ assert(period6.days === 5, 'Should have 5 days');
158
+ }
159
+ }
160
+ function testPeriodToString() {
161
+ // Test simple periods
162
+ const period1 = { years: 2, months: 3, days: 0 };
163
+ assert(term_1.Tenor.periodToString(period1) === '2Y3M', 'Should return "2Y3M"');
164
+ const period2 = { years: 0, months: 6, days: 14 };
165
+ assert(term_1.Tenor.periodToString(period2) === '6M2W', 'Should convert 14 days to 2W');
166
+ const period3 = { years: 1, months: 0, days: 21 };
167
+ assert(term_1.Tenor.periodToString(period3) === '1Y3W', 'Should convert 21 days to 3W');
168
+ const period4 = { years: 0, months: 0, days: 10 };
169
+ assert(term_1.Tenor.periodToString(period4) === '1W3D', 'Should convert 10 days to 1W3D');
170
+ // Test negative period
171
+ const period5 = { years: -1, months: 0, days: 0 };
172
+ assert(term_1.Tenor.periodToString(period5) === '', 'Negative period should return empty string');
173
+ // Test zero period
174
+ const period6 = { years: 0, months: 0, days: 0 };
175
+ assert(term_1.Tenor.periodToString(period6) === '', 'Zero period should return empty string');
176
+ }
177
+ function testParsePeriod() {
178
+ // Test years only
179
+ const period1 = term_1.Tenor.parsePeriod('2Y');
180
+ assert(period1.years === 2, 'Should parse 2 years');
181
+ assert(period1.months === 0, 'Should have 0 months');
182
+ assert(period1.days === 0, 'Should have 0 days');
183
+ // Test months only
184
+ const period2 = term_1.Tenor.parsePeriod('3M');
185
+ assert(period2.years === 0, 'Should have 0 years');
186
+ assert(period2.months === 3, 'Should parse 3 months');
187
+ assert(period2.days === 0, 'Should have 0 days');
188
+ // Test weeks only
189
+ const period3 = term_1.Tenor.parsePeriod('2W');
190
+ assert(period3.years === 0, 'Should have 0 years');
191
+ assert(period3.months === 0, 'Should have 0 months');
192
+ assert(period3.days === 14, 'Should convert 2 weeks to 14 days');
193
+ // Test days only
194
+ const period4 = term_1.Tenor.parsePeriod('5D');
195
+ assert(period4.years === 0, 'Should have 0 years');
196
+ assert(period4.months === 0, 'Should have 0 months');
197
+ assert(period4.days === 5, 'Should parse 5 days');
198
+ // Test combined
199
+ const period5 = term_1.Tenor.parsePeriod('1Y6M2W5D');
200
+ assert(period5.years === 1, 'Should parse 1 year');
201
+ assert(period5.months === 6, 'Should parse 6 months');
202
+ assert(period5.days === 19, 'Should convert 2W + 5D to 19 days');
203
+ // Test MW ambiguity (MW should be interpreted as months + weeks, not just months)
204
+ const period6 = term_1.Tenor.parsePeriod('2MW');
205
+ assert(period6.months === 0, 'MW should be interpreted as weeks, not months');
206
+ assert(period6.days === 14, 'MW should convert 2 weeks to 14 days');
207
+ }
208
+ function testParsePeriodEdgeCases() {
209
+ // Test large numbers
210
+ const period1 = term_1.Tenor.parsePeriod('10Y12M');
211
+ assert(period1.years === 10, 'Should parse 10 years');
212
+ assert(period1.months === 12, 'Should parse 12 months');
213
+ // Test single digit
214
+ const period2 = term_1.Tenor.parsePeriod('1Y1M1W1D');
215
+ assert(period2.years === 1, 'Should parse 1 year');
216
+ assert(period2.months === 1, 'Should parse 1 month');
217
+ assert(period2.days === 8, 'Should convert 1W + 1D to 8 days');
218
+ // Test multiple weeks
219
+ const period3 = term_1.Tenor.parsePeriod('4W');
220
+ assert(period3.days === 28, 'Should convert 4 weeks to 28 days');
221
+ // Test weeks and days
222
+ const period4 = term_1.Tenor.parsePeriod('2W3D');
223
+ assert(period4.days === 17, 'Should convert 2W + 3D to 17 days');
224
+ }
225
+ function testParsePeriodErrors() {
226
+ // Test invalid character
227
+ try {
228
+ term_1.Tenor.parsePeriod('2X');
229
+ assert(false, 'Should have thrown an error for invalid character');
230
+ }
231
+ catch (error) {
232
+ assert(error instanceof Error, 'Should throw Error');
233
+ assert(error.message.includes('Invalid character'), 'Error message should mention invalid character');
234
+ }
235
+ // Test missing number before unit
236
+ try {
237
+ term_1.Tenor.parsePeriod('Y');
238
+ assert(false, 'Should have thrown an error for missing number');
239
+ }
240
+ catch (error) {
241
+ assert(error instanceof Error, 'Should throw Error');
242
+ assert(error.message.includes('expected number'), 'Error message should mention expected number');
243
+ }
244
+ // Test invalid format
245
+ try {
246
+ term_1.Tenor.parsePeriod('2YM');
247
+ assert(false, 'Should have thrown an error for invalid format');
248
+ }
249
+ catch (error) {
250
+ assert(error instanceof Error, 'Should throw Error');
251
+ }
252
+ }
253
+ //# sourceMappingURL=term.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"term.test.js","sourceRoot":"","sources":["term.test.ts"],"names":[],"mappings":";;AAAA,iCAAkC;AAClC,iCAAuC;AACvC,qFAAmF;AAEnF,IAAI,CAAC,2CAA2C,EAAE,GAAG,EAAE;IACnD,gBAAgB,EAAE,CAAC;AACvB,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,uCAAuC,EAAE,GAAG,EAAE;IAC/C,4BAA4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": "Replace the version with build script version number",
4
- "version": "0.1.114",
4
+ "version": "0.1.115",
5
5
  "description": "ledger model protos ",
6
6
  "authors": [
7
7
  "David Doherty",