@barchart/portfolio-api-common 1.13.0 → 1.14.0

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![AWS CodeBuild](https://codebuild.us-east-1.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiSXBJTDZKWVFmSGVOSG9XQUgwbzB3Um5BZ0JsN2h1U3NQNWNhZTRHMlJKTVpEVVlVMENPaEFmR0NYS29rSStZWmZ5M1d0YVh2eXErVGhiekFtdHBpVmhJPSIsIml2UGFyYW1ldGVyU3BlYyI6ImROM3ZLMURwaXFyekltdDYiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=master)](https://github.com/barchart/portfolio-api-common)
4
4
 
5
- A *public* library of shared JavaScript code used by Barchart's paper-trading portfolio system.
5
+ A *public* library of shared JavaScript code used by Barchart's paper-trading portfolio system.
6
6
 
7
7
  ### Overview
8
8
 
@@ -25,9 +25,8 @@ For reporting and display purposes, positions can be grouped together (by asset
25
25
 
26
26
  ### Package Managers
27
27
 
28
- This library has been published as a *private* module to NPM as [@barchart/portfolio-api-common](https://www.npmjs.com/package/@barchart/portfolio-api-common).
28
+ This library has been published as a *public* module to NPM as [@barchart/portfolio-api-common](https://www.npmjs.com/package/@barchart/portfolio-api-common).
29
29
 
30
30
  ```shell
31
- npm login
32
31
  npm install @barchart/portfolio-api-common -S
33
32
  ```
@@ -27,6 +27,8 @@ module.exports = (() => {
27
27
 
28
28
  const REQUIRED_CURRENCIES = [
29
29
  Currency.CAD,
30
+ Currency.EUR,
31
+ Currency.JPY,
30
32
  Currency.USD
31
33
  ];
32
34
 
@@ -361,22 +361,5 @@ module.exports = (() => {
361
361
  .schema
362
362
  );
363
363
 
364
- const map = { };
365
-
366
- function addSchemaToMap(type, schema) {
367
- map[type.code] = schema;
368
- }
369
-
370
- addSchemaToMap(TransactionType.BUY, buy);
371
- addSchemaToMap(TransactionType.SELL, sell);
372
- addSchemaToMap(TransactionType.BUY_SHORT, buyShort);
373
- addSchemaToMap(TransactionType.SELL_SHORT, sellShort);
374
- addSchemaToMap(TransactionType.FEE, fee);
375
- addSchemaToMap(TransactionType.DEPOSIT, deposit);
376
- addSchemaToMap(TransactionType.WITHDRAWAL, withdrawal);
377
- addSchemaToMap(TransactionType.VALUATION, valuation);
378
- addSchemaToMap(TransactionType.DELIST, delist);
379
- addSchemaToMap(TransactionType.INCOME, income);
380
-
381
364
  return TransactionSchema;
382
365
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.13.0",
3
+ "version": "1.14.0",
4
4
  "description": "Common JavaScript code used by Barchart's Portfolio Service",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",
@@ -15,7 +15,7 @@
15
15
  "url": "git+ssh://git@github.com/barchart/portfolio-api-common.git"
16
16
  },
17
17
  "dependencies": {
18
- "@barchart/common-js": "^4.9.1",
18
+ "@barchart/common-js": "^4.22.0",
19
19
  "uuid": "^8.3.2"
20
20
  },
21
21
  "devDependencies": {