@fintekkers/ledger-models 0.1.83 → 0.1.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node/wrappers/models/position/position.js +11 -10
- package/node/wrappers/models/position/position.js.map +1 -1
- package/node/wrappers/models/position/position.test.ts +1 -1
- package/node/wrappers/models/position/position.ts +12 -10
- package/node/wrappers/models/utils/date.test.js +70 -0
- package/node/wrappers/models/utils/date.test.js.map +1 -0
- package/node/wrappers/models/utils/date.test.ts +36 -0
- package/node/wrappers/models/utils/datetime.js.map +1 -1
- package/node/wrappers/models/utils/datetime.test.js +25 -2
- package/node/wrappers/models/utils/datetime.test.js.map +1 -1
- package/node/wrappers/models/utils/datetime.test.ts +31 -1
- package/node/wrappers/models/utils/datetime.ts +0 -1
- package/node/wrappers/services/position-service/PositionService.ts +1 -1
- package/package.json +1 -1
- package/node/fintekkers/models/portfolio/portfolio_grpc_pb.js +0 -1
- package/node/fintekkers/models/position/field_grpc_pb.js +0 -1
- package/node/fintekkers/models/position/measure_grpc_pb.js +0 -1
- package/node/fintekkers/models/position/position_filter_grpc_pb.js +0 -1
- package/node/fintekkers/models/position/position_grpc_pb.js +0 -1
- package/node/fintekkers/models/position/position_status_grpc_pb.js +0 -1
- package/node/fintekkers/models/position/position_util_grpc_pb.js +0 -1
- package/node/fintekkers/models/price/price_grpc_pb.js +0 -1
- package/node/fintekkers/models/security/bond/auction_type_grpc_pb.js +0 -1
- package/node/fintekkers/models/security/bond/issuance_grpc_pb.js +0 -1
- package/node/fintekkers/models/security/coupon_frequency_grpc_pb.js +0 -1
- package/node/fintekkers/models/security/coupon_type_grpc_pb.js +0 -1
- package/node/fintekkers/models/security/identifier/identifier_grpc_pb.js +0 -1
- package/node/fintekkers/models/security/identifier/identifier_type_grpc_pb.js +0 -1
- package/node/fintekkers/models/security/security_grpc_pb.js +0 -1
- package/node/fintekkers/models/security/security_quantity_type_grpc_pb.js +0 -1
- package/node/fintekkers/models/security/security_type_grpc_pb.js +0 -1
- package/node/fintekkers/models/security/tenor_grpc_pb.js +0 -1
- package/node/fintekkers/models/security/tenor_type_grpc_pb.js +0 -1
- package/node/fintekkers/models/strategy/strategy_allocation_grpc_pb.js +0 -1
- package/node/fintekkers/models/strategy/strategy_grpc_pb.js +0 -1
- package/node/fintekkers/models/transaction/transaction_grpc_pb.js +0 -1
- package/node/fintekkers/models/transaction/transaction_type_grpc_pb.js +0 -1
- package/node/fintekkers/models/util/api/api_key_grpc_pb.js +0 -1
- package/node/fintekkers/models/util/decimal_value_grpc_pb.js +0 -1
- package/node/fintekkers/models/util/endpoint_grpc_pb.js +0 -1
- package/node/fintekkers/models/util/local_date_grpc_pb.js +0 -1
- package/node/fintekkers/models/util/local_timestamp_grpc_pb.js +0 -1
- package/node/fintekkers/models/util/lock/node_partition_grpc_pb.js +0 -1
- package/node/fintekkers/models/util/lock/node_state_grpc_pb.js +0 -1
- package/node/fintekkers/models/util/uuid_grpc_pb.js +0 -1
- package/node/fintekkers/requests/portfolio/create_portfolio_request_grpc_pb.js +0 -1
- package/node/fintekkers/requests/portfolio/create_portfolio_response_grpc_pb.js +0 -1
- package/node/fintekkers/requests/portfolio/query_portfolio_request_grpc_pb.js +0 -1
- package/node/fintekkers/requests/portfolio/query_portfolio_response_grpc_pb.js +0 -1
- package/node/fintekkers/requests/position/query_position_request_grpc_pb.js +0 -1
- package/node/fintekkers/requests/position/query_position_response_grpc_pb.js +0 -1
- package/node/fintekkers/requests/price/create_price_request_grpc_pb.js +0 -1
- package/node/fintekkers/requests/price/create_price_response_grpc_pb.js +0 -1
- package/node/fintekkers/requests/price/query_price_request_grpc_pb.js +0 -1
- package/node/fintekkers/requests/price/query_price_response_grpc_pb.js +0 -1
- package/node/fintekkers/requests/security/create_security_request_grpc_pb.js +0 -1
- package/node/fintekkers/requests/security/create_security_response_grpc_pb.js +0 -1
- package/node/fintekkers/requests/security/query_security_request_grpc_pb.js +0 -1
- package/node/fintekkers/requests/security/query_security_response_grpc_pb.js +0 -1
- package/node/fintekkers/requests/transaction/create_transaction_request_grpc_pb.js +0 -1
- package/node/fintekkers/requests/transaction/create_transaction_response_grpc_pb.js +0 -1
- package/node/fintekkers/requests/transaction/query_transaction_request_grpc_pb.js +0 -1
- package/node/fintekkers/requests/transaction/query_transaction_response_grpc_pb.js +0 -1
- package/node/fintekkers/requests/util/errors/error_grpc_pb.js +0 -1
- package/node/fintekkers/requests/util/errors/message_grpc_pb.js +0 -1
- package/node/fintekkers/requests/util/errors/summary_grpc_pb.js +0 -1
- package/node/fintekkers/requests/util/lock/lock_request_grpc_pb.js +0 -1
- package/node/fintekkers/requests/util/lock/lock_response_grpc_pb.js +0 -1
- package/node/fintekkers/requests/util/operation_grpc_pb.js +0 -1
- package/node/fintekkers/requests/valuation/valuation_request_grpc_pb.js +0 -1
- package/node/fintekkers/requests/valuation/valuation_response_grpc_pb.js +0 -1
- package/node/wrappers/models/position/hardcoded.position.js +0 -74
- package/node/wrappers/models/position/hardcoded.position.js.map +0 -1
- package/node/wrappers/models/position/hardcoded.position.ts +0 -81
- package/web/fintekkers/models/portfolio/portfolio_pb.d.ts +0 -60
- package/web/fintekkers/models/portfolio/portfolio_pb.js +0 -468
- package/web/fintekkers/models/position/field_pb.d.ts +0 -36
- package/web/fintekkers/models/position/field_pb.js +0 -55
- package/web/fintekkers/models/position/measure_pb.d.ts +0 -13
- package/web/fintekkers/models/position/measure_pb.js +0 -32
- package/web/fintekkers/models/position/position_filter_pb.d.ts +0 -33
- package/web/fintekkers/models/position/position_filter_pb.js +0 -262
- package/web/fintekkers/models/position/position_pb.d.ts +0 -57
- package/web/fintekkers/models/position/position_pb.js +0 -395
- package/web/fintekkers/models/position/position_status_pb.d.ts +0 -10
- package/web/fintekkers/models/position/position_status_pb.js +0 -29
- package/web/fintekkers/models/position/position_util_pb.d.ts +0 -86
- package/web/fintekkers/models/position/position_util_pb.js +0 -600
- package/web/fintekkers/models/price/price_pb.d.ts +0 -70
- package/web/fintekkers/models/price/price_pb.js +0 -544
- package/web/fintekkers/models/security/bond/auction_type_pb.d.ts +0 -8
- package/web/fintekkers/models/security/bond/auction_type_pb.js +0 -27
- package/web/fintekkers/models/security/bond/issuance_pb.d.ts +0 -94
- package/web/fintekkers/models/security/bond/issuance_pb.js +0 -748
- package/web/fintekkers/models/security/coupon_frequency_pb.d.ts +0 -12
- package/web/fintekkers/models/security/coupon_frequency_pb.js +0 -31
- package/web/fintekkers/models/security/coupon_type_pb.d.ts +0 -10
- package/web/fintekkers/models/security/coupon_type_pb.js +0 -29
- package/web/fintekkers/models/security/identifier/identifier_pb.d.ts +0 -35
- package/web/fintekkers/models/security/identifier/identifier_pb.js +0 -262
- package/web/fintekkers/models/security/identifier/identifier_type_pb.d.ts +0 -13
- package/web/fintekkers/models/security/identifier/identifier_type_pb.js +0 -32
- package/web/fintekkers/models/security/security_pb.d.ts +0 -144
- package/web/fintekkers/models/security/security_pb.js +0 -1111
- package/web/fintekkers/models/security/security_quantity_type_pb.d.ts +0 -10
- package/web/fintekkers/models/security/security_quantity_type_pb.js +0 -29
- package/web/fintekkers/models/security/security_type_pb.d.ts +0 -12
- package/web/fintekkers/models/security/security_type_pb.js +0 -31
- package/web/fintekkers/models/security/tenor_pb.d.ts +0 -35
- package/web/fintekkers/models/security/tenor_pb.js +0 -262
- package/web/fintekkers/models/security/tenor_type_pb.d.ts +0 -9
- package/web/fintekkers/models/security/tenor_type_pb.js +0 -28
- package/web/fintekkers/models/strategy/strategy_allocation_pb.d.ts +0 -78
- package/web/fintekkers/models/strategy/strategy_allocation_pb.js +0 -624
- package/web/fintekkers/models/strategy/strategy_pb.d.ts +0 -66
- package/web/fintekkers/models/strategy/strategy_pb.js +0 -519
- package/web/fintekkers/models/transaction/transaction_pb.d.ts +0 -128
- package/web/fintekkers/models/transaction/transaction_pb.js +0 -991
- package/web/fintekkers/models/transaction/transaction_type_pb.d.ts +0 -13
- package/web/fintekkers/models/transaction/transaction_type_pb.js +0 -32
- package/web/fintekkers/models/util/api/api_key_pb.d.ts +0 -34
- package/web/fintekkers/models/util/api/api_key_pb.js +0 -260
- package/web/fintekkers/models/util/decimal_value_pb.d.ts +0 -22
- package/web/fintekkers/models/util/decimal_value_pb.js +0 -170
- package/web/fintekkers/models/util/endpoint_pb.d.ts +0 -30
- package/web/fintekkers/models/util/endpoint_pb.js +0 -230
- package/web/fintekkers/models/util/local_date_pb.d.ts +0 -30
- package/web/fintekkers/models/util/local_date_pb.js +0 -230
- package/web/fintekkers/models/util/local_timestamp_pb.d.ts +0 -29
- package/web/fintekkers/models/util/local_timestamp_pb.js +0 -223
- package/web/fintekkers/models/util/lock/node_partition_pb.d.ts +0 -34
- package/web/fintekkers/models/util/lock/node_partition_pb.js +0 -260
- package/web/fintekkers/models/util/lock/node_state_pb.d.ts +0 -51
- package/web/fintekkers/models/util/lock/node_state_pb.js +0 -389
- package/web/fintekkers/models/util/uuid_pb.d.ts +0 -24
- package/web/fintekkers/models/util/uuid_pb.js +0 -194
- package/web/fintekkers/requests/portfolio/create_portfolio_request_pb.d.ts +0 -33
- package/web/fintekkers/requests/portfolio/create_portfolio_request_pb.js +0 -253
- package/web/fintekkers/requests/portfolio/create_portfolio_response_pb.d.ts +0 -40
- package/web/fintekkers/requests/portfolio/create_portfolio_response_pb.js +0 -315
- package/web/fintekkers/requests/portfolio/query_portfolio_request_pb.d.ts +0 -47
- package/web/fintekkers/requests/portfolio/query_portfolio_request_pb.js +0 -368
- package/web/fintekkers/requests/portfolio/query_portfolio_response_pb.d.ts +0 -40
- package/web/fintekkers/requests/portfolio/query_portfolio_response_pb.js +0 -315
- package/web/fintekkers/requests/position/query_position_request_pb.d.ts +0 -68
- package/web/fintekkers/requests/position/query_position_request_pb.js +0 -513
- package/web/fintekkers/requests/position/query_position_response_pb.d.ts +0 -44
- package/web/fintekkers/requests/position/query_position_response_pb.js +0 -345
- package/web/fintekkers/requests/price/create_price_request_pb.d.ts +0 -33
- package/web/fintekkers/requests/price/create_price_request_pb.js +0 -253
- package/web/fintekkers/requests/price/create_price_response_pb.d.ts +0 -40
- package/web/fintekkers/requests/price/create_price_response_pb.js +0 -315
- package/web/fintekkers/requests/price/query_price_request_pb.d.ts +0 -47
- package/web/fintekkers/requests/price/query_price_request_pb.js +0 -368
- package/web/fintekkers/requests/price/query_price_response_pb.d.ts +0 -40
- package/web/fintekkers/requests/price/query_price_response_pb.js +0 -315
- package/web/fintekkers/requests/security/create_security_request_pb.d.ts +0 -33
- package/web/fintekkers/requests/security/create_security_request_pb.js +0 -253
- package/web/fintekkers/requests/security/create_security_response_pb.d.ts +0 -47
- package/web/fintekkers/requests/security/create_security_response_pb.js +0 -359
- package/web/fintekkers/requests/security/query_security_request_pb.d.ts +0 -47
- package/web/fintekkers/requests/security/query_security_request_pb.js +0 -368
- package/web/fintekkers/requests/security/query_security_response_pb.d.ts +0 -47
- package/web/fintekkers/requests/security/query_security_response_pb.js +0 -370
- package/web/fintekkers/requests/transaction/create_transaction_request_pb.d.ts +0 -33
- package/web/fintekkers/requests/transaction/create_transaction_request_pb.js +0 -253
- package/web/fintekkers/requests/transaction/create_transaction_response_pb.d.ts +0 -40
- package/web/fintekkers/requests/transaction/create_transaction_response_pb.js +0 -306
- package/web/fintekkers/requests/transaction/query_transaction_request_pb.d.ts +0 -51
- package/web/fintekkers/requests/transaction/query_transaction_request_pb.js +0 -398
- package/web/fintekkers/requests/transaction/query_transaction_response_pb.d.ts +0 -47
- package/web/fintekkers/requests/transaction/query_transaction_response_pb.js +0 -368
- package/web/fintekkers/requests/util/errors/error_pb.d.ts +0 -57
- package/web/fintekkers/requests/util/errors/error_pb.js +0 -435
- package/web/fintekkers/requests/util/errors/message_pb.d.ts +0 -26
- package/web/fintekkers/requests/util/errors/message_pb.js +0 -200
- package/web/fintekkers/requests/util/errors/summary_pb.d.ts +0 -31
- package/web/fintekkers/requests/util/errors/summary_pb.js +0 -255
- package/web/fintekkers/requests/util/lock/lock_request_pb.d.ts +0 -33
- package/web/fintekkers/requests/util/lock/lock_request_pb.js +0 -253
- package/web/fintekkers/requests/util/lock/lock_response_pb.d.ts +0 -47
- package/web/fintekkers/requests/util/lock/lock_response_pb.js +0 -359
- package/web/fintekkers/requests/util/operation_pb.d.ts +0 -11
- package/web/fintekkers/requests/util/operation_pb.js +0 -30
- package/web/fintekkers/requests/valuation/valuation_request_pb.d.ts +0 -59
- package/web/fintekkers/requests/valuation/valuation_request_pb.js +0 -451
- package/web/fintekkers/requests/valuation/valuation_response_pb.d.ts +0 -40
- package/web/fintekkers/requests/valuation/valuation_response_pb.js +0 -315
- package/web/fintekkers/services/lock-service/lock_service_grpc_web_pb.d.ts +0 -94
- package/web/fintekkers/services/lock-service/lock_service_grpc_web_pb.js +0 -451
- package/web/fintekkers/services/lock-service/lock_service_pb.d.ts +0 -69
- package/web/fintekkers/services/lock-service/lock_service_pb.js +0 -570
- package/web/fintekkers/services/portfolio-service/portfolio_service_grpc_web_pb.d.ts +0 -93
- package/web/fintekkers/services/portfolio-service/portfolio_service_grpc_web_pb.js +0 -451
- package/web/fintekkers/services/portfolio-service/portfolio_service_pb.d.ts +0 -9
- package/web/fintekkers/services/portfolio-service/portfolio_service_pb.js +0 -27
- package/web/fintekkers/services/position-service/position_service_grpc_web_pb.d.ts +0 -43
- package/web/fintekkers/services/position-service/position_service_grpc_web_pb.js +0 -203
- package/web/fintekkers/services/position-service/position_service_pb.d.ts +0 -7
- package/web/fintekkers/services/position-service/position_service_pb.js +0 -23
- package/web/fintekkers/services/price-service/price_service_grpc_web_pb.d.ts +0 -93
- package/web/fintekkers/services/price-service/price_service_grpc_web_pb.js +0 -451
- package/web/fintekkers/services/price-service/price_service_pb.d.ts +0 -9
- package/web/fintekkers/services/price-service/price_service_pb.js +0 -27
- package/web/fintekkers/services/security-service/security_service_grpc_web_pb.d.ts +0 -93
- package/web/fintekkers/services/security-service/security_service_grpc_web_pb.js +0 -451
- package/web/fintekkers/services/security-service/security_service_pb.d.ts +0 -9
- package/web/fintekkers/services/security-service/security_service_pb.js +0 -27
- package/web/fintekkers/services/transaction-service/transaction_service_grpc_web_pb.d.ts +0 -93
- package/web/fintekkers/services/transaction-service/transaction_service_grpc_web_pb.js +0 -451
- package/web/fintekkers/services/transaction-service/transaction_service_pb.d.ts +0 -9
- package/web/fintekkers/services/transaction-service/transaction_service_pb.js +0 -27
- package/web/fintekkers/services/valuation-service/valuation_service_grpc_web_pb.d.ts +0 -32
- package/web/fintekkers/services/valuation-service/valuation_service_grpc_web_pb.js +0 -145
- package/web/fintekkers/services/valuation-service/valuation_service_pb.d.ts +0 -6
- package/web/fintekkers/services/valuation-service/valuation_service_pb.js +0 -21
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Note: Some classes and functions have been omitted or simplified due to lack of context.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Position = void 0;
|
|
5
|
-
var field_pb_1 = require("../../../fintekkers/models/position/field_pb");
|
|
6
|
-
var measure_pb_1 = require("../../../fintekkers/models/position/measure_pb");
|
|
7
|
-
var decimal_js_1 = require("decimal.js");
|
|
8
|
-
var transaction_type_pb_1 = require("../../../fintekkers/models/transaction/transaction_type_pb");
|
|
9
|
-
var uuid_1 = require("uuid");
|
|
10
|
-
var Position = /** @class */ (function () {
|
|
11
|
-
function Position(positionProto) {
|
|
12
|
-
this.proto = positionProto;
|
|
13
|
-
}
|
|
14
|
-
Position.prototype.getFieldValue = function (field) {
|
|
15
|
-
switch (field) {
|
|
16
|
-
case field_pb_1.FieldProto.TRADE_DATE:
|
|
17
|
-
case field_pb_1.FieldProto.TRADE_DATE:
|
|
18
|
-
case field_pb_1.FieldProto.EFFECTIVE_DATE:
|
|
19
|
-
case field_pb_1.FieldProto.MATURITY_DATE:
|
|
20
|
-
case field_pb_1.FieldProto.TAX_LOT_OPEN_DATE:
|
|
21
|
-
case field_pb_1.FieldProto.TAX_LOT_CLOSE_DATE:
|
|
22
|
-
var start = new Date(2024, 0, 1).getTime(); // January 1st of the startYear
|
|
23
|
-
var now = new Date().getTime();
|
|
24
|
-
var randomTime = start + Math.random() * (now - start);
|
|
25
|
-
return new Date(randomTime);
|
|
26
|
-
case field_pb_1.FieldProto.PRODUCT_TYPE:
|
|
27
|
-
var items = ['Bond', 'Equity'];
|
|
28
|
-
var randomIndex = Math.floor(Math.random() * items.length);
|
|
29
|
-
return items[randomIndex];
|
|
30
|
-
case field_pb_1.FieldProto.ASSET_CLASS:
|
|
31
|
-
var items2 = ['Equity', 'Fixed Income'];
|
|
32
|
-
var randomIndex2 = Math.floor(Math.random() * items2.length);
|
|
33
|
-
return items2[randomIndex2];
|
|
34
|
-
case field_pb_1.FieldProto.TRANSACTION_TYPE:
|
|
35
|
-
var items3 = [transaction_type_pb_1.TransactionTypeProto.BUY, transaction_type_pb_1.TransactionTypeProto.SELL, transaction_type_pb_1.TransactionTypeProto.DEPOSIT, transaction_type_pb_1.TransactionTypeProto.WITHDRAWAL, transaction_type_pb_1.TransactionTypeProto.MATURATION];
|
|
36
|
-
var randomIndex3 = Math.floor(Math.random() * items3.length);
|
|
37
|
-
return items3[randomIndex3];
|
|
38
|
-
case field_pb_1.FieldProto.ID:
|
|
39
|
-
case field_pb_1.FieldProto.SECURITY_ID:
|
|
40
|
-
case field_pb_1.FieldProto.PORTFOLIO_ID:
|
|
41
|
-
return (0, uuid_1.v4)();
|
|
42
|
-
default:
|
|
43
|
-
throw new Error("No dummy data setup for this Field");
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
Position.prototype.getField = function (fieldToGet) {
|
|
47
|
-
throw Error("Do not cal this");
|
|
48
|
-
};
|
|
49
|
-
Position.prototype.getMeasureValue = function (measure) {
|
|
50
|
-
switch (measure) {
|
|
51
|
-
case measure_pb_1.MeasureProto.DIRECTED_QUANTITY:
|
|
52
|
-
return new decimal_js_1.default(Math.random() * 100000).toString();
|
|
53
|
-
case measure_pb_1.MeasureProto.UNADJUSTED_COST_BASIS:
|
|
54
|
-
return new decimal_js_1.default(Math.random() * 100).toString();
|
|
55
|
-
case measure_pb_1.MeasureProto.MARKET_VALUE:
|
|
56
|
-
return new decimal_js_1.default(Math.random() * 10000000).toString();
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
Position.prototype.getMeasure = function (measureToGet) {
|
|
60
|
-
throw new Error("Do not call this");
|
|
61
|
-
};
|
|
62
|
-
Position.prototype.getFieldDisplay = function (fieldToGet) {
|
|
63
|
-
throw new Error("Do not call this");
|
|
64
|
-
};
|
|
65
|
-
Position.prototype.getMeasures = function () {
|
|
66
|
-
return [measure_pb_1.MeasureProto.DIRECTED_QUANTITY, measure_pb_1.MeasureProto.UNADJUSTED_COST_BASIS, measure_pb_1.MeasureProto.MARKET_VALUE];
|
|
67
|
-
};
|
|
68
|
-
Position.prototype.getFields = function () {
|
|
69
|
-
return [field_pb_1.FieldProto.SECURITY_ID, field_pb_1.FieldProto.TRADE_DATE, field_pb_1.FieldProto.ASSET_CLASS, field_pb_1.FieldProto.TRANSACTION_TYPE];
|
|
70
|
-
};
|
|
71
|
-
return Position;
|
|
72
|
-
}());
|
|
73
|
-
exports.Position = Position;
|
|
74
|
-
//# sourceMappingURL=hardcoded.position.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hardcoded.position.js","sourceRoot":"","sources":["hardcoded.position.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
// Note: Some classes and functions have been omitted or simplified due to lack of context.
|
|
2
|
-
|
|
3
|
-
import { FieldProto } from "../../../fintekkers/models/position/field_pb";
|
|
4
|
-
import { PositionProto } from "../../../fintekkers/models/position/position_pb";
|
|
5
|
-
import { FieldMapEntry, MeasureMapEntry } from "../../../fintekkers/models/position/position_util_pb";
|
|
6
|
-
import { MeasureProto } from "../../../fintekkers/models/position/measure_pb";
|
|
7
|
-
import Decimal from "decimal.js";
|
|
8
|
-
import { TransactionTypeProto } from "../../../fintekkers/models/transaction/transaction_type_pb";
|
|
9
|
-
import { v4 as uuidv4 } from 'uuid';
|
|
10
|
-
|
|
11
|
-
export class Position {
|
|
12
|
-
proto: PositionProto;
|
|
13
|
-
|
|
14
|
-
constructor(positionProto: PositionProto) {
|
|
15
|
-
this.proto = positionProto;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
public getFieldValue(field: FieldProto): any {
|
|
19
|
-
switch (field) {
|
|
20
|
-
case FieldProto.TRADE_DATE:
|
|
21
|
-
case FieldProto.TRADE_DATE:
|
|
22
|
-
case FieldProto.EFFECTIVE_DATE:
|
|
23
|
-
case FieldProto.MATURITY_DATE:
|
|
24
|
-
case FieldProto.TAX_LOT_OPEN_DATE:
|
|
25
|
-
case FieldProto.TAX_LOT_CLOSE_DATE:
|
|
26
|
-
const start = new Date(2024, 0, 1).getTime(); // January 1st of the startYear
|
|
27
|
-
const now = new Date().getTime();
|
|
28
|
-
const randomTime = start + Math.random() * (now - start);
|
|
29
|
-
return new Date(randomTime);
|
|
30
|
-
case FieldProto.PRODUCT_TYPE:
|
|
31
|
-
let items = ['Bond', 'Equity']
|
|
32
|
-
const randomIndex = Math.floor(Math.random() * items.length);
|
|
33
|
-
return items[randomIndex];
|
|
34
|
-
case FieldProto.ASSET_CLASS:
|
|
35
|
-
let items2 = ['Equity', 'Fixed Income']
|
|
36
|
-
const randomIndex2 = Math.floor(Math.random() * items2.length);
|
|
37
|
-
return items2[randomIndex2];
|
|
38
|
-
case FieldProto.TRANSACTION_TYPE:
|
|
39
|
-
let items3 = [TransactionTypeProto.BUY, TransactionTypeProto.SELL, TransactionTypeProto.DEPOSIT, TransactionTypeProto.WITHDRAWAL, TransactionTypeProto.MATURATION];
|
|
40
|
-
const randomIndex3 = Math.floor(Math.random() * items3.length);
|
|
41
|
-
return items3[randomIndex3];
|
|
42
|
-
case FieldProto.ID:
|
|
43
|
-
case FieldProto.SECURITY_ID:
|
|
44
|
-
case FieldProto.PORTFOLIO_ID:
|
|
45
|
-
return uuidv4();
|
|
46
|
-
default:
|
|
47
|
-
throw new Error("No dummy data setup for this Field");
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
public getField(fieldToGet: FieldMapEntry): any {
|
|
52
|
-
throw Error("Do not cal this");
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
public getMeasureValue(measure: MeasureProto): string {
|
|
56
|
-
switch (measure) {
|
|
57
|
-
case MeasureProto.DIRECTED_QUANTITY:
|
|
58
|
-
return new Decimal(Math.random() * 100000).toString();
|
|
59
|
-
case MeasureProto.UNADJUSTED_COST_BASIS:
|
|
60
|
-
return new Decimal(Math.random() * 100).toString();
|
|
61
|
-
case MeasureProto.MARKET_VALUE:
|
|
62
|
-
return new Decimal(Math.random() * 10000000).toString();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
private getMeasure(measureToGet: MeasureMapEntry): Decimal {
|
|
67
|
-
throw new Error("Do not call this");
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
public getFieldDisplay(fieldToGet: FieldMapEntry): string {
|
|
71
|
-
throw new Error("Do not call this");
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
public getMeasures(): MeasureProto[] {
|
|
75
|
-
return [MeasureProto.DIRECTED_QUANTITY, MeasureProto.UNADJUSTED_COST_BASIS, MeasureProto.MARKET_VALUE];
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
public getFields(): FieldProto[] {
|
|
79
|
-
return [FieldProto.SECURITY_ID, FieldProto.TRADE_DATE, FieldProto.ASSET_CLASS, FieldProto.TRANSACTION_TYPE];
|
|
80
|
-
}
|
|
81
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import * as jspb from 'google-protobuf'
|
|
2
|
-
|
|
3
|
-
import * as fintekkers_models_util_local_timestamp_pb from '../../../fintekkers/models/util/local_timestamp_pb';
|
|
4
|
-
import * as fintekkers_models_util_uuid_pb from '../../../fintekkers/models/util/uuid_pb';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export class PortfolioProto extends jspb.Message {
|
|
8
|
-
getObjectClass(): string;
|
|
9
|
-
setObjectClass(value: string): PortfolioProto;
|
|
10
|
-
|
|
11
|
-
getVersion(): string;
|
|
12
|
-
setVersion(value: string): PortfolioProto;
|
|
13
|
-
|
|
14
|
-
getUuid(): fintekkers_models_util_uuid_pb.UUIDProto | undefined;
|
|
15
|
-
setUuid(value?: fintekkers_models_util_uuid_pb.UUIDProto): PortfolioProto;
|
|
16
|
-
hasUuid(): boolean;
|
|
17
|
-
clearUuid(): PortfolioProto;
|
|
18
|
-
|
|
19
|
-
getAsOf(): fintekkers_models_util_local_timestamp_pb.LocalTimestampProto | undefined;
|
|
20
|
-
setAsOf(value?: fintekkers_models_util_local_timestamp_pb.LocalTimestampProto): PortfolioProto;
|
|
21
|
-
hasAsOf(): boolean;
|
|
22
|
-
clearAsOf(): PortfolioProto;
|
|
23
|
-
|
|
24
|
-
getIsLink(): boolean;
|
|
25
|
-
setIsLink(value: boolean): PortfolioProto;
|
|
26
|
-
|
|
27
|
-
getValidFrom(): fintekkers_models_util_local_timestamp_pb.LocalTimestampProto | undefined;
|
|
28
|
-
setValidFrom(value?: fintekkers_models_util_local_timestamp_pb.LocalTimestampProto): PortfolioProto;
|
|
29
|
-
hasValidFrom(): boolean;
|
|
30
|
-
clearValidFrom(): PortfolioProto;
|
|
31
|
-
|
|
32
|
-
getValidTo(): fintekkers_models_util_local_timestamp_pb.LocalTimestampProto | undefined;
|
|
33
|
-
setValidTo(value?: fintekkers_models_util_local_timestamp_pb.LocalTimestampProto): PortfolioProto;
|
|
34
|
-
hasValidTo(): boolean;
|
|
35
|
-
clearValidTo(): PortfolioProto;
|
|
36
|
-
|
|
37
|
-
getPortfolioName(): string;
|
|
38
|
-
setPortfolioName(value: string): PortfolioProto;
|
|
39
|
-
|
|
40
|
-
serializeBinary(): Uint8Array;
|
|
41
|
-
toObject(includeInstance?: boolean): PortfolioProto.AsObject;
|
|
42
|
-
static toObject(includeInstance: boolean, msg: PortfolioProto): PortfolioProto.AsObject;
|
|
43
|
-
static serializeBinaryToWriter(message: PortfolioProto, writer: jspb.BinaryWriter): void;
|
|
44
|
-
static deserializeBinary(bytes: Uint8Array): PortfolioProto;
|
|
45
|
-
static deserializeBinaryFromReader(message: PortfolioProto, reader: jspb.BinaryReader): PortfolioProto;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export namespace PortfolioProto {
|
|
49
|
-
export type AsObject = {
|
|
50
|
-
objectClass: string,
|
|
51
|
-
version: string,
|
|
52
|
-
uuid?: fintekkers_models_util_uuid_pb.UUIDProto.AsObject,
|
|
53
|
-
asOf?: fintekkers_models_util_local_timestamp_pb.LocalTimestampProto.AsObject,
|
|
54
|
-
isLink: boolean,
|
|
55
|
-
validFrom?: fintekkers_models_util_local_timestamp_pb.LocalTimestampProto.AsObject,
|
|
56
|
-
validTo?: fintekkers_models_util_local_timestamp_pb.LocalTimestampProto.AsObject,
|
|
57
|
-
portfolioName: string,
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
@@ -1,468 +0,0 @@
|
|
|
1
|
-
// source: fintekkers/models/portfolio/portfolio.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() { return this || window || global || self || Function('return this')(); }).call(null);
|
|
17
|
-
|
|
18
|
-
var fintekkers_models_util_local_timestamp_pb = require('../../../fintekkers/models/util/local_timestamp_pb.js');
|
|
19
|
-
goog.object.extend(proto, fintekkers_models_util_local_timestamp_pb);
|
|
20
|
-
var fintekkers_models_util_uuid_pb = require('../../../fintekkers/models/util/uuid_pb.js');
|
|
21
|
-
goog.object.extend(proto, fintekkers_models_util_uuid_pb);
|
|
22
|
-
goog.exportSymbol('proto.fintekkers.models.portfolio.PortfolioProto', null, global);
|
|
23
|
-
/**
|
|
24
|
-
* Generated by JsPbCodeGenerator.
|
|
25
|
-
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
26
|
-
* server response, or constructed directly in Javascript. The array is used
|
|
27
|
-
* in place and becomes part of the constructed object. It is not cloned.
|
|
28
|
-
* If no data is provided, the constructed object will be empty, but still
|
|
29
|
-
* valid.
|
|
30
|
-
* @extends {jspb.Message}
|
|
31
|
-
* @constructor
|
|
32
|
-
*/
|
|
33
|
-
proto.fintekkers.models.portfolio.PortfolioProto = function(opt_data) {
|
|
34
|
-
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
35
|
-
};
|
|
36
|
-
goog.inherits(proto.fintekkers.models.portfolio.PortfolioProto, jspb.Message);
|
|
37
|
-
if (goog.DEBUG && !COMPILED) {
|
|
38
|
-
/**
|
|
39
|
-
* @public
|
|
40
|
-
* @override
|
|
41
|
-
*/
|
|
42
|
-
proto.fintekkers.models.portfolio.PortfolioProto.displayName = 'proto.fintekkers.models.portfolio.PortfolioProto';
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
48
|
-
/**
|
|
49
|
-
* Creates an object representation of this proto.
|
|
50
|
-
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
51
|
-
* Optional fields that are not set will be set to undefined.
|
|
52
|
-
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
53
|
-
* For the list of reserved names please see:
|
|
54
|
-
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
55
|
-
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
56
|
-
* JSPB instance for transitional soy proto support:
|
|
57
|
-
* http://goto/soy-param-migration
|
|
58
|
-
* @return {!Object}
|
|
59
|
-
*/
|
|
60
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.toObject = function(opt_includeInstance) {
|
|
61
|
-
return proto.fintekkers.models.portfolio.PortfolioProto.toObject(opt_includeInstance, this);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Static version of the {@see toObject} method.
|
|
67
|
-
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
68
|
-
* the JSPB instance for transitional soy proto support:
|
|
69
|
-
* http://goto/soy-param-migration
|
|
70
|
-
* @param {!proto.fintekkers.models.portfolio.PortfolioProto} msg The msg instance to transform.
|
|
71
|
-
* @return {!Object}
|
|
72
|
-
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
73
|
-
*/
|
|
74
|
-
proto.fintekkers.models.portfolio.PortfolioProto.toObject = function(includeInstance, msg) {
|
|
75
|
-
var f, obj = {
|
|
76
|
-
objectClass: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
77
|
-
version: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
78
|
-
uuid: (f = msg.getUuid()) && fintekkers_models_util_uuid_pb.UUIDProto.toObject(includeInstance, f),
|
|
79
|
-
asOf: (f = msg.getAsOf()) && fintekkers_models_util_local_timestamp_pb.LocalTimestampProto.toObject(includeInstance, f),
|
|
80
|
-
isLink: jspb.Message.getBooleanFieldWithDefault(msg, 7, false),
|
|
81
|
-
validFrom: (f = msg.getValidFrom()) && fintekkers_models_util_local_timestamp_pb.LocalTimestampProto.toObject(includeInstance, f),
|
|
82
|
-
validTo: (f = msg.getValidTo()) && fintekkers_models_util_local_timestamp_pb.LocalTimestampProto.toObject(includeInstance, f),
|
|
83
|
-
portfolioName: jspb.Message.getFieldWithDefault(msg, 10, "")
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
if (includeInstance) {
|
|
87
|
-
obj.$jspbMessageInstance = msg;
|
|
88
|
-
}
|
|
89
|
-
return obj;
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Deserializes binary data (in protobuf wire format).
|
|
96
|
-
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
97
|
-
* @return {!proto.fintekkers.models.portfolio.PortfolioProto}
|
|
98
|
-
*/
|
|
99
|
-
proto.fintekkers.models.portfolio.PortfolioProto.deserializeBinary = function(bytes) {
|
|
100
|
-
var reader = new jspb.BinaryReader(bytes);
|
|
101
|
-
var msg = new proto.fintekkers.models.portfolio.PortfolioProto;
|
|
102
|
-
return proto.fintekkers.models.portfolio.PortfolioProto.deserializeBinaryFromReader(msg, reader);
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Deserializes binary data (in protobuf wire format) from the
|
|
108
|
-
* given reader into the given message object.
|
|
109
|
-
* @param {!proto.fintekkers.models.portfolio.PortfolioProto} msg The message object to deserialize into.
|
|
110
|
-
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
111
|
-
* @return {!proto.fintekkers.models.portfolio.PortfolioProto}
|
|
112
|
-
*/
|
|
113
|
-
proto.fintekkers.models.portfolio.PortfolioProto.deserializeBinaryFromReader = function(msg, reader) {
|
|
114
|
-
while (reader.nextField()) {
|
|
115
|
-
if (reader.isEndGroup()) {
|
|
116
|
-
break;
|
|
117
|
-
}
|
|
118
|
-
var field = reader.getFieldNumber();
|
|
119
|
-
switch (field) {
|
|
120
|
-
case 1:
|
|
121
|
-
var value = /** @type {string} */ (reader.readString());
|
|
122
|
-
msg.setObjectClass(value);
|
|
123
|
-
break;
|
|
124
|
-
case 2:
|
|
125
|
-
var value = /** @type {string} */ (reader.readString());
|
|
126
|
-
msg.setVersion(value);
|
|
127
|
-
break;
|
|
128
|
-
case 5:
|
|
129
|
-
var value = new fintekkers_models_util_uuid_pb.UUIDProto;
|
|
130
|
-
reader.readMessage(value,fintekkers_models_util_uuid_pb.UUIDProto.deserializeBinaryFromReader);
|
|
131
|
-
msg.setUuid(value);
|
|
132
|
-
break;
|
|
133
|
-
case 6:
|
|
134
|
-
var value = new fintekkers_models_util_local_timestamp_pb.LocalTimestampProto;
|
|
135
|
-
reader.readMessage(value,fintekkers_models_util_local_timestamp_pb.LocalTimestampProto.deserializeBinaryFromReader);
|
|
136
|
-
msg.setAsOf(value);
|
|
137
|
-
break;
|
|
138
|
-
case 7:
|
|
139
|
-
var value = /** @type {boolean} */ (reader.readBool());
|
|
140
|
-
msg.setIsLink(value);
|
|
141
|
-
break;
|
|
142
|
-
case 8:
|
|
143
|
-
var value = new fintekkers_models_util_local_timestamp_pb.LocalTimestampProto;
|
|
144
|
-
reader.readMessage(value,fintekkers_models_util_local_timestamp_pb.LocalTimestampProto.deserializeBinaryFromReader);
|
|
145
|
-
msg.setValidFrom(value);
|
|
146
|
-
break;
|
|
147
|
-
case 9:
|
|
148
|
-
var value = new fintekkers_models_util_local_timestamp_pb.LocalTimestampProto;
|
|
149
|
-
reader.readMessage(value,fintekkers_models_util_local_timestamp_pb.LocalTimestampProto.deserializeBinaryFromReader);
|
|
150
|
-
msg.setValidTo(value);
|
|
151
|
-
break;
|
|
152
|
-
case 10:
|
|
153
|
-
var value = /** @type {string} */ (reader.readString());
|
|
154
|
-
msg.setPortfolioName(value);
|
|
155
|
-
break;
|
|
156
|
-
default:
|
|
157
|
-
reader.skipField();
|
|
158
|
-
break;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
return msg;
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Serializes the message to binary data (in protobuf wire format).
|
|
167
|
-
* @return {!Uint8Array}
|
|
168
|
-
*/
|
|
169
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.serializeBinary = function() {
|
|
170
|
-
var writer = new jspb.BinaryWriter();
|
|
171
|
-
proto.fintekkers.models.portfolio.PortfolioProto.serializeBinaryToWriter(this, writer);
|
|
172
|
-
return writer.getResultBuffer();
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* Serializes the given message to binary data (in protobuf wire
|
|
178
|
-
* format), writing to the given BinaryWriter.
|
|
179
|
-
* @param {!proto.fintekkers.models.portfolio.PortfolioProto} message
|
|
180
|
-
* @param {!jspb.BinaryWriter} writer
|
|
181
|
-
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
182
|
-
*/
|
|
183
|
-
proto.fintekkers.models.portfolio.PortfolioProto.serializeBinaryToWriter = function(message, writer) {
|
|
184
|
-
var f = undefined;
|
|
185
|
-
f = message.getObjectClass();
|
|
186
|
-
if (f.length > 0) {
|
|
187
|
-
writer.writeString(
|
|
188
|
-
1,
|
|
189
|
-
f
|
|
190
|
-
);
|
|
191
|
-
}
|
|
192
|
-
f = message.getVersion();
|
|
193
|
-
if (f.length > 0) {
|
|
194
|
-
writer.writeString(
|
|
195
|
-
2,
|
|
196
|
-
f
|
|
197
|
-
);
|
|
198
|
-
}
|
|
199
|
-
f = message.getUuid();
|
|
200
|
-
if (f != null) {
|
|
201
|
-
writer.writeMessage(
|
|
202
|
-
5,
|
|
203
|
-
f,
|
|
204
|
-
fintekkers_models_util_uuid_pb.UUIDProto.serializeBinaryToWriter
|
|
205
|
-
);
|
|
206
|
-
}
|
|
207
|
-
f = message.getAsOf();
|
|
208
|
-
if (f != null) {
|
|
209
|
-
writer.writeMessage(
|
|
210
|
-
6,
|
|
211
|
-
f,
|
|
212
|
-
fintekkers_models_util_local_timestamp_pb.LocalTimestampProto.serializeBinaryToWriter
|
|
213
|
-
);
|
|
214
|
-
}
|
|
215
|
-
f = message.getIsLink();
|
|
216
|
-
if (f) {
|
|
217
|
-
writer.writeBool(
|
|
218
|
-
7,
|
|
219
|
-
f
|
|
220
|
-
);
|
|
221
|
-
}
|
|
222
|
-
f = message.getValidFrom();
|
|
223
|
-
if (f != null) {
|
|
224
|
-
writer.writeMessage(
|
|
225
|
-
8,
|
|
226
|
-
f,
|
|
227
|
-
fintekkers_models_util_local_timestamp_pb.LocalTimestampProto.serializeBinaryToWriter
|
|
228
|
-
);
|
|
229
|
-
}
|
|
230
|
-
f = message.getValidTo();
|
|
231
|
-
if (f != null) {
|
|
232
|
-
writer.writeMessage(
|
|
233
|
-
9,
|
|
234
|
-
f,
|
|
235
|
-
fintekkers_models_util_local_timestamp_pb.LocalTimestampProto.serializeBinaryToWriter
|
|
236
|
-
);
|
|
237
|
-
}
|
|
238
|
-
f = message.getPortfolioName();
|
|
239
|
-
if (f.length > 0) {
|
|
240
|
-
writer.writeString(
|
|
241
|
-
10,
|
|
242
|
-
f
|
|
243
|
-
);
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* optional string object_class = 1;
|
|
250
|
-
* @return {string}
|
|
251
|
-
*/
|
|
252
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.getObjectClass = function() {
|
|
253
|
-
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* @param {string} value
|
|
259
|
-
* @return {!proto.fintekkers.models.portfolio.PortfolioProto} returns this
|
|
260
|
-
*/
|
|
261
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.setObjectClass = function(value) {
|
|
262
|
-
return jspb.Message.setProto3StringField(this, 1, value);
|
|
263
|
-
};
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* optional string version = 2;
|
|
268
|
-
* @return {string}
|
|
269
|
-
*/
|
|
270
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.getVersion = function() {
|
|
271
|
-
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* @param {string} value
|
|
277
|
-
* @return {!proto.fintekkers.models.portfolio.PortfolioProto} returns this
|
|
278
|
-
*/
|
|
279
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.setVersion = function(value) {
|
|
280
|
-
return jspb.Message.setProto3StringField(this, 2, value);
|
|
281
|
-
};
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* optional fintekkers.models.util.UUIDProto uuid = 5;
|
|
286
|
-
* @return {?proto.fintekkers.models.util.UUIDProto}
|
|
287
|
-
*/
|
|
288
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.getUuid = function() {
|
|
289
|
-
return /** @type{?proto.fintekkers.models.util.UUIDProto} */ (
|
|
290
|
-
jspb.Message.getWrapperField(this, fintekkers_models_util_uuid_pb.UUIDProto, 5));
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* @param {?proto.fintekkers.models.util.UUIDProto|undefined} value
|
|
296
|
-
* @return {!proto.fintekkers.models.portfolio.PortfolioProto} returns this
|
|
297
|
-
*/
|
|
298
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.setUuid = function(value) {
|
|
299
|
-
return jspb.Message.setWrapperField(this, 5, value);
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* Clears the message field making it undefined.
|
|
305
|
-
* @return {!proto.fintekkers.models.portfolio.PortfolioProto} returns this
|
|
306
|
-
*/
|
|
307
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.clearUuid = function() {
|
|
308
|
-
return this.setUuid(undefined);
|
|
309
|
-
};
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* Returns whether this field is set.
|
|
314
|
-
* @return {boolean}
|
|
315
|
-
*/
|
|
316
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.hasUuid = function() {
|
|
317
|
-
return jspb.Message.getField(this, 5) != null;
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* optional fintekkers.models.util.LocalTimestampProto as_of = 6;
|
|
323
|
-
* @return {?proto.fintekkers.models.util.LocalTimestampProto}
|
|
324
|
-
*/
|
|
325
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.getAsOf = function() {
|
|
326
|
-
return /** @type{?proto.fintekkers.models.util.LocalTimestampProto} */ (
|
|
327
|
-
jspb.Message.getWrapperField(this, fintekkers_models_util_local_timestamp_pb.LocalTimestampProto, 6));
|
|
328
|
-
};
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
/**
|
|
332
|
-
* @param {?proto.fintekkers.models.util.LocalTimestampProto|undefined} value
|
|
333
|
-
* @return {!proto.fintekkers.models.portfolio.PortfolioProto} returns this
|
|
334
|
-
*/
|
|
335
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.setAsOf = function(value) {
|
|
336
|
-
return jspb.Message.setWrapperField(this, 6, value);
|
|
337
|
-
};
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* Clears the message field making it undefined.
|
|
342
|
-
* @return {!proto.fintekkers.models.portfolio.PortfolioProto} returns this
|
|
343
|
-
*/
|
|
344
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.clearAsOf = function() {
|
|
345
|
-
return this.setAsOf(undefined);
|
|
346
|
-
};
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* Returns whether this field is set.
|
|
351
|
-
* @return {boolean}
|
|
352
|
-
*/
|
|
353
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.hasAsOf = function() {
|
|
354
|
-
return jspb.Message.getField(this, 6) != null;
|
|
355
|
-
};
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* optional bool is_link = 7;
|
|
360
|
-
* @return {boolean}
|
|
361
|
-
*/
|
|
362
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.getIsLink = function() {
|
|
363
|
-
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false));
|
|
364
|
-
};
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
/**
|
|
368
|
-
* @param {boolean} value
|
|
369
|
-
* @return {!proto.fintekkers.models.portfolio.PortfolioProto} returns this
|
|
370
|
-
*/
|
|
371
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.setIsLink = function(value) {
|
|
372
|
-
return jspb.Message.setProto3BooleanField(this, 7, value);
|
|
373
|
-
};
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* optional fintekkers.models.util.LocalTimestampProto valid_from = 8;
|
|
378
|
-
* @return {?proto.fintekkers.models.util.LocalTimestampProto}
|
|
379
|
-
*/
|
|
380
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.getValidFrom = function() {
|
|
381
|
-
return /** @type{?proto.fintekkers.models.util.LocalTimestampProto} */ (
|
|
382
|
-
jspb.Message.getWrapperField(this, fintekkers_models_util_local_timestamp_pb.LocalTimestampProto, 8));
|
|
383
|
-
};
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* @param {?proto.fintekkers.models.util.LocalTimestampProto|undefined} value
|
|
388
|
-
* @return {!proto.fintekkers.models.portfolio.PortfolioProto} returns this
|
|
389
|
-
*/
|
|
390
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.setValidFrom = function(value) {
|
|
391
|
-
return jspb.Message.setWrapperField(this, 8, value);
|
|
392
|
-
};
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* Clears the message field making it undefined.
|
|
397
|
-
* @return {!proto.fintekkers.models.portfolio.PortfolioProto} returns this
|
|
398
|
-
*/
|
|
399
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.clearValidFrom = function() {
|
|
400
|
-
return this.setValidFrom(undefined);
|
|
401
|
-
};
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
/**
|
|
405
|
-
* Returns whether this field is set.
|
|
406
|
-
* @return {boolean}
|
|
407
|
-
*/
|
|
408
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.hasValidFrom = function() {
|
|
409
|
-
return jspb.Message.getField(this, 8) != null;
|
|
410
|
-
};
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
/**
|
|
414
|
-
* optional fintekkers.models.util.LocalTimestampProto valid_to = 9;
|
|
415
|
-
* @return {?proto.fintekkers.models.util.LocalTimestampProto}
|
|
416
|
-
*/
|
|
417
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.getValidTo = function() {
|
|
418
|
-
return /** @type{?proto.fintekkers.models.util.LocalTimestampProto} */ (
|
|
419
|
-
jspb.Message.getWrapperField(this, fintekkers_models_util_local_timestamp_pb.LocalTimestampProto, 9));
|
|
420
|
-
};
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
/**
|
|
424
|
-
* @param {?proto.fintekkers.models.util.LocalTimestampProto|undefined} value
|
|
425
|
-
* @return {!proto.fintekkers.models.portfolio.PortfolioProto} returns this
|
|
426
|
-
*/
|
|
427
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.setValidTo = function(value) {
|
|
428
|
-
return jspb.Message.setWrapperField(this, 9, value);
|
|
429
|
-
};
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
/**
|
|
433
|
-
* Clears the message field making it undefined.
|
|
434
|
-
* @return {!proto.fintekkers.models.portfolio.PortfolioProto} returns this
|
|
435
|
-
*/
|
|
436
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.clearValidTo = function() {
|
|
437
|
-
return this.setValidTo(undefined);
|
|
438
|
-
};
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
* Returns whether this field is set.
|
|
443
|
-
* @return {boolean}
|
|
444
|
-
*/
|
|
445
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.hasValidTo = function() {
|
|
446
|
-
return jspb.Message.getField(this, 9) != null;
|
|
447
|
-
};
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
/**
|
|
451
|
-
* optional string portfolio_name = 10;
|
|
452
|
-
* @return {string}
|
|
453
|
-
*/
|
|
454
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.getPortfolioName = function() {
|
|
455
|
-
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
|
|
456
|
-
};
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
/**
|
|
460
|
-
* @param {string} value
|
|
461
|
-
* @return {!proto.fintekkers.models.portfolio.PortfolioProto} returns this
|
|
462
|
-
*/
|
|
463
|
-
proto.fintekkers.models.portfolio.PortfolioProto.prototype.setPortfolioName = function(value) {
|
|
464
|
-
return jspb.Message.setProto3StringField(this, 10, value);
|
|
465
|
-
};
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
goog.object.extend(exports, proto.fintekkers.models.portfolio);
|