@narrative.io/data-collaboration-sdk-ts 2.12.0 → 2.13.0
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/nql/index.d.ts +4 -4
- package/build/nql/index.js +8 -8
- package/build/nql/types.d.ts +4 -1
- package/build/nql/types.js +1 -0
- package/package.json +1 -1
package/build/nql/index.d.ts
CHANGED
|
@@ -12,21 +12,21 @@ declare class NqlApi extends BaseApi {
|
|
|
12
12
|
* @param {string} nqlQuery - The NQL query to execute.
|
|
13
13
|
* @returns {Promise<NqlResult>} A promise that resolves with the result of the NQL query.
|
|
14
14
|
*/
|
|
15
|
-
executeNql(
|
|
15
|
+
executeNql(payload: NqlQueryInput): Promise<NqlResult>;
|
|
16
16
|
/**
|
|
17
17
|
* Compiles an NQL query and returns the result, including any errors.
|
|
18
18
|
*
|
|
19
19
|
* @param {string} nqlQuery - The NQL query to compile.
|
|
20
20
|
* @returns {Promise<NqlCompileResult>} A promise that resolves with the result of the NQL compilation.
|
|
21
21
|
*/
|
|
22
|
-
compileNql(
|
|
22
|
+
compileNql(payload: NqlQueryInput): Promise<NqlCompileResult>;
|
|
23
23
|
/**
|
|
24
24
|
* Compiles an NQL query and returns the result, including any errors.
|
|
25
25
|
*
|
|
26
26
|
* @param {string} nqlQuery - The NQL query to compile.
|
|
27
27
|
* @returns {Promise<NqlCompileResult>} A promise that resolves with the result of the NQL compilation.
|
|
28
28
|
*/
|
|
29
|
-
parseNql(
|
|
29
|
+
parseNql(payload: NqlQueryInput): Promise<NqlAst>;
|
|
30
30
|
/**
|
|
31
31
|
* Validates an NQL query and returns an abstract syntax tree (AST) representing a structured form of
|
|
32
32
|
* the query.
|
|
@@ -34,7 +34,7 @@ declare class NqlApi extends BaseApi {
|
|
|
34
34
|
* @param {string} nqlQuery - The NQL query to validate.
|
|
35
35
|
* @returns {Promise<NqlCompileResult>} A promise that resolves with the result of the NQL validation.
|
|
36
36
|
*/
|
|
37
|
-
validateNql(
|
|
37
|
+
validateNql(payload: NqlQueryInput): Promise<NqlAst>;
|
|
38
38
|
/**
|
|
39
39
|
* Gets an existing NQL query by it's id
|
|
40
40
|
*
|
package/build/nql/index.js
CHANGED
|
@@ -18,8 +18,8 @@ class NqlApi extends BaseApi {
|
|
|
18
18
|
* @param {string} nqlQuery - The NQL query to execute.
|
|
19
19
|
* @returns {Promise<NqlResult>} A promise that resolves with the result of the NQL query.
|
|
20
20
|
*/
|
|
21
|
-
async executeNql(
|
|
22
|
-
const response = await this.post(`${resourceName}/run`,
|
|
21
|
+
async executeNql(payload) {
|
|
22
|
+
const response = await this.post(`${resourceName}/run`, payload);
|
|
23
23
|
return response;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
@@ -28,8 +28,8 @@ class NqlApi extends BaseApi {
|
|
|
28
28
|
* @param {string} nqlQuery - The NQL query to compile.
|
|
29
29
|
* @returns {Promise<NqlCompileResult>} A promise that resolves with the result of the NQL compilation.
|
|
30
30
|
*/
|
|
31
|
-
async compileNql(
|
|
32
|
-
const response = await this.post(`${resourceName}/compile`,
|
|
31
|
+
async compileNql(payload) {
|
|
32
|
+
const response = await this.post(`${resourceName}/compile`, payload);
|
|
33
33
|
return response;
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
@@ -38,8 +38,8 @@ class NqlApi extends BaseApi {
|
|
|
38
38
|
* @param {string} nqlQuery - The NQL query to compile.
|
|
39
39
|
* @returns {Promise<NqlCompileResult>} A promise that resolves with the result of the NQL compilation.
|
|
40
40
|
*/
|
|
41
|
-
async parseNql(
|
|
42
|
-
const response = await this.post(`${resourceName}/parse`,
|
|
41
|
+
async parseNql(payload) {
|
|
42
|
+
const response = await this.post(`${resourceName}/parse`, payload);
|
|
43
43
|
return response;
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
@@ -49,8 +49,8 @@ class NqlApi extends BaseApi {
|
|
|
49
49
|
* @param {string} nqlQuery - The NQL query to validate.
|
|
50
50
|
* @returns {Promise<NqlCompileResult>} A promise that resolves with the result of the NQL validation.
|
|
51
51
|
*/
|
|
52
|
-
async validateNql(
|
|
53
|
-
const response = await this.post(`${resourceName}/validate`,
|
|
52
|
+
async validateNql(payload) {
|
|
53
|
+
const response = await this.post(`${resourceName}/validate`, payload);
|
|
54
54
|
return response;
|
|
55
55
|
}
|
|
56
56
|
/**
|
package/build/nql/types.d.ts
CHANGED
|
@@ -37,15 +37,18 @@ export type NqlBudget = z.infer<typeof NqlBudgetObj>;
|
|
|
37
37
|
*/
|
|
38
38
|
export declare const NqlQueryInputObj: z.ZodObject<{
|
|
39
39
|
nql: z.ZodString;
|
|
40
|
+
data_plane_id: z.ZodNullable<z.ZodString>;
|
|
40
41
|
}, "strip", z.ZodTypeAny, {
|
|
41
42
|
nql: string;
|
|
43
|
+
data_plane_id: string | null;
|
|
42
44
|
}, {
|
|
43
45
|
nql: string;
|
|
46
|
+
data_plane_id: string | null;
|
|
44
47
|
}>;
|
|
45
48
|
/**
|
|
46
49
|
* Type for NqlQueryInput object. This is the object that is passed to the NQL API
|
|
47
50
|
*
|
|
48
|
-
* @typedef
|
|
51
|
+
* @typedef NqlQueryInput
|
|
49
52
|
*/
|
|
50
53
|
export type NqlQueryInput = z.infer<typeof NqlQueryInputObj>;
|
|
51
54
|
/**
|
package/build/nql/types.js
CHANGED
|
@@ -38,6 +38,7 @@ export const NqlQueryInputObj = z.object({
|
|
|
38
38
|
message: "NQL query cannot contain a JOIN statement.",
|
|
39
39
|
})
|
|
40
40
|
.describe("A NQL query"),
|
|
41
|
+
data_plane_id: z.string().nullable().describe("Data plane identifier"),
|
|
41
42
|
});
|
|
42
43
|
/**
|
|
43
44
|
* A schema object used to validate and infer the structure of NqlPreSelectExpression.
|