waii-sdk-js
Advanced tools
Comparing version 1.7.5 to 1.7.6
@@ -102,4 +102,12 @@ import { SearchContext, TableName, Column, SchemaName } from "../../database/src/Database"; | ||
}; | ||
type TranscodeQueryRequest = { | ||
search_context?: SearchContext[]; | ||
ask?: string; | ||
source_dialect: string; | ||
source_query: string; | ||
target_dialect: string; | ||
}; | ||
export declare let Query: { | ||
generate: (params: QueryGenerationRequest, signal?: AbortSignal) => Promise<GeneratedQuery>; | ||
transcode: (params: TranscodeQueryRequest, signal?: AbortSignal) => Promise<GeneratedQuery>; | ||
run: (params: RunQueryRequest, signal?: AbortSignal) => Promise<GetQueryResultResponse>; | ||
@@ -106,0 +114,0 @@ like: (params: LikeQueryRequest, signal?: AbortSignal) => Promise<LikeQueryResponse>; |
@@ -32,2 +32,5 @@ "use strict"; | ||
}), | ||
transcode: (params, signal) => __awaiter(this, void 0, void 0, function* () { | ||
return WaiiHttpClient_1.default.getInstance().commonFetch(GENERATE_ENDPOINT, params, signal); | ||
}), | ||
run: (params, signal) => __awaiter(this, void 0, void 0, function* () { | ||
@@ -34,0 +37,0 @@ return WaiiHttpClient_1.default.getInstance().commonFetch(RUN_ENDPOINT, params, signal); |
@@ -11,2 +11,9 @@ export declare let WAII: { | ||
generate: (params: import("../clients/query/src/Query").QueryGenerationRequest, signal?: AbortSignal | undefined) => Promise<import("../clients/query/src/Query").GeneratedQuery>; | ||
transcode: (params: { | ||
search_context?: import("../clients/database/src/Database").SearchContext[] | undefined; | ||
ask?: string | undefined; | ||
source_dialect: string; | ||
source_query: string; | ||
target_dialect: string; | ||
}, signal?: AbortSignal | undefined) => Promise<import("../clients/query/src/Query").GeneratedQuery>; | ||
run: (params: import("../clients/query/src/Query").RunQueryRequest, signal?: AbortSignal | undefined) => Promise<import("../clients/query/src/Query").GetQueryResultResponse>; | ||
@@ -13,0 +20,0 @@ like: (params: import("../clients/query/src/Query").LikeQueryRequest, signal?: AbortSignal | undefined) => Promise<import("../clients/query/src/Query").LikeQueryResponse>; |
{ | ||
"name": "waii-sdk-js", | ||
"version": "1.7.5", | ||
"version": "1.7.6", | ||
"description": "Typescript / Javascript SDK for the waii api. SQL generation and much more.", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/waii-sdk.js", |
@@ -32,4 +32,14 @@ # WAII SDK Documentation for TypeScript and JavaScript | ||
To get started with the WAII API, you first need to initialize the system. You can get your API key, by reaching out to us here: https://www.waii.ai | ||
The SDK packages are maintained on npm: https://www.npmjs.com/package/waii-sdk-js | ||
You can install the package via npm directly or add the dependency to your project's package.json file. | ||
```bash | ||
npm i waii-sdk-js -g | ||
``` | ||
You will also need an API key to use the API. You can get your API key by reaching out to us here: https://www.waii.ai | ||
That wraps up the pre-requisites. To get started with the WAII API, you first need to initialize the system. | ||
```javascript | ||
@@ -36,0 +46,0 @@ // Import the WAII module |
113444
35
1240
666
4