@orbis-systems/orbis-api-clients 0.5.1 → 0.5.3
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/dist/aesmidas/index.d.ts +71 -10
- package/dist/aesmidas/index.d.ts.map +1 -1
- package/dist/aesmidas/index.esm.js +44 -10
- package/dist/aesmidas/index.esm.js.map +1 -1
- package/dist/aesmidas/index.js +44 -10
- package/dist/aesmidas/index.js.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +7 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/insight/index.d.ts +5 -4
- package/dist/insight/index.d.ts.map +1 -1
- package/dist/insight/index.esm.js +7 -5
- package/dist/insight/index.esm.js.map +1 -1
- package/dist/insight/index.js +7 -5
- package/dist/insight/index.js.map +1 -1
- package/dist/middleware/index.d.ts +6 -4
- package/dist/middleware/index.d.ts.map +1 -1
- package/dist/middleware/index.esm.js +7 -5
- package/dist/middleware/index.esm.js.map +1 -1
- package/dist/middleware/index.js +7 -5
- package/dist/middleware/index.js.map +1 -1
- package/dist/orbis/index.d.ts +71 -4
- package/dist/orbis/index.d.ts.map +1 -1
- package/dist/orbis/index.esm.js +56 -7
- package/dist/orbis/index.esm.js.map +1 -1
- package/dist/orbis/index.js +56 -7
- package/dist/orbis/index.js.map +1 -1
- package/dist/uma/index.d.ts +78 -22
- package/dist/uma/index.d.ts.map +1 -1
- package/dist/uma/index.esm.js +31 -54
- package/dist/uma/index.esm.js.map +1 -1
- package/dist/uma/index.js +30 -53
- package/dist/uma/index.js.map +1 -1
- package/package.json +1 -1
package/dist/aesmidas/index.js
CHANGED
|
@@ -234,8 +234,8 @@ class $538ed1203bac2e79$export$f280b732bbc5934b extends (0, $3621850f1f570615$ex
|
|
|
234
234
|
}
|
|
235
235
|
if (this.config.autoRenewToken !== false && this.isTokenExpired(accessToken)) try {
|
|
236
236
|
await this.lock.runExclusive(async ()=>{
|
|
237
|
-
(0, $5Loj3$consola.consola).
|
|
238
|
-
await this.renewToken();
|
|
237
|
+
if (this.config.debug) (0, $5Loj3$consola.consola).debug("Token expired. Renewing\u2026");
|
|
238
|
+
accessToken = (await this.renewToken()).accessToken;
|
|
239
239
|
this.lock.cancel();
|
|
240
240
|
});
|
|
241
241
|
} catch (error) {
|
|
@@ -251,12 +251,14 @@ class $538ed1203bac2e79$export$f280b732bbc5934b extends (0, $3621850f1f570615$ex
|
|
|
251
251
|
isTokenExpired(token) {
|
|
252
252
|
const payload = (0, $5Loj3$jwtdecode.jwtDecode)(token);
|
|
253
253
|
if (!payload.exp) return true;
|
|
254
|
-
return (0, $5Loj3$datefns.isBefore)((0, $5Loj3$datefns.subMinutes)(payload.exp * 1000,
|
|
254
|
+
return (0, $5Loj3$datefns.isBefore)((0, $5Loj3$datefns.subMinutes)(payload.exp * 1000, 1), Date.now());
|
|
255
255
|
}
|
|
256
256
|
async renewToken() {
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
const callback = this.config.onRenewToken ?? this.renewTokenCallback;
|
|
258
|
+
if (!callback) throw new Error('No renew token callback provided');
|
|
259
|
+
const authData = await callback();
|
|
259
260
|
this.setAuthData(authData);
|
|
261
|
+
return authData;
|
|
260
262
|
}
|
|
261
263
|
}
|
|
262
264
|
|
|
@@ -1523,6 +1525,22 @@ class $da89e2663382a79a$export$82b8d343c504672 {
|
|
|
1523
1525
|
responseType: 'json'
|
|
1524
1526
|
});
|
|
1525
1527
|
}
|
|
1528
|
+
/**
|
|
1529
|
+
* @tags Quote
|
|
1530
|
+
* @name GetOptionDayChart
|
|
1531
|
+
* @summary Query Option Day Chart - All users - available in Microservice
|
|
1532
|
+
* @request GET:/api/quote/option-day-chart
|
|
1533
|
+
* @secure
|
|
1534
|
+
*/ getOptionDayChart(query, config) {
|
|
1535
|
+
return this.apiClient.request({
|
|
1536
|
+
...config,
|
|
1537
|
+
url: `/quote/option-day-chart`,
|
|
1538
|
+
method: 'GET',
|
|
1539
|
+
params: query,
|
|
1540
|
+
secure: true,
|
|
1541
|
+
responseType: 'json'
|
|
1542
|
+
});
|
|
1543
|
+
}
|
|
1526
1544
|
/**
|
|
1527
1545
|
* @tags Quote
|
|
1528
1546
|
* @name GetEquiductLevel1
|
|
@@ -1735,14 +1753,14 @@ class $cbc117ce07829f62$export$304305f55794ea0e {
|
|
|
1735
1753
|
}
|
|
1736
1754
|
/**
|
|
1737
1755
|
* @tags QuotesReformat
|
|
1738
|
-
* @name
|
|
1739
|
-
* @summary Query
|
|
1740
|
-
* @request GET:/api/quotes/
|
|
1756
|
+
* @name GetOptionHistorical
|
|
1757
|
+
* @summary Query option Day Chart. No weekly data point support yet. No rsiSpan support. - All users - available in Microservice
|
|
1758
|
+
* @request GET:/api/quotes/option/historical
|
|
1741
1759
|
* @secure
|
|
1742
|
-
*/
|
|
1760
|
+
*/ getOptionHistorical(query, config) {
|
|
1743
1761
|
return this.apiClient.request({
|
|
1744
1762
|
...config,
|
|
1745
|
-
url: `/quotes/
|
|
1763
|
+
url: `/quotes/option/historical`,
|
|
1746
1764
|
method: 'GET',
|
|
1747
1765
|
params: query,
|
|
1748
1766
|
secure: true,
|
|
@@ -1812,6 +1830,22 @@ class $cbc117ce07829f62$export$304305f55794ea0e {
|
|
|
1812
1830
|
responseType: 'json'
|
|
1813
1831
|
});
|
|
1814
1832
|
}
|
|
1833
|
+
/**
|
|
1834
|
+
* @tags QuotesReformat
|
|
1835
|
+
* @name GetEquityHistorical
|
|
1836
|
+
* @summary Query Historical Day Chart. No weekly data point support yet. No rsiSpan support. - All users - available in Microservice
|
|
1837
|
+
* @request GET:/api/quotes/equity/historical
|
|
1838
|
+
* @secure
|
|
1839
|
+
*/ getEquityHistorical(query, config) {
|
|
1840
|
+
return this.apiClient.request({
|
|
1841
|
+
...config,
|
|
1842
|
+
url: `/quotes/equity/historical`,
|
|
1843
|
+
method: 'GET',
|
|
1844
|
+
params: query,
|
|
1845
|
+
secure: true,
|
|
1846
|
+
responseType: 'json'
|
|
1847
|
+
});
|
|
1848
|
+
}
|
|
1815
1849
|
/**
|
|
1816
1850
|
* @tags QuotesReformat
|
|
1817
1851
|
* @name GetBonds
|