@fintekkers/ledger-models 1.1.49 → 1.1.51

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 (37) hide show
  1. package/catalog/measures.json +5 -3
  2. package/node/fintekkers/models/security/security_metric_grpc_pb.js +1 -0
  3. package/node/fintekkers/models/security/security_metric_pb.d.ts +89 -0
  4. package/node/fintekkers/models/security/security_metric_pb.js +657 -0
  5. package/node/fintekkers/models/security/security_metric_type_grpc_pb.js +1 -0
  6. package/node/fintekkers/models/security/security_metric_type_pb.d.ts +14 -0
  7. package/node/fintekkers/models/security/security_metric_type_pb.js +35 -0
  8. package/node/fintekkers/models/util/object_type_pb.d.ts +7 -0
  9. package/node/fintekkers/models/util/object_type_pb.js +8 -1
  10. package/node/fintekkers/models/valuation/cashflow_pb.d.ts +6 -0
  11. package/node/fintekkers/models/valuation/cashflow_pb.js +52 -1
  12. package/node/fintekkers/requests/security_metric/create_security_metric_request_grpc_pb.js +1 -0
  13. package/node/fintekkers/requests/security_metric/create_security_metric_request_pb.d.ts +81 -0
  14. package/node/fintekkers/requests/security_metric/create_security_metric_request_pb.js +600 -0
  15. package/node/fintekkers/requests/security_metric/get_latest_security_metric_request_grpc_pb.js +1 -0
  16. package/node/fintekkers/requests/security_metric/get_latest_security_metric_request_pb.d.ts +93 -0
  17. package/node/fintekkers/requests/security_metric/get_latest_security_metric_request_pb.js +717 -0
  18. package/node/fintekkers/requests/security_metric/search_security_metric_request_grpc_pb.js +1 -0
  19. package/node/fintekkers/requests/security_metric/search_security_metric_request_pb.d.ts +101 -0
  20. package/node/fintekkers/requests/security_metric/search_security_metric_request_pb.js +757 -0
  21. package/node/fintekkers/requests/valuation/product_inputs.test.js +50 -0
  22. package/node/fintekkers/requests/valuation/product_inputs.test.js.map +1 -1
  23. package/node/fintekkers/requests/valuation/product_inputs.test.ts +61 -0
  24. package/node/fintekkers/requests/valuation/product_inputs_pb.d.ts +6 -0
  25. package/node/fintekkers/requests/valuation/product_inputs_pb.js +51 -0
  26. package/node/fintekkers/services/security-metric-service/security_metric_service_grpc_pb.d.ts +76 -0
  27. package/node/fintekkers/services/security-metric-service/security_metric_service_grpc_pb.js +173 -0
  28. package/node/fintekkers/services/security-metric-service/security_metric_service_pb.d.ts +10 -0
  29. package/node/fintekkers/services/security-metric-service/security_metric_service_pb.js +29 -0
  30. package/node/wrappers/models/security/security-metric-roundtrip.test.d.ts +1 -0
  31. package/node/wrappers/models/security/security-metric-roundtrip.test.js +137 -0
  32. package/node/wrappers/models/security/security-metric-roundtrip.test.js.map +1 -0
  33. package/node/wrappers/models/security/security-metric-roundtrip.test.ts +162 -0
  34. package/node/wrappers/util/object-types.js +12 -0
  35. package/node/wrappers/util/object-types.js.map +1 -1
  36. package/node/wrappers/util/object-types.ts +12 -0
  37. package/package.json +1 -1
@@ -0,0 +1,173 @@
1
+ // GENERATED CODE -- DO NOT EDIT!
2
+
3
+ 'use strict';
4
+ var grpc = require('@grpc/grpc-js');
5
+ var fintekkers_requests_security_metric_create_security_metric_request_pb = require('../../../fintekkers/requests/security_metric/create_security_metric_request_pb.js');
6
+ var fintekkers_requests_security_metric_search_security_metric_request_pb = require('../../../fintekkers/requests/security_metric/search_security_metric_request_pb.js');
7
+ var fintekkers_requests_security_metric_get_latest_security_metric_request_pb = require('../../../fintekkers/requests/security_metric/get_latest_security_metric_request_pb.js');
8
+
9
+ function serialize_fintekkers_requests_security_metric_CreateSecurityMetricRequestProto(arg) {
10
+ if (!(arg instanceof fintekkers_requests_security_metric_create_security_metric_request_pb.CreateSecurityMetricRequestProto)) {
11
+ throw new Error('Expected argument of type fintekkers.requests.security_metric.CreateSecurityMetricRequestProto');
12
+ }
13
+ return Buffer.from(arg.serializeBinary());
14
+ }
15
+
16
+ function deserialize_fintekkers_requests_security_metric_CreateSecurityMetricRequestProto(buffer_arg) {
17
+ return fintekkers_requests_security_metric_create_security_metric_request_pb.CreateSecurityMetricRequestProto.deserializeBinary(new Uint8Array(buffer_arg));
18
+ }
19
+
20
+ function serialize_fintekkers_requests_security_metric_CreateSecurityMetricResponseProto(arg) {
21
+ if (!(arg instanceof fintekkers_requests_security_metric_create_security_metric_request_pb.CreateSecurityMetricResponseProto)) {
22
+ throw new Error('Expected argument of type fintekkers.requests.security_metric.CreateSecurityMetricResponseProto');
23
+ }
24
+ return Buffer.from(arg.serializeBinary());
25
+ }
26
+
27
+ function deserialize_fintekkers_requests_security_metric_CreateSecurityMetricResponseProto(buffer_arg) {
28
+ return fintekkers_requests_security_metric_create_security_metric_request_pb.CreateSecurityMetricResponseProto.deserializeBinary(new Uint8Array(buffer_arg));
29
+ }
30
+
31
+ function serialize_fintekkers_requests_security_metric_GetLatestSecurityMetricRequestProto(arg) {
32
+ if (!(arg instanceof fintekkers_requests_security_metric_get_latest_security_metric_request_pb.GetLatestSecurityMetricRequestProto)) {
33
+ throw new Error('Expected argument of type fintekkers.requests.security_metric.GetLatestSecurityMetricRequestProto');
34
+ }
35
+ return Buffer.from(arg.serializeBinary());
36
+ }
37
+
38
+ function deserialize_fintekkers_requests_security_metric_GetLatestSecurityMetricRequestProto(buffer_arg) {
39
+ return fintekkers_requests_security_metric_get_latest_security_metric_request_pb.GetLatestSecurityMetricRequestProto.deserializeBinary(new Uint8Array(buffer_arg));
40
+ }
41
+
42
+ function serialize_fintekkers_requests_security_metric_GetLatestSecurityMetricResponseProto(arg) {
43
+ if (!(arg instanceof fintekkers_requests_security_metric_get_latest_security_metric_request_pb.GetLatestSecurityMetricResponseProto)) {
44
+ throw new Error('Expected argument of type fintekkers.requests.security_metric.GetLatestSecurityMetricResponseProto');
45
+ }
46
+ return Buffer.from(arg.serializeBinary());
47
+ }
48
+
49
+ function deserialize_fintekkers_requests_security_metric_GetLatestSecurityMetricResponseProto(buffer_arg) {
50
+ return fintekkers_requests_security_metric_get_latest_security_metric_request_pb.GetLatestSecurityMetricResponseProto.deserializeBinary(new Uint8Array(buffer_arg));
51
+ }
52
+
53
+ function serialize_fintekkers_requests_security_metric_SearchSecurityMetricRequestProto(arg) {
54
+ if (!(arg instanceof fintekkers_requests_security_metric_search_security_metric_request_pb.SearchSecurityMetricRequestProto)) {
55
+ throw new Error('Expected argument of type fintekkers.requests.security_metric.SearchSecurityMetricRequestProto');
56
+ }
57
+ return Buffer.from(arg.serializeBinary());
58
+ }
59
+
60
+ function deserialize_fintekkers_requests_security_metric_SearchSecurityMetricRequestProto(buffer_arg) {
61
+ return fintekkers_requests_security_metric_search_security_metric_request_pb.SearchSecurityMetricRequestProto.deserializeBinary(new Uint8Array(buffer_arg));
62
+ }
63
+
64
+ function serialize_fintekkers_requests_security_metric_SearchSecurityMetricResponseProto(arg) {
65
+ if (!(arg instanceof fintekkers_requests_security_metric_search_security_metric_request_pb.SearchSecurityMetricResponseProto)) {
66
+ throw new Error('Expected argument of type fintekkers.requests.security_metric.SearchSecurityMetricResponseProto');
67
+ }
68
+ return Buffer.from(arg.serializeBinary());
69
+ }
70
+
71
+ function deserialize_fintekkers_requests_security_metric_SearchSecurityMetricResponseProto(buffer_arg) {
72
+ return fintekkers_requests_security_metric_search_security_metric_request_pb.SearchSecurityMetricResponseProto.deserializeBinary(new Uint8Array(buffer_arg));
73
+ }
74
+
75
+
76
+ // Per-security metric series such as shares outstanding, NAV per share and
77
+ // total net assets (LM-484). See SecurityMetricSeriesProto and
78
+ // docs/adr/security_metric_series.md.
79
+ //
80
+ // Absent means unknown, never 0, in every RPC: a missing point is never
81
+ // filled with 0 or with another date's value.
82
+ var SecurityMetricService = exports.SecurityMetricService = {
83
+ // Store the points of one series. One series per request.
84
+ //
85
+ // The server ignores the request's series.as_of and stamps its own receive
86
+ // time as the knowledge time of the write. Each point is an upsert keyed by
87
+ // (security_id, metric, observation_date):
88
+ // - a new date is inserted;
89
+ // - a correction (a different value for a date already stored) closes
90
+ // the old stored row by setting its valid_to to the new as_of, then
91
+ // stores the new value from that as_of. A query at an earlier as_of
92
+ // still returns the old value;
93
+ // - the same value again is a no-op;
94
+ // - dates not in the request are untouched. There is no delete here.
95
+ //
96
+ // The response is the header only (security_id, metric and the stamped
97
+ // as_of) with zero points; the points are not echoed.
98
+ //
99
+ // Errors:
100
+ // INVALID_ARGUMENT: no security_id; metric UNKNOWN_SECURITY_METRIC; zero
101
+ // points; a point with no observation_date or no value; two points
102
+ // with the same observation_date; a SHARES_OUTSTANDING value with a
103
+ // fractional part.
104
+ // NOT_FOUND: the security does not exist, where the server checks.
105
+ createOrUpdate: {
106
+ path: '/fintekkers.services.security_metric_service.SecurityMetric/CreateOrUpdate',
107
+ requestStream: false,
108
+ responseStream: false,
109
+ requestType: fintekkers_requests_security_metric_create_security_metric_request_pb.CreateSecurityMetricRequestProto,
110
+ responseType: fintekkers_requests_security_metric_create_security_metric_request_pb.CreateSecurityMetricResponseProto,
111
+ requestSerialize: serialize_fintekkers_requests_security_metric_CreateSecurityMetricRequestProto,
112
+ requestDeserialize: deserialize_fintekkers_requests_security_metric_CreateSecurityMetricRequestProto,
113
+ responseSerialize: serialize_fintekkers_requests_security_metric_CreateSecurityMetricResponseProto,
114
+ responseDeserialize: deserialize_fintekkers_requests_security_metric_CreateSecurityMetricResponseProto,
115
+ },
116
+ // Every point of the requested metrics of one security with an
117
+ // observation_date in [start_date, end_date], as known at as_of (the
118
+ // request's, else the server's now).
119
+ //
120
+ // Stream rules:
121
+ // - one series per (security, metric), metrics in request order (a
122
+ // repeated metric once, at its first position);
123
+ // - a long series is split into chunks: consecutive messages that each
124
+ // repeat the same security_id, metric and as_of. Points ascend by
125
+ // observation_date within and across chunks, with no date in two
126
+ // chunks. The client appends the chunks' points to get the series.
127
+ // Chunk size is the server's choice;
128
+ // - every chunk has at least one point, except that a metric with no
129
+ // points in the range yields exactly one message with zero points
130
+ // (unknown, never 0);
131
+ // - as_of on every message is the knowledge time used.
132
+ //
133
+ // Errors:
134
+ // INVALID_ARGUMENT: no security_id; empty metrics; a metric
135
+ // UNKNOWN_SECURITY_METRIC; start_date after end_date.
136
+ search: {
137
+ path: '/fintekkers.services.security_metric_service.SecurityMetric/Search',
138
+ requestStream: false,
139
+ responseStream: true,
140
+ requestType: fintekkers_requests_security_metric_search_security_metric_request_pb.SearchSecurityMetricRequestProto,
141
+ responseType: fintekkers_requests_security_metric_search_security_metric_request_pb.SearchSecurityMetricResponseProto,
142
+ requestSerialize: serialize_fintekkers_requests_security_metric_SearchSecurityMetricRequestProto,
143
+ requestDeserialize: deserialize_fintekkers_requests_security_metric_SearchSecurityMetricRequestProto,
144
+ responseSerialize: serialize_fintekkers_requests_security_metric_SearchSecurityMetricResponseProto,
145
+ responseDeserialize: deserialize_fintekkers_requests_security_metric_SearchSecurityMetricResponseProto,
146
+ },
147
+ // The latest point on or before the request's date for each distinct
148
+ // (security_id, metric) pair, as known at as_of (the request's, else the
149
+ // server's now).
150
+ //
151
+ // One series per pair, securities in request order then metrics in request
152
+ // order. Each series holds at most one point: the one with the latest
153
+ // observation_date on or before the date. A pair with no such point holds
154
+ // zero points, meaning unknown, never 0. A point is never carried forward
155
+ // past a later correction: the value is the one known at as_of.
156
+ //
157
+ // Errors:
158
+ // INVALID_ARGUMENT: empty security_ids; empty metrics; a metric
159
+ // UNKNOWN_SECURITY_METRIC; no date.
160
+ getLatest: {
161
+ path: '/fintekkers.services.security_metric_service.SecurityMetric/GetLatest',
162
+ requestStream: false,
163
+ responseStream: false,
164
+ requestType: fintekkers_requests_security_metric_get_latest_security_metric_request_pb.GetLatestSecurityMetricRequestProto,
165
+ responseType: fintekkers_requests_security_metric_get_latest_security_metric_request_pb.GetLatestSecurityMetricResponseProto,
166
+ requestSerialize: serialize_fintekkers_requests_security_metric_GetLatestSecurityMetricRequestProto,
167
+ requestDeserialize: deserialize_fintekkers_requests_security_metric_GetLatestSecurityMetricRequestProto,
168
+ responseSerialize: serialize_fintekkers_requests_security_metric_GetLatestSecurityMetricResponseProto,
169
+ responseDeserialize: deserialize_fintekkers_requests_security_metric_GetLatestSecurityMetricResponseProto,
170
+ },
171
+ };
172
+
173
+ exports.SecurityMetricClient = grpc.makeGenericClientConstructor(SecurityMetricService, 'SecurityMetric');
@@ -0,0 +1,10 @@
1
+ // package: fintekkers.services.security_metric_service
2
+ // file: fintekkers/services/security-metric-service/security_metric_service.proto
3
+
4
+ /* tslint:disable */
5
+ /* eslint-disable */
6
+
7
+ import * as jspb from "google-protobuf";
8
+ import * as fintekkers_requests_security_metric_create_security_metric_request_pb from "../../../fintekkers/requests/security_metric/create_security_metric_request_pb";
9
+ import * as fintekkers_requests_security_metric_search_security_metric_request_pb from "../../../fintekkers/requests/security_metric/search_security_metric_request_pb";
10
+ import * as fintekkers_requests_security_metric_get_latest_security_metric_request_pb from "../../../fintekkers/requests/security_metric/get_latest_security_metric_request_pb";
@@ -0,0 +1,29 @@
1
+ // source: fintekkers/services/security-metric-service/security_metric_service.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global = (function() {
17
+ if (this) { return this; }
18
+ if (typeof window !== 'undefined') { return window; }
19
+ if (typeof global !== 'undefined') { return global; }
20
+ if (typeof self !== 'undefined') { return self; }
21
+ return Function('return this')();
22
+ }.call(null));
23
+
24
+ var fintekkers_requests_security_metric_create_security_metric_request_pb = require('../../../fintekkers/requests/security_metric/create_security_metric_request_pb.js');
25
+ goog.object.extend(proto, fintekkers_requests_security_metric_create_security_metric_request_pb);
26
+ var fintekkers_requests_security_metric_search_security_metric_request_pb = require('../../../fintekkers/requests/security_metric/search_security_metric_request_pb.js');
27
+ goog.object.extend(proto, fintekkers_requests_security_metric_search_security_metric_request_pb);
28
+ var fintekkers_requests_security_metric_get_latest_security_metric_request_pb = require('../../../fintekkers/requests/security_metric/get_latest_security_metric_request_pb.js');
29
+ goog.object.extend(proto, fintekkers_requests_security_metric_get_latest_security_metric_request_pb);
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * LM-484: security metric series, GetLatest and Search messages round-trip
5
+ * unchanged, with field-level checks after parse.
6
+ *
7
+ * An empty series (zero points: unknown) and a series with one point of
8
+ * value 0 (a real zero) parse to different lengths and differ on the wire.
9
+ */
10
+ const timestamp_pb_1 = require("google-protobuf/google/protobuf/timestamp_pb");
11
+ const security_metric_pb_1 = require("../../../fintekkers/models/security/security_metric_pb");
12
+ const security_metric_type_pb_1 = require("../../../fintekkers/models/security/security_metric_type_pb");
13
+ const local_date_pb_1 = require("../../../fintekkers/models/util/local_date_pb");
14
+ const local_timestamp_pb_1 = require("../../../fintekkers/models/util/local_timestamp_pb");
15
+ const object_type_pb_1 = require("../../../fintekkers/models/util/object_type_pb");
16
+ const uuid_pb_1 = require("../../../fintekkers/models/util/uuid_pb");
17
+ const get_latest_security_metric_request_pb_1 = require("../../../fintekkers/requests/security_metric/get_latest_security_metric_request_pb");
18
+ const search_security_metric_request_pb_1 = require("../../../fintekkers/requests/security_metric/search_security_metric_request_pb");
19
+ const decimal_1 = require("../utils/decimal");
20
+ const SPY = new uuid_pb_1.UUIDProto().setRawUuid(new Uint8Array(16).fill(1));
21
+ const QQQ = new uuid_pb_1.UUIDProto().setRawUuid(new Uint8Array(16).fill(2));
22
+ function asOf() {
23
+ return new local_timestamp_pb_1.LocalTimestampProto().setTimestamp(new timestamp_pb_1.Timestamp().setSeconds(1795392000)).setTimeZone('UTC');
24
+ }
25
+ function date(year, month, day) {
26
+ return new local_date_pb_1.LocalDateProto().setYear(year).setMonth(month).setDay(day);
27
+ }
28
+ function decimal(value) {
29
+ return (0, decimal_1.encodeDecimal)((0, decimal_1.parseDecimalString)(value));
30
+ }
31
+ function point(observationDate, value) {
32
+ return new security_metric_pb_1.SecurityMetricPointProto().setObservationDate(observationDate).setValue(decimal(value));
33
+ }
34
+ function series(security, metric, points) {
35
+ return new security_metric_pb_1.SecurityMetricSeriesProto()
36
+ .setObjectType(object_type_pb_1.ObjectTypeProto.OBJECT_TYPE_SECURITY_METRIC_SERIES)
37
+ .setSecurityId(security)
38
+ .setMetric(metric)
39
+ .setAsOf(asOf())
40
+ .setPointsList(points);
41
+ }
42
+ function pointsOf(s) {
43
+ return s.getPointsList().map((p) => {
44
+ const d = p.getObservationDate();
45
+ return `${d.getYear()}-${d.getMonth()}-${d.getDay()}=${(0, decimal_1.toCanonicalString)((0, decimal_1.decodeDecimal)(p.getValue()))}`;
46
+ });
47
+ }
48
+ describe('SecurityMetric round trips (LM-484)', () => {
49
+ test('a 3-point series keeps its order and exact decimals', () => {
50
+ const original = series(SPY, security_metric_type_pb_1.SecurityMetricTypeProto.SHARES_OUTSTANDING, [
51
+ point(date(2026, 9, 28), '15204137000'),
52
+ point(date(2026, 9, 29), '15210000000'),
53
+ point(date(2026, 9, 30), '15198250000'),
54
+ ]);
55
+ const parsed = security_metric_pb_1.SecurityMetricSeriesProto.deserializeBinary(original.serializeBinary());
56
+ expect(parsed.toObject()).toEqual(original.toObject());
57
+ expect(parsed.getSecurityId().getRawUuid_asU8()).toEqual(SPY.getRawUuid_asU8());
58
+ expect(parsed.getMetric()).toBe(security_metric_type_pb_1.SecurityMetricTypeProto.SHARES_OUTSTANDING);
59
+ expect(parsed.getAsOf().toObject()).toEqual(asOf().toObject());
60
+ expect(pointsOf(parsed)).toEqual(['2026-9-28=15204137000', '2026-9-29=15210000000', '2026-9-30=15198250000']);
61
+ });
62
+ test('an empty series is not a 0-valued point', () => {
63
+ const empty = series(SPY, security_metric_type_pb_1.SecurityMetricTypeProto.NAV_PER_SHARE, []);
64
+ const zero = series(SPY, security_metric_type_pb_1.SecurityMetricTypeProto.NAV_PER_SHARE, [point(date(2026, 11, 20), '0')]);
65
+ const parsedEmpty = security_metric_pb_1.SecurityMetricSeriesProto.deserializeBinary(empty.serializeBinary());
66
+ const parsedZero = security_metric_pb_1.SecurityMetricSeriesProto.deserializeBinary(zero.serializeBinary());
67
+ expect(parsedEmpty.toObject()).toEqual(empty.toObject());
68
+ expect(parsedZero.toObject()).toEqual(zero.toObject());
69
+ expect(parsedEmpty.getPointsList()).toHaveLength(0);
70
+ expect(parsedZero.getPointsList()).toHaveLength(1);
71
+ expect(pointsOf(parsedZero)).toEqual(['2026-11-20=0']);
72
+ expect(Array.from(empty.serializeBinary())).not.toEqual(Array.from(zero.serializeBinary()));
73
+ });
74
+ test('a GetLatest request and response, with a pair that has no point', () => {
75
+ const request = new get_latest_security_metric_request_pb_1.GetLatestSecurityMetricRequestProto()
76
+ .setObjectType(object_type_pb_1.ObjectTypeProto.OBJECT_TYPE_GET_LATEST_SECURITY_METRIC_REQUEST)
77
+ .setSecurityIdsList([SPY, QQQ])
78
+ .setMetricsList([security_metric_type_pb_1.SecurityMetricTypeProto.TOTAL_NET_ASSETS])
79
+ .setDate(date(2026, 11, 20))
80
+ .setAsOf(asOf());
81
+ const response = new get_latest_security_metric_request_pb_1.GetLatestSecurityMetricResponseProto()
82
+ .setObjectType(object_type_pb_1.ObjectTypeProto.OBJECT_TYPE_GET_LATEST_SECURITY_METRIC_RESPONSE)
83
+ .setSeriesList([
84
+ series(SPY, security_metric_type_pb_1.SecurityMetricTypeProto.TOTAL_NET_ASSETS, [point(date(2026, 11, 19), '5100000000')]),
85
+ series(QQQ, security_metric_type_pb_1.SecurityMetricTypeProto.TOTAL_NET_ASSETS, []),
86
+ ]);
87
+ const parsedRequest = get_latest_security_metric_request_pb_1.GetLatestSecurityMetricRequestProto.deserializeBinary(request.serializeBinary());
88
+ const parsedResponse = get_latest_security_metric_request_pb_1.GetLatestSecurityMetricResponseProto.deserializeBinary(response.serializeBinary());
89
+ expect(parsedRequest.toObject()).toEqual(request.toObject());
90
+ expect(parsedRequest.getSecurityIdsList().map((u) => Array.from(u.getRawUuid_asU8()))).toEqual([
91
+ Array.from(SPY.getRawUuid_asU8()),
92
+ Array.from(QQQ.getRawUuid_asU8()),
93
+ ]);
94
+ expect(parsedRequest.getMetricsList()).toEqual([security_metric_type_pb_1.SecurityMetricTypeProto.TOTAL_NET_ASSETS]);
95
+ expect(parsedRequest.getDate().toObject()).toEqual(date(2026, 11, 20).toObject());
96
+ expect(parsedRequest.getAsOf().toObject()).toEqual(asOf().toObject());
97
+ expect(parsedResponse.toObject()).toEqual(response.toObject());
98
+ const [spy, qqq] = parsedResponse.getSeriesList();
99
+ expect(parsedResponse.getSeriesList()).toHaveLength(2);
100
+ expect(spy.getSecurityId().getRawUuid_asU8()).toEqual(SPY.getRawUuid_asU8());
101
+ expect(pointsOf(spy)).toEqual(['2026-11-19=5100000000']);
102
+ expect(qqq.getSecurityId().getRawUuid_asU8()).toEqual(QQQ.getRawUuid_asU8());
103
+ expect(qqq.getMetric()).toBe(security_metric_type_pb_1.SecurityMetricTypeProto.TOTAL_NET_ASSETS);
104
+ expect(qqq.getPointsList()).toHaveLength(0);
105
+ });
106
+ test('a Search request and response', () => {
107
+ const request = new search_security_metric_request_pb_1.SearchSecurityMetricRequestProto()
108
+ .setObjectType(object_type_pb_1.ObjectTypeProto.OBJECT_TYPE_SEARCH_SECURITY_METRIC_REQUEST)
109
+ .setSecurityId(SPY)
110
+ .setMetricsList([security_metric_type_pb_1.SecurityMetricTypeProto.NAV_PER_SHARE, security_metric_type_pb_1.SecurityMetricTypeProto.SHARES_OUTSTANDING])
111
+ .setStartDate(date(2026, 11, 1))
112
+ .setEndDate(date(2026, 11, 20))
113
+ .setAsOf(asOf());
114
+ const response = new search_security_metric_request_pb_1.SearchSecurityMetricResponseProto()
115
+ .setObjectType(object_type_pb_1.ObjectTypeProto.OBJECT_TYPE_SEARCH_SECURITY_METRIC_RESPONSE)
116
+ .setSeries(series(SPY, security_metric_type_pb_1.SecurityMetricTypeProto.NAV_PER_SHARE, [
117
+ point(date(2026, 11, 19), '100.98'),
118
+ point(date(2026, 11, 20), '101.42'),
119
+ ]));
120
+ const parsedRequest = search_security_metric_request_pb_1.SearchSecurityMetricRequestProto.deserializeBinary(request.serializeBinary());
121
+ const parsedResponse = search_security_metric_request_pb_1.SearchSecurityMetricResponseProto.deserializeBinary(response.serializeBinary());
122
+ expect(parsedRequest.toObject()).toEqual(request.toObject());
123
+ expect(parsedRequest.getSecurityId().getRawUuid_asU8()).toEqual(SPY.getRawUuid_asU8());
124
+ expect(parsedRequest.getMetricsList()).toEqual([
125
+ security_metric_type_pb_1.SecurityMetricTypeProto.NAV_PER_SHARE,
126
+ security_metric_type_pb_1.SecurityMetricTypeProto.SHARES_OUTSTANDING,
127
+ ]);
128
+ expect(parsedRequest.getStartDate().toObject()).toEqual(date(2026, 11, 1).toObject());
129
+ expect(parsedRequest.getEndDate().toObject()).toEqual(date(2026, 11, 20).toObject());
130
+ expect(parsedRequest.getAsOf().toObject()).toEqual(asOf().toObject());
131
+ expect(parsedResponse.toObject()).toEqual(response.toObject());
132
+ const s = parsedResponse.getSeries();
133
+ expect(s.getMetric()).toBe(security_metric_type_pb_1.SecurityMetricTypeProto.NAV_PER_SHARE);
134
+ expect(pointsOf(s)).toEqual(['2026-11-19=100.98', '2026-11-20=101.42']);
135
+ });
136
+ });
137
+ //# sourceMappingURL=security-metric-roundtrip.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security-metric-roundtrip.test.js","sourceRoot":"","sources":["security-metric-roundtrip.test.ts"],"names":[],"mappings":";;AAAA;;;;;;GAMG;AACH,+EAAyE;AACzE,+FAA6H;AAC7H,yGAAsG;AAEtG,iFAA+E;AAC/E,2FAAyF;AACzF,mFAAiF;AACjF,qEAAoE;AACpE,8IAG4F;AAC5F,sIAGwF;AACxF,8CAAuG;AAEvG,MAAM,GAAG,GAAG,IAAI,mBAAS,EAAE,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACnE,MAAM,GAAG,GA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anged, with field-level checks after parse.
4
+ *
5
+ * An empty series (zero points: unknown) and a series with one point of
6
+ * value 0 (a real zero) parse to different lengths and differ on the wire.
7
+ */
8
+ import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb';
9
+ import { SecurityMetricPointProto, SecurityMetricSeriesProto } from '../../../fintekkers/models/security/security_metric_pb';
10
+ import { SecurityMetricTypeProto } from '../../../fintekkers/models/security/security_metric_type_pb';
11
+ import type { DecimalValueProto } from '../../../fintekkers/models/util/decimal_value_pb';
12
+ import { LocalDateProto } from '../../../fintekkers/models/util/local_date_pb';
13
+ import { LocalTimestampProto } from '../../../fintekkers/models/util/local_timestamp_pb';
14
+ import { ObjectTypeProto } from '../../../fintekkers/models/util/object_type_pb';
15
+ import { UUIDProto } from '../../../fintekkers/models/util/uuid_pb';
16
+ import {
17
+ GetLatestSecurityMetricRequestProto,
18
+ GetLatestSecurityMetricResponseProto,
19
+ } from '../../../fintekkers/requests/security_metric/get_latest_security_metric_request_pb';
20
+ import {
21
+ SearchSecurityMetricRequestProto,
22
+ SearchSecurityMetricResponseProto,
23
+ } from '../../../fintekkers/requests/security_metric/search_security_metric_request_pb';
24
+ import { decodeDecimal, encodeDecimal, parseDecimalString, toCanonicalString } from '../utils/decimal';
25
+
26
+ const SPY = new UUIDProto().setRawUuid(new Uint8Array(16).fill(1));
27
+ const QQQ = new UUIDProto().setRawUuid(new Uint8Array(16).fill(2));
28
+
29
+ function asOf(): LocalTimestampProto {
30
+ return new LocalTimestampProto().setTimestamp(new Timestamp().setSeconds(1795392000)).setTimeZone('UTC');
31
+ }
32
+
33
+ function date(year: number, month: number, day: number): LocalDateProto {
34
+ return new LocalDateProto().setYear(year).setMonth(month).setDay(day);
35
+ }
36
+
37
+ function decimal(value: string): DecimalValueProto {
38
+ return encodeDecimal(parseDecimalString(value));
39
+ }
40
+
41
+ function point(observationDate: LocalDateProto, value: string): SecurityMetricPointProto {
42
+ return new SecurityMetricPointProto().setObservationDate(observationDate).setValue(decimal(value));
43
+ }
44
+
45
+ function series(security: UUIDProto, metric: SecurityMetricTypeProto, points: SecurityMetricPointProto[]): SecurityMetricSeriesProto {
46
+ return new SecurityMetricSeriesProto()
47
+ .setObjectType(ObjectTypeProto.OBJECT_TYPE_SECURITY_METRIC_SERIES)
48
+ .setSecurityId(security)
49
+ .setMetric(metric)
50
+ .setAsOf(asOf())
51
+ .setPointsList(points);
52
+ }
53
+
54
+ function pointsOf(s: SecurityMetricSeriesProto): string[] {
55
+ return s.getPointsList().map((p) => {
56
+ const d = p.getObservationDate()!;
57
+ return `${d.getYear()}-${d.getMonth()}-${d.getDay()}=${toCanonicalString(decodeDecimal(p.getValue()!))}`;
58
+ });
59
+ }
60
+
61
+ describe('SecurityMetric round trips (LM-484)', () => {
62
+ test('a 3-point series keeps its order and exact decimals', () => {
63
+ const original = series(SPY, SecurityMetricTypeProto.SHARES_OUTSTANDING, [
64
+ point(date(2026, 9, 28), '15204137000'),
65
+ point(date(2026, 9, 29), '15210000000'),
66
+ point(date(2026, 9, 30), '15198250000'),
67
+ ]);
68
+
69
+ const parsed = SecurityMetricSeriesProto.deserializeBinary(original.serializeBinary());
70
+
71
+ expect(parsed.toObject()).toEqual(original.toObject());
72
+ expect(parsed.getSecurityId()!.getRawUuid_asU8()).toEqual(SPY.getRawUuid_asU8());
73
+ expect(parsed.getMetric()).toBe(SecurityMetricTypeProto.SHARES_OUTSTANDING);
74
+ expect(parsed.getAsOf()!.toObject()).toEqual(asOf().toObject());
75
+ expect(pointsOf(parsed)).toEqual(['2026-9-28=15204137000', '2026-9-29=15210000000', '2026-9-30=15198250000']);
76
+ });
77
+
78
+ test('an empty series is not a 0-valued point', () => {
79
+ const empty = series(SPY, SecurityMetricTypeProto.NAV_PER_SHARE, []);
80
+ const zero = series(SPY, SecurityMetricTypeProto.NAV_PER_SHARE, [point(date(2026, 11, 20), '0')]);
81
+
82
+ const parsedEmpty = SecurityMetricSeriesProto.deserializeBinary(empty.serializeBinary());
83
+ const parsedZero = SecurityMetricSeriesProto.deserializeBinary(zero.serializeBinary());
84
+
85
+ expect(parsedEmpty.toObject()).toEqual(empty.toObject());
86
+ expect(parsedZero.toObject()).toEqual(zero.toObject());
87
+ expect(parsedEmpty.getPointsList()).toHaveLength(0);
88
+ expect(parsedZero.getPointsList()).toHaveLength(1);
89
+ expect(pointsOf(parsedZero)).toEqual(['2026-11-20=0']);
90
+ expect(Array.from(empty.serializeBinary())).not.toEqual(Array.from(zero.serializeBinary()));
91
+ });
92
+
93
+ test('a GetLatest request and response, with a pair that has no point', () => {
94
+ const request = new GetLatestSecurityMetricRequestProto()
95
+ .setObjectType(ObjectTypeProto.OBJECT_TYPE_GET_LATEST_SECURITY_METRIC_REQUEST)
96
+ .setSecurityIdsList([SPY, QQQ])
97
+ .setMetricsList([SecurityMetricTypeProto.TOTAL_NET_ASSETS])
98
+ .setDate(date(2026, 11, 20))
99
+ .setAsOf(asOf());
100
+ const response = new GetLatestSecurityMetricResponseProto()
101
+ .setObjectType(ObjectTypeProto.OBJECT_TYPE_GET_LATEST_SECURITY_METRIC_RESPONSE)
102
+ .setSeriesList([
103
+ series(SPY, SecurityMetricTypeProto.TOTAL_NET_ASSETS, [point(date(2026, 11, 19), '5100000000')]),
104
+ series(QQQ, SecurityMetricTypeProto.TOTAL_NET_ASSETS, []),
105
+ ]);
106
+
107
+ const parsedRequest = GetLatestSecurityMetricRequestProto.deserializeBinary(request.serializeBinary());
108
+ const parsedResponse = GetLatestSecurityMetricResponseProto.deserializeBinary(response.serializeBinary());
109
+
110
+ expect(parsedRequest.toObject()).toEqual(request.toObject());
111
+ expect(parsedRequest.getSecurityIdsList().map((u) => Array.from(u.getRawUuid_asU8()))).toEqual([
112
+ Array.from(SPY.getRawUuid_asU8()),
113
+ Array.from(QQQ.getRawUuid_asU8()),
114
+ ]);
115
+ expect(parsedRequest.getMetricsList()).toEqual([SecurityMetricTypeProto.TOTAL_NET_ASSETS]);
116
+ expect(parsedRequest.getDate()!.toObject()).toEqual(date(2026, 11, 20).toObject());
117
+ expect(parsedRequest.getAsOf()!.toObject()).toEqual(asOf().toObject());
118
+
119
+ expect(parsedResponse.toObject()).toEqual(response.toObject());
120
+ const [spy, qqq] = parsedResponse.getSeriesList();
121
+ expect(parsedResponse.getSeriesList()).toHaveLength(2);
122
+ expect(spy.getSecurityId()!.getRawUuid_asU8()).toEqual(SPY.getRawUuid_asU8());
123
+ expect(pointsOf(spy)).toEqual(['2026-11-19=5100000000']);
124
+ expect(qqq.getSecurityId()!.getRawUuid_asU8()).toEqual(QQQ.getRawUuid_asU8());
125
+ expect(qqq.getMetric()).toBe(SecurityMetricTypeProto.TOTAL_NET_ASSETS);
126
+ expect(qqq.getPointsList()).toHaveLength(0);
127
+ });
128
+
129
+ test('a Search request and response', () => {
130
+ const request = new SearchSecurityMetricRequestProto()
131
+ .setObjectType(ObjectTypeProto.OBJECT_TYPE_SEARCH_SECURITY_METRIC_REQUEST)
132
+ .setSecurityId(SPY)
133
+ .setMetricsList([SecurityMetricTypeProto.NAV_PER_SHARE, SecurityMetricTypeProto.SHARES_OUTSTANDING])
134
+ .setStartDate(date(2026, 11, 1))
135
+ .setEndDate(date(2026, 11, 20))
136
+ .setAsOf(asOf());
137
+ const response = new SearchSecurityMetricResponseProto()
138
+ .setObjectType(ObjectTypeProto.OBJECT_TYPE_SEARCH_SECURITY_METRIC_RESPONSE)
139
+ .setSeries(series(SPY, SecurityMetricTypeProto.NAV_PER_SHARE, [
140
+ point(date(2026, 11, 19), '100.98'),
141
+ point(date(2026, 11, 20), '101.42'),
142
+ ]));
143
+
144
+ const parsedRequest = SearchSecurityMetricRequestProto.deserializeBinary(request.serializeBinary());
145
+ const parsedResponse = SearchSecurityMetricResponseProto.deserializeBinary(response.serializeBinary());
146
+
147
+ expect(parsedRequest.toObject()).toEqual(request.toObject());
148
+ expect(parsedRequest.getSecurityId()!.getRawUuid_asU8()).toEqual(SPY.getRawUuid_asU8());
149
+ expect(parsedRequest.getMetricsList()).toEqual([
150
+ SecurityMetricTypeProto.NAV_PER_SHARE,
151
+ SecurityMetricTypeProto.SHARES_OUTSTANDING,
152
+ ]);
153
+ expect(parsedRequest.getStartDate()!.toObject()).toEqual(date(2026, 11, 1).toObject());
154
+ expect(parsedRequest.getEndDate()!.toObject()).toEqual(date(2026, 11, 20).toObject());
155
+ expect(parsedRequest.getAsOf()!.toObject()).toEqual(asOf().toObject());
156
+
157
+ expect(parsedResponse.toObject()).toEqual(response.toObject());
158
+ const s = parsedResponse.getSeries()!;
159
+ expect(s.getMetric()).toBe(SecurityMetricTypeProto.NAV_PER_SHARE);
160
+ expect(pointsOf(s)).toEqual(['2026-11-19=100.98', '2026-11-20=101.42']);
161
+ });
162
+ });
@@ -20,6 +20,7 @@ const price_pb_1 = require("../../fintekkers/models/price/price_pb");
20
20
  const issuance_pb_1 = require("../../fintekkers/models/security/bond/issuance_pb");
21
21
  const identifier_pb_1 = require("../../fintekkers/models/security/identifier/identifier_pb");
22
22
  const index_composition_pb_1 = require("../../fintekkers/models/security/index_composition_pb");
23
+ const security_metric_pb_1 = require("../../fintekkers/models/security/security_metric_pb");
23
24
  const security_pb_1 = require("../../fintekkers/models/security/security_pb");
24
25
  const tenor_pb_1 = require("../../fintekkers/models/security/tenor_pb");
25
26
  const strategy_pb_1 = require("../../fintekkers/models/strategy/strategy_pb");
@@ -48,6 +49,9 @@ const get_field_values_response_pb_1 = require("../../fintekkers/requests/securi
48
49
  const get_fields_response_pb_1 = require("../../fintekkers/requests/security/get_fields_response_pb");
49
50
  const query_security_request_pb_1 = require("../../fintekkers/requests/security/query_security_request_pb");
50
51
  const query_security_response_pb_1 = require("../../fintekkers/requests/security/query_security_response_pb");
52
+ const create_security_metric_request_pb_1 = require("../../fintekkers/requests/security_metric/create_security_metric_request_pb");
53
+ const get_latest_security_metric_request_pb_1 = require("../../fintekkers/requests/security_metric/get_latest_security_metric_request_pb");
54
+ const search_security_metric_request_pb_1 = require("../../fintekkers/requests/security_metric/search_security_metric_request_pb");
51
55
  const create_transaction_request_pb_1 = require("../../fintekkers/requests/transaction/create_transaction_request_pb");
52
56
  const create_transaction_response_pb_1 = require("../../fintekkers/requests/transaction/create_transaction_response_pb");
53
57
  const query_transaction_request_pb_1 = require("../../fintekkers/requests/transaction/query_transaction_request_pb");
@@ -126,6 +130,14 @@ const OWN_TYPE_ROWS = [
126
130
  ['fintekkers.requests.valuation.ValuationResponseProto', valuation_response_pb_1.ValuationResponseProto, object_type_pb_1.ObjectTypeProto.OBJECT_TYPE_VALUATION_RESPONSE],
127
131
  ['fintekkers.requests.valuation.CurveRequestProto', curve_request_pb_1.CurveRequestProto, object_type_pb_1.ObjectTypeProto.OBJECT_TYPE_CURVE_REQUEST],
128
132
  ['fintekkers.requests.valuation.CurveResponseProto', curve_response_pb_1.CurveResponseProto, object_type_pb_1.ObjectTypeProto.OBJECT_TYPE_CURVE_RESPONSE],
133
+ // LM-484: the security metric series and its requests.
134
+ ['fintekkers.models.security.SecurityMetricSeriesProto', security_metric_pb_1.SecurityMetricSeriesProto, object_type_pb_1.ObjectTypeProto.OBJECT_TYPE_SECURITY_METRIC_SERIES],
135
+ ['fintekkers.requests.security_metric.CreateSecurityMetricRequestProto', create_security_metric_request_pb_1.CreateSecurityMetricRequestProto, object_type_pb_1.ObjectTypeProto.OBJECT_TYPE_CREATE_SECURITY_METRIC_REQUEST],
136
+ ['fintekkers.requests.security_metric.CreateSecurityMetricResponseProto', create_security_metric_request_pb_1.CreateSecurityMetricResponseProto, object_type_pb_1.ObjectTypeProto.OBJECT_TYPE_CREATE_SECURITY_METRIC_RESPONSE],
137
+ ['fintekkers.requests.security_metric.GetLatestSecurityMetricRequestProto', get_latest_security_metric_request_pb_1.GetLatestSecurityMetricRequestProto, object_type_pb_1.ObjectTypeProto.OBJECT_TYPE_GET_LATEST_SECURITY_METRIC_REQUEST],
138
+ ['fintekkers.requests.security_metric.GetLatestSecurityMetricResponseProto', get_latest_security_metric_request_pb_1.GetLatestSecurityMetricResponseProto, object_type_pb_1.ObjectTypeProto.OBJECT_TYPE_GET_LATEST_SECURITY_METRIC_RESPONSE],
139
+ ['fintekkers.requests.security_metric.SearchSecurityMetricRequestProto', search_security_metric_request_pb_1.SearchSecurityMetricRequestProto, object_type_pb_1.ObjectTypeProto.OBJECT_TYPE_SEARCH_SECURITY_METRIC_REQUEST],
140
+ ['fintekkers.requests.security_metric.SearchSecurityMetricResponseProto', search_security_metric_request_pb_1.SearchSecurityMetricResponseProto, object_type_pb_1.ObjectTypeProto.OBJECT_TYPE_SEARCH_SECURITY_METRIC_RESPONSE],
129
141
  ];
130
142
  const OWN_TYPES = new Map(OWN_TYPE_ROWS.map(([, messageClass, objectType]) => [messageClass, objectType]));
131
143
  /** Each message with object_type, by proto full name, to its own ObjectTypeProto value. */
@@ -1 +1 @@
1
- {"version":3,"file":"object-types.js","sourceRoot":"","sources":["object-types.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;GASG;AACH,gFAA8E;AAC9E,wEAAuE;AACvE,iFAAgF;AAChF,8EAA6E;AAC7E,4FAA0F;AAC1F,qEAAoE;AACpE,mFAAkF;AAClF,6FAA4F;AAC5F,gGAA8F;AAC9F,8EAA6E;AAC7E,wEAAuE;AACvE,8EAA6E;AAC7E,oGAAkG;AAClG,uFAAsF;AACtF,4EAAsE;AACtE,8EAA4E;AAC5E,2FAAoF;AACpF,mFAA4E;AAC5E,yIAA0K;AAC1K,mIAAiK;AACjK,iHAA8G;AAC9G,mHAAgH;AAChH,+GAA4G;AAC5G,iHAA8G;AAC9G,4GAAyG;AACzG,8GAA2G;AAC3G,qGAAkG;AAClG,uGAAoG;AACpG,mGAAgG;AAChG,qGAAkG;AAClG,8GAA2G;AAC3G,gHAA6G;AAC7G,gHAA4G;AAC5G,kHAA8G;AAC9G,sGAAmG;AACnG,4GAAyG;AACzG,8GAA2G;AAC3G,uHAAoH;AACpH,yHAAsH;AACtH,qHAAkH;AAClH,uHAAoH;AACpH,wFAA2G;AAC3G,yFAAuF;AACvF,2FAAyF;AACz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AC;AAC5C,CAAC;AAFD,0BAEC;AAED;;;;GAIG;AACH,SAAgB,QAAQ,CAAwB,OAAU;;IACxD,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACpC,IAAI,UAAU,KAAK,SAAS,EAAE;QAC5B,MAAM,IAAI,KAAK,CAAC,GAAG,CAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,IAAI,KAAI,mBAAmB,6BAA6B,CAAC,CAAC;KACnG;IACD,OAAO,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AACpC,CAAC;AAND,4BAMC;AAED;;;GAGG;AACH,SAAgB,QAAQ,CAAC,OAAoB;IAC3C,OAAO,OAAO,CAAC,aAAa,EAAE,CAAC;AACjC,CAAC;AAFD,4BAEC;AAED,gFAAgF;AAChF,SAAgB,WAAW,CAAC,OAAoB;IAC9C,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IACrC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACrE,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,OAAO,CAAC,QAAQ,EAAE,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;AACtE,CAAC;AAJD,kCAIC"}
@@ -17,6 +17,7 @@ import { PriceProto } from '../../fintekkers/models/price/price_pb';
17
17
  import { IssuanceProto } from '../../fintekkers/models/security/bond/issuance_pb';
18
18
  import { IdentifierProto } from '../../fintekkers/models/security/identifier/identifier_pb';
19
19
  import { IndexCompositionProto } from '../../fintekkers/models/security/index_composition_pb';
20
+ import { SecurityMetricSeriesProto } from '../../fintekkers/models/security/security_metric_pb';
20
21
  import { SecurityProto } from '../../fintekkers/models/security/security_pb';
21
22
  import { TenorProto } from '../../fintekkers/models/security/tenor_pb';
22
23
  import { StrategyProto } from '../../fintekkers/models/strategy/strategy_pb';
@@ -45,6 +46,9 @@ import { GetFieldValuesResponseProto } from '../../fintekkers/requests/security/
45
46
  import { GetFieldsResponseProto } from '../../fintekkers/requests/security/get_fields_response_pb';
46
47
  import { QuerySecurityRequestProto } from '../../fintekkers/requests/security/query_security_request_pb';
47
48
  import { QuerySecurityResponseProto } from '../../fintekkers/requests/security/query_security_response_pb';
49
+ import { CreateSecurityMetricRequestProto, CreateSecurityMetricResponseProto } from '../../fintekkers/requests/security_metric/create_security_metric_request_pb';
50
+ import { GetLatestSecurityMetricRequestProto, GetLatestSecurityMetricResponseProto } from '../../fintekkers/requests/security_metric/get_latest_security_metric_request_pb';
51
+ import { SearchSecurityMetricRequestProto, SearchSecurityMetricResponseProto } from '../../fintekkers/requests/security_metric/search_security_metric_request_pb';
48
52
  import { CreateTransactionRequestProto } from '../../fintekkers/requests/transaction/create_transaction_request_pb';
49
53
  import { CreateTransactionResponseProto } from '../../fintekkers/requests/transaction/create_transaction_response_pb';
50
54
  import { QueryTransactionRequestProto } from '../../fintekkers/requests/transaction/query_transaction_request_pb';
@@ -137,6 +141,14 @@ const OWN_TYPE_ROWS: ReadonlyArray<[string, Function, ObjectTypeProto]> = [
137
141
  ['fintekkers.requests.valuation.ValuationResponseProto', ValuationResponseProto, ObjectTypeProto.OBJECT_TYPE_VALUATION_RESPONSE],
138
142
  ['fintekkers.requests.valuation.CurveRequestProto', CurveRequestProto, ObjectTypeProto.OBJECT_TYPE_CURVE_REQUEST],
139
143
  ['fintekkers.requests.valuation.CurveResponseProto', CurveResponseProto, ObjectTypeProto.OBJECT_TYPE_CURVE_RESPONSE],
144
+ // LM-484: the security metric series and its requests.
145
+ ['fintekkers.models.security.SecurityMetricSeriesProto', SecurityMetricSeriesProto, ObjectTypeProto.OBJECT_TYPE_SECURITY_METRIC_SERIES],
146
+ ['fintekkers.requests.security_metric.CreateSecurityMetricRequestProto', CreateSecurityMetricRequestProto, ObjectTypeProto.OBJECT_TYPE_CREATE_SECURITY_METRIC_REQUEST],
147
+ ['fintekkers.requests.security_metric.CreateSecurityMetricResponseProto', CreateSecurityMetricResponseProto, ObjectTypeProto.OBJECT_TYPE_CREATE_SECURITY_METRIC_RESPONSE],
148
+ ['fintekkers.requests.security_metric.GetLatestSecurityMetricRequestProto', GetLatestSecurityMetricRequestProto, ObjectTypeProto.OBJECT_TYPE_GET_LATEST_SECURITY_METRIC_REQUEST],
149
+ ['fintekkers.requests.security_metric.GetLatestSecurityMetricResponseProto', GetLatestSecurityMetricResponseProto, ObjectTypeProto.OBJECT_TYPE_GET_LATEST_SECURITY_METRIC_RESPONSE],
150
+ ['fintekkers.requests.security_metric.SearchSecurityMetricRequestProto', SearchSecurityMetricRequestProto, ObjectTypeProto.OBJECT_TYPE_SEARCH_SECURITY_METRIC_REQUEST],
151
+ ['fintekkers.requests.security_metric.SearchSecurityMetricResponseProto', SearchSecurityMetricResponseProto, ObjectTypeProto.OBJECT_TYPE_SEARCH_SECURITY_METRIC_RESPONSE],
140
152
  ];
141
153
 
142
154
  const OWN_TYPES: ReadonlyMap<Function, ObjectTypeProto> = new Map(