@fintekkers/ledger-models 0.4.0 → 0.4.1

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 (47) hide show
  1. package/node/wrappers/models/security/BondSecurity.d.ts +41 -3
  2. package/node/wrappers/models/security/BondSecurity.fromPricerInputs.test.d.ts +1 -0
  3. package/node/wrappers/models/security/BondSecurity.fromPricerInputs.test.js +75 -0
  4. package/node/wrappers/models/security/BondSecurity.fromPricerInputs.test.js.map +1 -0
  5. package/node/wrappers/models/security/BondSecurity.fromPricerInputs.test.ts +95 -0
  6. package/node/wrappers/models/security/BondSecurity.js +50 -2
  7. package/node/wrappers/models/security/BondSecurity.js.map +1 -1
  8. package/node/wrappers/models/security/BondSecurity.ts +65 -3
  9. package/node/wrappers/models/security/FloatingRateNote.d.ts +30 -0
  10. package/node/wrappers/models/security/FloatingRateNote.js +80 -0
  11. package/node/wrappers/models/security/FloatingRateNote.js.map +1 -0
  12. package/node/wrappers/models/security/FloatingRateNote.ts +67 -0
  13. package/node/wrappers/models/security/IndexSecurity.d.ts +16 -0
  14. package/node/wrappers/models/security/IndexSecurity.js +26 -0
  15. package/node/wrappers/models/security/IndexSecurity.js.map +1 -0
  16. package/node/wrappers/models/security/IndexSecurity.test.d.ts +1 -0
  17. package/node/wrappers/models/security/IndexSecurity.test.js +60 -0
  18. package/node/wrappers/models/security/IndexSecurity.test.js.map +1 -0
  19. package/node/wrappers/models/security/IndexSecurity.test.ts +60 -0
  20. package/node/wrappers/models/security/IndexSecurity.ts +24 -0
  21. package/node/wrappers/models/security/Issuance.d.ts +35 -0
  22. package/node/wrappers/models/security/Issuance.js +64 -0
  23. package/node/wrappers/models/security/Issuance.js.map +1 -0
  24. package/node/wrappers/models/security/Issuance.test.d.ts +1 -0
  25. package/node/wrappers/models/security/Issuance.test.js +55 -0
  26. package/node/wrappers/models/security/Issuance.test.js.map +1 -0
  27. package/node/wrappers/models/security/Issuance.test.ts +52 -0
  28. package/node/wrappers/models/security/Issuance.ts +74 -0
  29. package/node/wrappers/models/security/TIPSBond.d.ts +30 -0
  30. package/node/wrappers/models/security/TIPSBond.js +83 -0
  31. package/node/wrappers/models/security/TIPSBond.js.map +1 -0
  32. package/node/wrappers/models/security/TIPSBond.ts +70 -0
  33. package/node/wrappers/models/security/security.d.ts +19 -3
  34. package/node/wrappers/models/security/security.identifiers.test.d.ts +1 -0
  35. package/node/wrappers/models/security/security.identifiers.test.js +67 -0
  36. package/node/wrappers/models/security/security.identifiers.test.js.map +1 -0
  37. package/node/wrappers/models/security/security.identifiers.test.ts +67 -0
  38. package/node/wrappers/models/security/security.js +67 -22
  39. package/node/wrappers/models/security/security.js.map +1 -1
  40. package/node/wrappers/models/security/security.ts +70 -22
  41. package/node/wrappers/models/transaction/transaction.js +4 -2
  42. package/node/wrappers/models/transaction/transaction.js.map +1 -1
  43. package/node/wrappers/models/transaction/transaction.ts +4 -2
  44. package/node/wrappers/services/security-service/security.maturityLadder.test.js +3 -2
  45. package/node/wrappers/services/security-service/security.maturityLadder.test.js.map +1 -1
  46. package/node/wrappers/services/security-service/security.maturityLadder.test.ts +3 -2
  47. package/package.json +1 -1
@@ -122,8 +122,10 @@ class Transaction {
122
122
  return this.getSecurity().getProductClass();
123
123
  case FieldProto.PRODUCT_TYPE:
124
124
  return this.getSecurity().getProductType();
125
- case FieldProto.IDENTIFIER:
126
- return this.getSecurity().getSecurityID();
125
+ case FieldProto.IDENTIFIER: {
126
+ const ids = this.getSecurity().getIdentifiers();
127
+ return ids.length > 0 ? ids[0] : null;
128
+ }
127
129
  case FieldProto.TENOR:
128
130
  case FieldProto.ADJUSTED_TENOR:
129
131
  throw new Error('Not implemented yet');
@@ -33,14 +33,15 @@ test('test the api.fintekkers.org security service by creating a maturity ladder
33
33
  let issuance = issuanceList && issuanceList.length > 0 ? issuanceList[0] : null;
34
34
  if (issuance) {
35
35
  if (!issuance.getPostAuctionOutstandingQuantity() && security.getMaturityDate().toDate().getFullYear() > 2009) {
36
- // console.log("Issed with %s, issuance: %s", security.getSecurityID().getIdentifierValue(), issuance);
36
+ // (debug only) primary identifier available via security.getIdentifiers()[0]
37
37
  }
38
38
  else if (!issuance.getPostAuctionOutstandingQuantity() && security.getMaturityDate().toDate().getFullYear() <= 2009) {
39
39
  //Swallow this data gap. It's old and we don't mind
40
40
  }
41
41
  else {
42
42
  let postAuctionQuantity = serialization_1.ProtoSerializationUtil.deserialize(issuance.getPostAuctionOutstandingQuantity());
43
- let id = security.getSecurityID() ? security.getSecurityID().getIdentifierValue() : security.getID().toString();
43
+ const identifiers = security.getIdentifiers();
44
+ let id = identifiers.length > 0 ? identifiers[0].getIdentifierValue() : security.getID().toString();
44
45
  let result = {
45
46
  'cusip': id,
46
47
  'issueDate': security.getIssueDate(),
@@ -1 +1 @@
1
- {"version":3,"file":"security.maturityLadder.test.js","sourceRoot":"","sources":["security.maturityLadder.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,iCAAkC;AAElC,SAAS;AAET,cAAc;AACd,2EAA0E;AAC1E,uDAAoD;AACpD,yEAAsE;AAEtE,oEAA0E;AAE1E,IAAI,CAAC,kGAAkG,EAAE,GAAS,EAAE;IAChH,6FAA6F;IAC7F,MAAM,eAAe,GAAG,IAAI,iCAAe,EAAE,CAAC;IAE9C,MAAM,cAAc,GAAG,IAAI,+BAAc,EAAE,CAAC;IAC5C,cAAc,CAAC,eAAe,CAAC,qBAAU,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;IACvE,cAAc,CAAC,eAAe,CAAC,qBAAU,CAAC,oBAAoB,EAAE,eAAe,CAAC,CAAC;IAEjF,IAAI,UAAU,GAAG,MAAM,eAAe,CAAC,qBAAqB,CAAC,cAAc,CAAC,CAAC;IAE7E,MAAM,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC9B,IAAI,OAAO,GAAG,EAAE,CAAC;IAEjB,+CAA+C;IAC/C,KAAK,IAAI,KAAK,IAAI,UAAU,EAAE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CAAC,CAAC,IAAI,CAAC;QAEhF,IAAI,QAAQ,EAAE;YACV,IAAI,CAAC,QAAQ,CAAC,iCAAiC,EAAE,IAAI,QAAQ,CAAC,eAAe,EAAE,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,GAAG,IAAI,EAAE;gBAC3G,6EAA6E;aAChF;iBAAM,IAAI,CAAC,QAAQ,CAAC,iCAAiC,EAAE,IAAI,QAAQ,CAAC,eAAe,EAAE,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,IAAI,IAAI,EAAE;gBACnH,mDAAmD;aACtD;iBAAM;gBACH,IAAI,mBAAmB,GAAW,sCAAsB,CAAC,WAAW,CAAC,QAAQ,CAAC,iCAAiC,EAAE,CAAW,CAAC;gBAC7H,MAAM,WAAW,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;gBAC9C,IAAI,EAAE,GAAW,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC;gBAE5G,IAAI,MAAM,GAAG;oBACT,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,QAAQ,CAAC,YAAY,EAAE;oBACpC,mBAAmB,EAAE,mBAAmB;oBACxC,cAAc,EAAE,QAAQ,CAAC,eAAe,EAAE;iBAC7C,CAAC;gBACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACxB;SACJ;KACJ;IAED,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;AAC/D,CAAC,CAAA,EAAE,KAAK,CAAC,CAAC"}
@@ -32,12 +32,13 @@ test('test the api.fintekkers.org security service by creating a maturity ladder
32
32
 
33
33
  if (issuance) {
34
34
  if (!issuance.getPostAuctionOutstandingQuantity() && security.getMaturityDate().toDate().getFullYear() > 2009) {
35
- // console.log("Issed with %s, issuance: %s", security.getSecurityID().getIdentifierValue(), issuance);
35
+ // (debug only) primary identifier available via security.getIdentifiers()[0]
36
36
  } else if (!issuance.getPostAuctionOutstandingQuantity() && security.getMaturityDate().toDate().getFullYear() <= 2009) {
37
37
  //Swallow this data gap. It's old and we don't mind
38
38
  } else {
39
39
  let postAuctionQuantity: number = ProtoSerializationUtil.deserialize(issuance.getPostAuctionOutstandingQuantity()) as number;
40
- let id: string = security.getSecurityID() ? security.getSecurityID().getIdentifierValue() : security.getID().toString();
40
+ const identifiers = security.getIdentifiers();
41
+ let id: string = identifiers.length > 0 ? identifiers[0].getIdentifierValue() : security.getID().toString();
41
42
 
42
43
  let result = {
43
44
  'cusip': id,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fintekkers/ledger-models",
3
3
  "todo": "Replace the version with build script version number",
4
- "version": "0.4.0",
4
+ "version": "0.4.1",
5
5
  "description": "ledger model protos ",
6
6
  "authors": [
7
7
  "David Doherty",