@narrative.io/data-collaboration-sdk-ts 0.0.147 → 0.0.149
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 +9 -9
- package/build/nql/AstParser.d.ts +41 -42
- package/package.json +3 -3
package/build/jobs/types.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { type JobState } from "src/forecast";
|
|
2
2
|
export interface Job {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
job_id: string;
|
|
4
|
+
request_source: JobRequestSource;
|
|
5
5
|
state: JobState;
|
|
6
6
|
type: string;
|
|
7
7
|
input: any;
|
|
8
8
|
executor?: string;
|
|
9
|
-
|
|
9
|
+
idempotency_key: string;
|
|
10
10
|
result?: any;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
created_at: string;
|
|
12
|
+
updated_at: string;
|
|
13
|
+
ended_at?: string;
|
|
14
14
|
}
|
|
15
15
|
export interface JobRequestSource {
|
|
16
|
-
|
|
16
|
+
api_user?: JobRequestSourceApiUser;
|
|
17
17
|
process?: JobRequestSourceProcess;
|
|
18
18
|
}
|
|
19
19
|
export interface JobRequestSourceApiUser {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
company_id: string;
|
|
21
|
+
user_id: string;
|
|
22
22
|
}
|
|
23
23
|
export interface JobRequestSourceProcess {
|
|
24
24
|
name: string;
|
package/build/nql/AstParser.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as ast from "./Ast";
|
|
2
|
-
type Statement = CreateMaterializedView | Explain;
|
|
3
|
-
interface CreateMaterializedView {
|
|
2
|
+
export type Statement = CreateMaterializedView | Explain;
|
|
3
|
+
export interface CreateMaterializedView {
|
|
4
4
|
type: "create_materialized_view";
|
|
5
5
|
name: string;
|
|
6
6
|
select: Select;
|
|
7
7
|
}
|
|
8
|
-
interface Explain {
|
|
8
|
+
export interface Explain {
|
|
9
9
|
type: "explain";
|
|
10
10
|
query: Select;
|
|
11
11
|
}
|
|
12
|
-
interface Select {
|
|
12
|
+
export interface Select {
|
|
13
13
|
type: "select";
|
|
14
14
|
budget: ast.NqlBudget | null;
|
|
15
15
|
columns: Expression[];
|
|
@@ -17,184 +17,183 @@ interface Select {
|
|
|
17
17
|
from: Table[] | Raw;
|
|
18
18
|
where: BooleanExpression | Raw | null;
|
|
19
19
|
}
|
|
20
|
-
type Expression = ArithmeticExpression | BooleanExpression | ColumnRef | Lit | FunctionCall | StringExpression | UnaryMinus | Raw;
|
|
21
|
-
interface Raw {
|
|
20
|
+
export type Expression = ArithmeticExpression | BooleanExpression | ColumnRef | Lit | FunctionCall | StringExpression | UnaryMinus | Raw;
|
|
21
|
+
export interface Raw {
|
|
22
22
|
type: "nql";
|
|
23
23
|
as?: string;
|
|
24
24
|
nql: string;
|
|
25
25
|
}
|
|
26
|
-
interface Deduplication {
|
|
26
|
+
export interface Deduplication {
|
|
27
27
|
type: "deduplication";
|
|
28
28
|
expressions: Expression[];
|
|
29
29
|
}
|
|
30
|
-
type ColumnRef = AttributeRef | DatasetColumnRef | RawRef;
|
|
31
|
-
type ArithmeticExpression = BinaryArithmeticExpression | UnaryMinus;
|
|
32
|
-
type BinaryArithmeticExpression = Add | Divide | Multiply | Subtract;
|
|
33
|
-
type BooleanExpression = And | Between | Equals | NotEquals | Gt | Gte | In | IsNull | Like | Lt | Lte | Not | Or;
|
|
34
|
-
type StringExpression = Concat;
|
|
35
|
-
type Table = RosettaTable | DatasetTable | RawTable;
|
|
36
|
-
interface RosettaTable {
|
|
30
|
+
export type ColumnRef = AttributeRef | DatasetColumnRef | RawRef;
|
|
31
|
+
export type ArithmeticExpression = BinaryArithmeticExpression | UnaryMinus;
|
|
32
|
+
export type BinaryArithmeticExpression = Add | Divide | Multiply | Subtract;
|
|
33
|
+
export type BooleanExpression = And | Between | Equals | NotEquals | Gt | Gte | In | IsNull | Like | Lt | Lte | Not | Or;
|
|
34
|
+
export type StringExpression = Concat;
|
|
35
|
+
export type Table = RosettaTable | DatasetTable | RawTable;
|
|
36
|
+
export interface RosettaTable {
|
|
37
37
|
type: "rosetta_stone";
|
|
38
38
|
as?: string;
|
|
39
39
|
join?: Join;
|
|
40
40
|
}
|
|
41
|
-
interface DatasetTable {
|
|
41
|
+
export interface DatasetTable {
|
|
42
42
|
type: "dataset";
|
|
43
43
|
as?: string;
|
|
44
44
|
datasetId: number;
|
|
45
45
|
join?: Join;
|
|
46
46
|
}
|
|
47
|
-
interface RawTable {
|
|
47
|
+
export interface RawTable {
|
|
48
48
|
type: "raw_table";
|
|
49
49
|
as?: string;
|
|
50
50
|
nql: string;
|
|
51
51
|
join?: Join;
|
|
52
52
|
}
|
|
53
|
-
interface Join {
|
|
53
|
+
export interface Join {
|
|
54
54
|
type: "join";
|
|
55
55
|
condition: BooleanExpression | Raw | null;
|
|
56
56
|
conditionType: ast.NqlJoinConditionType;
|
|
57
57
|
joinType: ast.NqlJoinType;
|
|
58
58
|
}
|
|
59
|
-
interface AttributeRef {
|
|
59
|
+
export interface AttributeRef {
|
|
60
60
|
type: "attribute_ref";
|
|
61
61
|
as?: string;
|
|
62
62
|
name: string;
|
|
63
63
|
column: string;
|
|
64
64
|
}
|
|
65
|
-
interface DatasetColumnRef {
|
|
65
|
+
export interface DatasetColumnRef {
|
|
66
66
|
type: "dataset_column_ref";
|
|
67
67
|
as?: string;
|
|
68
68
|
column: string;
|
|
69
69
|
datasetId: number;
|
|
70
70
|
}
|
|
71
|
-
interface RawRef {
|
|
71
|
+
export interface RawRef {
|
|
72
72
|
type: "raw_ref";
|
|
73
73
|
as?: string;
|
|
74
74
|
nql: string;
|
|
75
75
|
}
|
|
76
|
-
interface Lit {
|
|
76
|
+
export interface Lit {
|
|
77
77
|
type: "lit";
|
|
78
78
|
as?: string;
|
|
79
79
|
value_type: ast.NqlSimpleType;
|
|
80
80
|
value: string | null;
|
|
81
81
|
}
|
|
82
|
-
interface FunctionCall {
|
|
82
|
+
export interface FunctionCall {
|
|
83
83
|
type: "function";
|
|
84
84
|
as?: string;
|
|
85
85
|
args: Expression[];
|
|
86
86
|
name: string;
|
|
87
87
|
}
|
|
88
|
-
interface Add {
|
|
88
|
+
export interface Add {
|
|
89
89
|
type: "+";
|
|
90
90
|
as?: string;
|
|
91
91
|
operands: Expression[];
|
|
92
92
|
}
|
|
93
|
-
interface Divide {
|
|
93
|
+
export interface Divide {
|
|
94
94
|
type: "/";
|
|
95
95
|
as?: string;
|
|
96
96
|
operands: Expression[];
|
|
97
97
|
}
|
|
98
|
-
interface Multiply {
|
|
98
|
+
export interface Multiply {
|
|
99
99
|
type: "*";
|
|
100
100
|
as?: string;
|
|
101
101
|
operands: Expression[];
|
|
102
102
|
}
|
|
103
|
-
interface Subtract {
|
|
103
|
+
export interface Subtract {
|
|
104
104
|
type: "-";
|
|
105
105
|
as?: string;
|
|
106
106
|
operands: Expression[];
|
|
107
107
|
}
|
|
108
|
-
interface UnaryMinus {
|
|
108
|
+
export interface UnaryMinus {
|
|
109
109
|
type: "unary_-";
|
|
110
110
|
as?: string;
|
|
111
111
|
operand: Expression;
|
|
112
112
|
}
|
|
113
|
-
interface And {
|
|
113
|
+
export interface And {
|
|
114
114
|
type: "and";
|
|
115
115
|
as?: string;
|
|
116
116
|
operands: Expression[];
|
|
117
117
|
}
|
|
118
|
-
interface Or {
|
|
118
|
+
export interface Or {
|
|
119
119
|
type: "or";
|
|
120
120
|
as?: string;
|
|
121
121
|
operands: Expression[];
|
|
122
122
|
}
|
|
123
|
-
interface Not {
|
|
123
|
+
export interface Not {
|
|
124
124
|
type: "not";
|
|
125
125
|
as?: string;
|
|
126
126
|
operand: BooleanExpression | Raw;
|
|
127
127
|
}
|
|
128
128
|
/** Implicitly we only support asymmetric betweens. */
|
|
129
|
-
interface Between {
|
|
129
|
+
export interface Between {
|
|
130
130
|
type: "between";
|
|
131
131
|
as?: string;
|
|
132
132
|
operand: Expression;
|
|
133
133
|
lower: Expression;
|
|
134
134
|
upper: Expression;
|
|
135
135
|
}
|
|
136
|
-
interface Equals {
|
|
136
|
+
export interface Equals {
|
|
137
137
|
type: "=";
|
|
138
138
|
as?: string;
|
|
139
139
|
left: Expression;
|
|
140
140
|
right: Expression;
|
|
141
141
|
}
|
|
142
|
-
interface NotEquals {
|
|
142
|
+
export interface NotEquals {
|
|
143
143
|
type: "<>";
|
|
144
144
|
as?: string;
|
|
145
145
|
left: Expression;
|
|
146
146
|
right: Expression;
|
|
147
147
|
}
|
|
148
|
-
interface Lt {
|
|
148
|
+
export interface Lt {
|
|
149
149
|
type: "<";
|
|
150
150
|
as?: string;
|
|
151
151
|
left: Expression;
|
|
152
152
|
right: Expression;
|
|
153
153
|
}
|
|
154
|
-
interface Lte {
|
|
154
|
+
export interface Lte {
|
|
155
155
|
type: "<=";
|
|
156
156
|
as?: string;
|
|
157
157
|
left: Expression;
|
|
158
158
|
right: Expression;
|
|
159
159
|
}
|
|
160
|
-
interface Gt {
|
|
160
|
+
export interface Gt {
|
|
161
161
|
type: ">";
|
|
162
162
|
as?: string;
|
|
163
163
|
left: Expression;
|
|
164
164
|
right: Expression;
|
|
165
165
|
}
|
|
166
|
-
interface Gte {
|
|
166
|
+
export interface Gte {
|
|
167
167
|
type: ">=";
|
|
168
168
|
as?: string;
|
|
169
169
|
left: Expression;
|
|
170
170
|
right: Expression;
|
|
171
171
|
}
|
|
172
|
-
interface In {
|
|
172
|
+
export interface In {
|
|
173
173
|
type: "in";
|
|
174
174
|
as?: string;
|
|
175
175
|
negated: boolean;
|
|
176
176
|
expression: Expression;
|
|
177
177
|
values: Expression[] | Raw;
|
|
178
178
|
}
|
|
179
|
-
interface IsNull {
|
|
179
|
+
export interface IsNull {
|
|
180
180
|
type: "is_null";
|
|
181
181
|
as?: string;
|
|
182
182
|
negated: boolean;
|
|
183
183
|
operand: Expression;
|
|
184
184
|
}
|
|
185
|
-
interface Like {
|
|
185
|
+
export interface Like {
|
|
186
186
|
type: "like";
|
|
187
187
|
as?: string;
|
|
188
188
|
negated: boolean;
|
|
189
189
|
value: Expression;
|
|
190
190
|
pattern: string;
|
|
191
191
|
}
|
|
192
|
-
interface Concat {
|
|
192
|
+
export interface Concat {
|
|
193
193
|
type: "||";
|
|
194
194
|
as?: string;
|
|
195
195
|
operands: Expression[];
|
|
196
196
|
}
|
|
197
|
-
export type { CreateMaterializedView, Deduplication, Explain, Expression, Raw, Select, Statement, Table, };
|
|
198
197
|
export declare function parseStatement(n: ast.NqlAst): Statement | Raw;
|
|
199
198
|
export declare function parseCreateMaterializedView(n: ast.NqlCreateMaterializedView): CreateMaterializedView;
|
|
200
199
|
export declare function parseExplain(n: ast.NqlExplain): Explain | Raw;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@narrative.io/data-collaboration-sdk-ts",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.149",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"repository": "github:narrative-io/data-collaboration-sdk-ts",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"@babel/core": "^7.22.5",
|
|
24
24
|
"@babel/preset-env": "^7.22.5",
|
|
25
25
|
"@babel/preset-typescript": "^7.18.6",
|
|
26
|
-
"@commitlint/cli": "^
|
|
27
|
-
"@commitlint/config-conventional": "^
|
|
26
|
+
"@commitlint/cli": "^18.2.0",
|
|
27
|
+
"@commitlint/config-conventional": "^18.1.0",
|
|
28
28
|
"@types/jest": "^29.5.0",
|
|
29
29
|
"babel-jest": "^29.4.3",
|
|
30
30
|
"eslint-config-prettier": "^9.0.0",
|