@quantcdn/quant-client 2.0.5 → 2.0.6
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/src/client.js +3 -2
- package/dist/src/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/src/client.js
CHANGED
|
@@ -91,6 +91,7 @@ class HttpClient {
|
|
|
91
91
|
}
|
|
92
92
|
class QuantClient {
|
|
93
93
|
constructor(config, Client) {
|
|
94
|
+
var _a, _b;
|
|
94
95
|
this.project = {
|
|
95
96
|
/**
|
|
96
97
|
* Ping and ensure the API credentials are valid.
|
|
@@ -328,14 +329,14 @@ class QuantClient {
|
|
|
328
329
|
if (typeof Client === 'undefined') {
|
|
329
330
|
Client = HttpClient;
|
|
330
331
|
}
|
|
331
|
-
this._project = new Client('https://api.quantcdn.io/v1', {
|
|
332
|
+
this._project = new Client((_a = config.endpoint) !== null && _a !== void 0 ? _a : 'https://api.quantcdn.io/v1', {
|
|
332
333
|
'User-Agent': 'Quant (+http://api.quantcdn.io)',
|
|
333
334
|
'Quant-Token': config.token,
|
|
334
335
|
'Quant-Customer': config.organization,
|
|
335
336
|
'Quant-Project': config.project,
|
|
336
337
|
'Content-Type': 'application/json'
|
|
337
338
|
});
|
|
338
|
-
this._search = new Client('https://api.quantcdn.io/v1', {
|
|
339
|
+
this._search = new Client((_b = config.endpoint) !== null && _b !== void 0 ? _b : 'https://api.quantcdn.io/v1', {
|
|
339
340
|
'User-Agent': 'Quant (+http://api.quantcdn.io)',
|
|
340
341
|
'Quant-Token': config.token,
|
|
341
342
|
'Quant-Customer': config.organization,
|
package/dist/src/types.d.ts
CHANGED