@quantcdn/quant-client 2.0.4 → 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.
@@ -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.
@@ -99,8 +100,6 @@ class QuantClient {
99
100
  * The response object.
100
101
  */
101
102
  ping: () => __awaiter(this, void 0, void 0, function* () {
102
- console.log('ping');
103
- console.log(this._project);
104
103
  return yield this._project.get('ping');
105
104
  }),
106
105
  /**
@@ -330,14 +329,14 @@ class QuantClient {
330
329
  if (typeof Client === 'undefined') {
331
330
  Client = HttpClient;
332
331
  }
333
- 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', {
334
333
  'User-Agent': 'Quant (+http://api.quantcdn.io)',
335
334
  'Quant-Token': config.token,
336
335
  'Quant-Customer': config.organization,
337
336
  'Quant-Project': config.project,
338
337
  'Content-Type': 'application/json'
339
338
  });
340
- 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', {
341
340
  'User-Agent': 'Quant (+http://api.quantcdn.io)',
342
341
  'Quant-Token': config.token,
343
342
  'Quant-Customer': config.organization,
@@ -4,6 +4,7 @@ export interface Config {
4
4
  token?: string;
5
5
  project?: string;
6
6
  bearer?: string;
7
+ endpoint?: string;
7
8
  }
8
9
  export interface ProxyPayload {
9
10
  url: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quantcdn/quant-client",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "Client library for API connectivity",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",