waii-sdk-js
Advanced tools
Comparing version 1.19.0 to 1.19.1
@@ -52,4 +52,4 @@ "use strict"; | ||
} | ||
getConnections(params = {}, signal) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
getConnections() { | ||
return __awaiter(this, arguments, void 0, function* (params = {}, signal) { | ||
return this.httpClient.commonFetch(MODIFY_DB_ENDPOINT, params, signal); | ||
@@ -69,4 +69,4 @@ }); | ||
; | ||
getCatalogs(params = {}, signal) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
getCatalogs() { | ||
return __awaiter(this, arguments, void 0, function* (params = {}, signal) { | ||
return this.httpClient.commonFetch(GET_CATALOG_ENDPOINT, params, signal); | ||
@@ -73,0 +73,0 @@ }); |
@@ -18,4 +18,4 @@ "use strict"; | ||
; | ||
list(params = {}, signal) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
list() { | ||
return __awaiter(this, arguments, void 0, function* (params = {}, signal) { | ||
return this.httpClient.commonFetch(GET_ENDPOINT, params, signal); | ||
@@ -22,0 +22,0 @@ }); |
@@ -8,6 +8,6 @@ import WaiiHttpClient from "../../../lib/src/WaiiHttpClient"; | ||
always_include?: boolean; | ||
critical?: boolean; | ||
lookup_summaries?: string[]; | ||
summarization_prompt?: string; | ||
constructor(scope: string | undefined, statement: string, labels?: string[], always_include?: boolean, critical?: boolean, lookup_summaries?: string[], summarization_prompt?: string, id?: string); | ||
critical?: boolean; | ||
constructor(scope: string | undefined, statement: string, labels?: string[], always_include?: boolean, lookup_summaries?: string[], summarization_prompt?: string, id?: string, critical?: boolean); | ||
} | ||
@@ -14,0 +14,0 @@ type ModifySemanticContextRequest = { |
@@ -17,3 +17,3 @@ "use strict"; | ||
class SemanticStatement { | ||
constructor(scope = '*', statement, labels = [], always_include = true, critical = false, lookup_summaries = [], summarization_prompt = '', id = '') { | ||
constructor(scope = '*', statement, labels = [], always_include = true, lookup_summaries = [], summarization_prompt = '', id = '', critical = false) { | ||
if (id) { | ||
@@ -20,0 +20,0 @@ this.id = id; |
@@ -8,3 +8,4 @@ declare class WaiiHttpClient { | ||
userId: string; | ||
constructor(url?: string, apiKey?: string); | ||
fetch_func: any; | ||
constructor(url?: string, apiKey?: string, fetch_func?: typeof fetch); | ||
setScope(scope: string): void; | ||
@@ -11,0 +12,0 @@ getScope(): string; |
@@ -13,3 +13,3 @@ "use strict"; | ||
class WaiiHttpClient { | ||
constructor(url = 'http://localhost:9859/api/', apiKey = '') { | ||
constructor(url = 'http://localhost:9859/api/', apiKey = '', fetch_func = fetch) { | ||
this.timeout = 150000000; | ||
@@ -21,2 +21,3 @@ this.scope = ''; | ||
this.apiKey = apiKey; | ||
this.fetch_func = fetch_func; | ||
} | ||
@@ -56,3 +57,3 @@ ; | ||
let fetchOrTimeout = Promise.race([ | ||
fetch(this.url + endpoint, request), | ||
this.fetch_func(this.url + endpoint, request), | ||
new Promise((res, rej) => { | ||
@@ -59,0 +60,0 @@ timer = setTimeout(() => rej(new Error(`Call timed out after ${this.timeout} ms`)), this.timeout); |
@@ -24,3 +24,3 @@ "use strict"; | ||
updated: [{ | ||
key: '', | ||
key: '', // will be generated by the system | ||
account_name: '<your account name>', | ||
@@ -27,0 +27,0 @@ database: '<your database>', |
@@ -23,3 +23,3 @@ import History from "../clients/history/src/History"; | ||
constructor(url?: string, apiKey?: string); | ||
initialize(url?: string, apiKey?: string, /* no longer used */ fetch_func?: any): void; | ||
initialize(url?: string, apiKey?: string, 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 = '', /* no longer used */ fetch_func = null) { | ||
this.HttpClient = new WaiiHttpClient_1.default(url, apiKey); | ||
initialize(url = 'http://localhost:9859/api/', apiKey = '', fetch_func = fetch) { | ||
this.HttpClient = new WaiiHttpClient_1.default(url, apiKey, fetch_func); | ||
this.History = new History_1.default(this.HttpClient); | ||
@@ -25,0 +25,0 @@ this.SemanticContext = new SemanticContext_1.default(this.HttpClient); |
{ | ||
"name": "waii-sdk-js", | ||
"version": "1.19.0", | ||
"version": "1.19.1", | ||
"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
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
1010406
67
17461
4
3