wealthica-sdk-js 0.0.11 → 0.0.13
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 +3 -3
- package/dist/wealthica.d.ts +2 -2
- package/dist/wealthica.es5.d.ts +2 -2
- package/dist/wealthica.es5.js +7 -19
- package/dist/wealthica.js +7 -19
- package/dist/wealthica.min.d.ts +2 -2
- package/dist/wealthica.min.js +1 -1
- package/dist/wealthica.min.js.map +1 -1
- package/lib/wealthica.d.ts +2 -2
- package/lib/wealthica.js +7 -19
- package/package.json +1 -1
package/lib/wealthica.d.ts
CHANGED
|
@@ -173,10 +173,10 @@ type Transactions = {
|
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
type HistoryListOptions = {
|
|
176
|
-
|
|
176
|
+
institutions: string[];
|
|
177
177
|
from?: string;
|
|
178
178
|
to?: string;
|
|
179
|
-
investments?: string;
|
|
179
|
+
investments?: string[];
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
type BalanceHistory = {
|
package/lib/wealthica.js
CHANGED
|
@@ -2944,9 +2944,6 @@ module.exports = new Wealthica();
|
|
|
2944
2944
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2945
2945
|
|
|
2946
2946
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2947
|
-
var _excluded = ["institutionId"];
|
|
2948
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
2949
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
2950
2947
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
2951
2948
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
2952
2949
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -2966,8 +2963,6 @@ var History = /*#__PURE__*/function () {
|
|
|
2966
2963
|
value: function () {
|
|
2967
2964
|
var _getList = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
2968
2965
|
var options,
|
|
2969
|
-
institutionId,
|
|
2970
|
-
params,
|
|
2971
2966
|
url,
|
|
2972
2967
|
query,
|
|
2973
2968
|
response,
|
|
@@ -2977,28 +2972,21 @@ var History = /*#__PURE__*/function () {
|
|
|
2977
2972
|
switch (_context.prev = _context.next) {
|
|
2978
2973
|
case 0:
|
|
2979
2974
|
options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
_context.next = 4;
|
|
2983
|
-
break;
|
|
2984
|
-
}
|
|
2985
|
-
throw new Error('Please provide a valid Wealthica institution id.');
|
|
2986
|
-
case 4:
|
|
2987
|
-
url = "/institutions/".concat(institutionId, "/history");
|
|
2988
|
-
query = getQueryString(params);
|
|
2975
|
+
url = '/history';
|
|
2976
|
+
query = getQueryString(options);
|
|
2989
2977
|
if (query) url = "".concat(url, "?").concat(query);
|
|
2990
|
-
_context.next =
|
|
2978
|
+
_context.next = 6;
|
|
2991
2979
|
return this.api.get(url);
|
|
2992
|
-
case
|
|
2980
|
+
case 6:
|
|
2993
2981
|
response = _context.sent;
|
|
2994
2982
|
if (response.ok) {
|
|
2995
|
-
_context.next =
|
|
2983
|
+
_context.next = 9;
|
|
2996
2984
|
break;
|
|
2997
2985
|
}
|
|
2998
2986
|
throw response.originalError;
|
|
2999
|
-
case
|
|
2987
|
+
case 9:
|
|
3000
2988
|
return _context.abrupt("return", response.data);
|
|
3001
|
-
case
|
|
2989
|
+
case 10:
|
|
3002
2990
|
case "end":
|
|
3003
2991
|
return _context.stop();
|
|
3004
2992
|
}
|
package/package.json
CHANGED