@narrative.io/data-collaboration-sdk-ts 2.0.0 → 2.0.1
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/jobs/types.d.ts +15 -4
- package/package.json +1 -1
package/build/jobs/types.d.ts
CHANGED
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
import type { JobState } from "src/forecast";
|
|
2
2
|
import type { NqlBudget } from "src/nql/types";
|
|
3
|
-
export
|
|
3
|
+
export type JobType = "explain" | "materialized_view";
|
|
4
|
+
interface BaseJob {
|
|
4
5
|
job_id: string;
|
|
5
6
|
request_source: JobRequestSource;
|
|
6
7
|
state: JobState;
|
|
7
|
-
type: string;
|
|
8
|
-
input: ExplainInput | MaterializedViewInput;
|
|
9
8
|
executor?: string;
|
|
10
9
|
idempotency_key: string;
|
|
11
|
-
result?: ExplainOutput | MaterializedViewOutput;
|
|
12
10
|
created_at: string;
|
|
13
11
|
updated_at: string;
|
|
14
12
|
ended_at?: string;
|
|
15
13
|
}
|
|
14
|
+
export interface ExplainJob extends BaseJob {
|
|
15
|
+
type: "explain";
|
|
16
|
+
input: ExplainInput;
|
|
17
|
+
result?: ExplainOutput;
|
|
18
|
+
}
|
|
19
|
+
export interface MaterializedViewJob extends BaseJob {
|
|
20
|
+
type: "materialized_view";
|
|
21
|
+
input: MaterializedViewInput;
|
|
22
|
+
result?: MaterializedViewOutput;
|
|
23
|
+
}
|
|
24
|
+
export type Job = ExplainJob | MaterializedViewJob;
|
|
16
25
|
export interface JobRequestSource {
|
|
17
26
|
api_user?: JobRequestSourceApiUser;
|
|
18
27
|
process?: JobRequestSourceProcess;
|
|
@@ -27,6 +36,7 @@ export interface JobRequestSourceProcess {
|
|
|
27
36
|
export interface ExplainInput {
|
|
28
37
|
nql: string;
|
|
29
38
|
compiled_nql: string;
|
|
39
|
+
dataset_id: number;
|
|
30
40
|
}
|
|
31
41
|
export interface MaterializedViewInput {
|
|
32
42
|
nql: string;
|
|
@@ -50,3 +60,4 @@ export interface MaterializedViewOutput {
|
|
|
50
60
|
};
|
|
51
61
|
};
|
|
52
62
|
}
|
|
63
|
+
export {};
|