@narrative.io/data-collaboration-sdk-ts 0.0.51 → 0.0.53
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.
- package/build/index.d.ts +4 -2
- package/build/index.js +2 -1
- package/build/nql/NQLParser.d.ts +87 -0
- package/build/nql/NQLParser.js +335 -0
- package/build/nql/SubstraitParser.d.ts +771 -0
- package/build/nql/SubstraitParser.js +788 -0
- package/build/nql/index.d.ts +19 -4
- package/build/nql/index.js +19 -0
- package/build/nql/types.d.ts +1229 -3
- package/build/nql/types.js +81 -1
- package/package.json +3 -2
package/build/nql/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseApi } from '../base-api';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Plan } from './SubstraitParser';
|
|
3
|
+
import type { Nql, NqlCompileResult, NqlQueryInput, NqlResult } from './types';
|
|
3
4
|
/**
|
|
4
5
|
* A class for accessing the NQL API.
|
|
5
6
|
* @extends BaseApi
|
|
@@ -11,13 +12,27 @@ declare class NqlApi extends BaseApi {
|
|
|
11
12
|
* @param {string} nqlQuery - The NQL query to execute.
|
|
12
13
|
* @returns {Promise<NqlResult>} A promise that resolves with the result of the NQL query.
|
|
13
14
|
*/
|
|
14
|
-
executeNql(nqlQuery:
|
|
15
|
+
executeNql(nqlQuery: NqlQueryInput): Promise<NqlResult>;
|
|
15
16
|
/**
|
|
16
17
|
* Compiles an NQL query and returns the result, including any errors.
|
|
17
18
|
*
|
|
18
19
|
* @param {string} nqlQuery - The NQL query to compile.
|
|
19
20
|
* @returns {Promise<NqlCompileResult>} A promise that resolves with the result of the NQL compilation.
|
|
20
21
|
*/
|
|
21
|
-
compileNql(nqlQuery:
|
|
22
|
+
compileNql(nqlQuery: NqlQueryInput): Promise<NqlCompileResult>;
|
|
23
|
+
/**
|
|
24
|
+
* Compiles an NQL query and returns the result, including any errors.
|
|
25
|
+
*
|
|
26
|
+
* @param {string} nqlQuery - The NQL query to compile.
|
|
27
|
+
* @returns {Promise<NqlCompileResult>} A promise that resolves with the result of the NQL compilation.
|
|
28
|
+
*/
|
|
29
|
+
parseNql(nqlQuery: NqlQueryInput): Promise<Plan>;
|
|
30
|
+
/**
|
|
31
|
+
* Gets an existing NQL query by it's id
|
|
32
|
+
*
|
|
33
|
+
* @param {string} id - The id for the NQL query to return.
|
|
34
|
+
* @returns {Promise<NqlResult>} A promise that resolves with the result of the NQL query.
|
|
35
|
+
*/
|
|
36
|
+
getNqlByJobId(id: string): Promise<NqlResult>;
|
|
22
37
|
}
|
|
23
|
-
export { NqlApi, type NqlResult, type
|
|
38
|
+
export { NqlApi, type NqlResult, type NqlQueryInput, type NqlCompileResult, type Nql };
|
package/build/nql/index.js
CHANGED
|
@@ -32,5 +32,24 @@ class NqlApi extends BaseApi {
|
|
|
32
32
|
const response = await this.post(`${resourceName}/compile`, nqlQuery);
|
|
33
33
|
return response;
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Compiles an NQL query and returns the result, including any errors.
|
|
37
|
+
*
|
|
38
|
+
* @param {string} nqlQuery - The NQL query to compile.
|
|
39
|
+
* @returns {Promise<NqlCompileResult>} A promise that resolves with the result of the NQL compilation.
|
|
40
|
+
*/
|
|
41
|
+
async parseNql(nqlQuery) {
|
|
42
|
+
const response = await this.post(`${resourceName}/parse`, nqlQuery);
|
|
43
|
+
return response;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Gets an existing NQL query by it's id
|
|
47
|
+
*
|
|
48
|
+
* @param {string} id - The id for the NQL query to return.
|
|
49
|
+
* @returns {Promise<NqlResult>} A promise that resolves with the result of the NQL query.
|
|
50
|
+
*/
|
|
51
|
+
async getNqlByJobId(id) {
|
|
52
|
+
return await this.get(`${resourceName}/${id}`);
|
|
53
|
+
}
|
|
35
54
|
}
|
|
36
55
|
export { NqlApi };
|