diff --git a/package.json b/package.json index 9ea0f5b..f0c35d9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@quantcdn/quant-client", - "version": "2.0.5", + "version": "2.0.6", "description": "Client library for API connectivity", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", diff --git a/src/client.ts b/src/client.ts index 072fb67..f3d536b 100644 --- a/src/client.ts +++ b/src/client.ts @@ -89,14 +89,14 @@ export class QuantClient { Client = HttpClient } - this._project = new Client('https://api.quantcdn.io/v1', { + this._project = new Client(config.endpoint ?? 'https://api.quantcdn.io/v1', { 'User-Agent': 'Quant (+http://api.quantcdn.io)', 'Quant-Token': config.token, 'Quant-Customer': config.organization, 'Quant-Project': config.project, 'Content-Type': 'application/json' }) - this._search = new Client('https://api.quantcdn.io/v1', { + this._search = new Client(config.endpoint ?? 'https://api.quantcdn.io/v1', { 'User-Agent': 'Quant (+http://api.quantcdn.io)', 'Quant-Token': config.token, 'Quant-Customer': config.organization, diff --git a/src/types.ts b/src/types.ts index f851aa0..b17034a 100644 --- a/src/types.ts +++ b/src/types.ts @@ -5,6 +5,7 @@ export interface Config { token?: string project?: string bearer?: string + endpoint?: string } export interface ProxyPayload {