waii-sdk-js
Advanced tools
Comparing version 1.19.1 to 1.19.2
@@ -8,4 +8,3 @@ declare class WaiiHttpClient { | ||
userId: string; | ||
fetch_func: any; | ||
constructor(url?: string, apiKey?: string, fetch_func?: typeof fetch); | ||
constructor(url?: string, apiKey?: string); | ||
setScope(scope: string): void; | ||
@@ -12,0 +11,0 @@ getScope(): string; |
@@ -13,3 +13,3 @@ "use strict"; | ||
class WaiiHttpClient { | ||
constructor(url = 'http://localhost:9859/api/', apiKey = '', fetch_func = fetch) { | ||
constructor(url = 'http://localhost:9859/api/', apiKey = '') { | ||
this.timeout = 150000000; | ||
@@ -21,3 +21,2 @@ this.scope = ''; | ||
this.apiKey = apiKey; | ||
this.fetch_func = fetch_func; | ||
} | ||
@@ -57,3 +56,3 @@ ; | ||
let fetchOrTimeout = Promise.race([ | ||
this.fetch_func(this.url + endpoint, request), | ||
fetch(this.url + endpoint, request), | ||
new Promise((res, rej) => { | ||
@@ -60,0 +59,0 @@ timer = setTimeout(() => rej(new Error(`Call timed out after ${this.timeout} ms`)), this.timeout); |
@@ -23,3 +23,3 @@ import History from "../clients/history/src/History"; | ||
constructor(url?: string, apiKey?: string); | ||
initialize(url?: string, apiKey?: string, fetch_func?: any): void; | ||
initialize(url?: string, apiKey?: string, /* no longer used */ fetch_func?: any): void; | ||
} | ||
@@ -26,0 +26,0 @@ declare const WAII: Waii; |
@@ -21,4 +21,4 @@ "use strict"; | ||
} | ||
initialize(url = 'http://localhost:9859/api/', apiKey = '', fetch_func = fetch) { | ||
this.HttpClient = new WaiiHttpClient_1.default(url, apiKey, fetch_func); | ||
initialize(url = 'http://localhost:9859/api/', apiKey = '', /* no longer used */ fetch_func = null) { | ||
this.HttpClient = new WaiiHttpClient_1.default(url, apiKey); | ||
this.History = new History_1.default(this.HttpClient); | ||
@@ -25,0 +25,0 @@ this.SemanticContext = new SemanticContext_1.default(this.HttpClient); |
@@ -53,2 +53,6 @@ const lightCodeTheme = require('prism-react-renderer/themes/github'); | ||
{ | ||
label: 'Java SDK', | ||
href: 'https://doc.waii.ai/java/docs/intro', | ||
}, | ||
{ | ||
label: 'CLI', | ||
@@ -55,0 +59,0 @@ href: 'https://doc.waii.ai/cli/docs/intro', |
@@ -37,4 +37,9 @@ module.exports = { | ||
label: 'Chat', | ||
}, | ||
{ | ||
type: 'doc', | ||
id: 'chart-module', | ||
label: 'Charts', | ||
} | ||
], | ||
}; |
{ | ||
"name": "waii-sdk-js", | ||
"version": "1.19.1", | ||
"version": "1.19.2", | ||
"description": "Typescript / Javascript SDK for the waii api. SQL generation and much more.", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/waii-sdk.js", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1015430
68
17468
1