@contractspec/example.analytics-dashboard 1.57.0 → 1.58.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/dist/browser/dashboard/dashboard.enum.js +34 -0
- package/dist/browser/dashboard/dashboard.operation.js +289 -0
- package/dist/browser/dashboard/dashboard.presentation.js +197 -0
- package/dist/browser/dashboard/dashboard.schema.js +126 -0
- package/dist/browser/dashboard/dashboard.test-spec.js +213 -0
- package/dist/browser/dashboard/index.js +299 -0
- package/dist/browser/dashboard.feature.js +84 -0
- package/dist/browser/datasource/posthog-datasource.js +289 -0
- package/dist/browser/docs/analytics-dashboard.docblock.js +103 -0
- package/dist/browser/docs/index.js +103 -0
- package/dist/browser/events.js +81 -0
- package/dist/browser/example.js +42 -0
- package/dist/browser/handlers/analytics.handlers.js +278 -0
- package/dist/browser/handlers/index.js +571 -0
- package/dist/browser/handlers/query.handlers.js +294 -0
- package/dist/browser/index.js +1677 -0
- package/dist/browser/query/index.js +159 -0
- package/dist/browser/query/query.enum.js +11 -0
- package/dist/browser/query/query.operation.js +154 -0
- package/dist/browser/query/query.presentation.js +119 -0
- package/dist/browser/query/query.schema.js +70 -0
- package/dist/browser/query/query.test-spec.js +113 -0
- package/dist/browser/query-engine/index.js +491 -0
- package/dist/browser/seeders/index.js +20 -0
- package/dist/browser/ui/AnalyticsDashboard.js +394 -0
- package/dist/browser/ui/hooks/index.js +69 -0
- package/dist/browser/ui/hooks/useAnalyticsData.js +66 -0
- package/dist/browser/ui/index.js +671 -0
- package/dist/browser/ui/renderers/analytics.markdown.js +275 -0
- package/dist/browser/ui/renderers/index.js +275 -0
- package/dist/dashboard/dashboard.enum.d.ts +3 -8
- package/dist/dashboard/dashboard.enum.d.ts.map +1 -1
- package/dist/dashboard/dashboard.enum.js +31 -39
- package/dist/dashboard/dashboard.operation.d.ts +444 -450
- package/dist/dashboard/dashboard.operation.d.ts.map +1 -1
- package/dist/dashboard/dashboard.operation.js +284 -207
- package/dist/dashboard/dashboard.presentation.d.ts +3 -8
- package/dist/dashboard/dashboard.presentation.d.ts.map +1 -1
- package/dist/dashboard/dashboard.presentation.js +193 -85
- package/dist/dashboard/dashboard.schema.d.ts +289 -294
- package/dist/dashboard/dashboard.schema.d.ts.map +1 -1
- package/dist/dashboard/dashboard.schema.js +119 -228
- package/dist/dashboard/dashboard.test-spec.d.ts +4 -9
- package/dist/dashboard/dashboard.test-spec.d.ts.map +1 -1
- package/dist/dashboard/dashboard.test-spec.js +209 -228
- package/dist/dashboard/index.d.ts +7 -4
- package/dist/dashboard/index.d.ts.map +1 -0
- package/dist/dashboard/index.js +299 -4
- package/dist/dashboard.feature.d.ts +1 -6
- package/dist/dashboard.feature.d.ts.map +1 -1
- package/dist/dashboard.feature.js +83 -175
- package/dist/datasource/posthog-datasource.d.ts +15 -19
- package/dist/datasource/posthog-datasource.d.ts.map +1 -1
- package/dist/datasource/posthog-datasource.js +274 -238
- package/dist/docs/analytics-dashboard.docblock.d.ts +2 -1
- package/dist/docs/analytics-dashboard.docblock.d.ts.map +1 -0
- package/dist/docs/analytics-dashboard.docblock.js +45 -56
- package/dist/docs/index.d.ts +2 -1
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +104 -1
- package/dist/events.d.ts +109 -115
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +74 -120
- package/dist/example.d.ts +2 -6
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +41 -55
- package/dist/handlers/analytics.handlers.d.ts +110 -109
- package/dist/handlers/analytics.handlers.d.ts.map +1 -1
- package/dist/handlers/analytics.handlers.js +267 -298
- package/dist/handlers/index.d.ts +3 -3
- package/dist/handlers/index.d.ts.map +1 -0
- package/dist/handlers/index.js +571 -3
- package/dist/handlers/query.handlers.d.ts +7 -11
- package/dist/handlers/query.handlers.d.ts.map +1 -1
- package/dist/handlers/query.handlers.js +292 -7
- package/dist/index.d.ts +12 -13
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1678 -14
- package/dist/node/dashboard/dashboard.enum.js +34 -0
- package/dist/node/dashboard/dashboard.operation.js +289 -0
- package/dist/node/dashboard/dashboard.presentation.js +197 -0
- package/dist/node/dashboard/dashboard.schema.js +126 -0
- package/dist/node/dashboard/dashboard.test-spec.js +213 -0
- package/dist/node/dashboard/index.js +299 -0
- package/dist/node/dashboard.feature.js +84 -0
- package/dist/node/datasource/posthog-datasource.js +289 -0
- package/dist/node/docs/analytics-dashboard.docblock.js +103 -0
- package/dist/node/docs/index.js +103 -0
- package/dist/node/events.js +81 -0
- package/dist/node/example.js +42 -0
- package/dist/node/handlers/analytics.handlers.js +278 -0
- package/dist/node/handlers/index.js +571 -0
- package/dist/node/handlers/query.handlers.js +294 -0
- package/dist/node/index.js +1677 -0
- package/dist/node/query/index.js +159 -0
- package/dist/node/query/query.enum.js +11 -0
- package/dist/node/query/query.operation.js +154 -0
- package/dist/node/query/query.presentation.js +119 -0
- package/dist/node/query/query.schema.js +70 -0
- package/dist/node/query/query.test-spec.js +113 -0
- package/dist/node/query-engine/index.js +491 -0
- package/dist/node/seeders/index.js +20 -0
- package/dist/node/ui/AnalyticsDashboard.js +394 -0
- package/dist/node/ui/hooks/index.js +69 -0
- package/dist/node/ui/hooks/useAnalyticsData.js +66 -0
- package/dist/node/ui/index.js +671 -0
- package/dist/node/ui/renderers/analytics.markdown.js +275 -0
- package/dist/node/ui/renderers/index.js +275 -0
- package/dist/query/index.d.ts +7 -4
- package/dist/query/index.d.ts.map +1 -0
- package/dist/query/index.js +159 -4
- package/dist/query/query.enum.d.ts +1 -6
- package/dist/query/query.enum.d.ts.map +1 -1
- package/dist/query/query.enum.js +10 -14
- package/dist/query/query.operation.d.ts +148 -154
- package/dist/query/query.operation.d.ts.map +1 -1
- package/dist/query/query.operation.js +151 -109
- package/dist/query/query.presentation.d.ts +2 -7
- package/dist/query/query.presentation.d.ts.map +1 -1
- package/dist/query/query.presentation.js +116 -56
- package/dist/query/query.schema.d.ts +121 -126
- package/dist/query/query.schema.d.ts.map +1 -1
- package/dist/query/query.schema.js +66 -152
- package/dist/query/query.test-spec.d.ts +2 -7
- package/dist/query/query.test-spec.d.ts.map +1 -1
- package/dist/query/query.test-spec.js +111 -121
- package/dist/query-engine/index.d.ts +84 -88
- package/dist/query-engine/index.d.ts.map +1 -1
- package/dist/query-engine/index.js +489 -188
- package/dist/seeders/index.d.ts +4 -8
- package/dist/seeders/index.d.ts.map +1 -1
- package/dist/seeders/index.js +18 -16
- package/dist/ui/AnalyticsDashboard.d.ts +1 -6
- package/dist/ui/AnalyticsDashboard.d.ts.map +1 -1
- package/dist/ui/AnalyticsDashboard.js +389 -259
- package/dist/ui/hooks/index.d.ts +2 -2
- package/dist/ui/hooks/index.d.ts.map +1 -0
- package/dist/ui/hooks/index.js +69 -4
- package/dist/ui/hooks/useAnalyticsData.d.ts +16 -20
- package/dist/ui/hooks/useAnalyticsData.d.ts.map +1 -1
- package/dist/ui/hooks/useAnalyticsData.js +63 -69
- package/dist/ui/index.d.ts +7 -6
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +671 -5
- package/dist/ui/renderers/analytics.markdown.d.ts +13 -14
- package/dist/ui/renderers/analytics.markdown.d.ts.map +1 -1
- package/dist/ui/renderers/analytics.markdown.js +266 -254
- package/dist/ui/renderers/index.d.ts +2 -2
- package/dist/ui/renderers/index.d.ts.map +1 -0
- package/dist/ui/renderers/index.js +275 -2
- package/package.json +328 -67
- package/dist/dashboard/dashboard.enum.js.map +0 -1
- package/dist/dashboard/dashboard.operation.js.map +0 -1
- package/dist/dashboard/dashboard.presentation.js.map +0 -1
- package/dist/dashboard/dashboard.schema.js.map +0 -1
- package/dist/dashboard/dashboard.test-spec.js.map +0 -1
- package/dist/dashboard.feature.js.map +0 -1
- package/dist/datasource/posthog-datasource.js.map +0 -1
- package/dist/docs/analytics-dashboard.docblock.js.map +0 -1
- package/dist/events.js.map +0 -1
- package/dist/example.js.map +0 -1
- package/dist/handlers/analytics.handlers.js.map +0 -1
- package/dist/handlers/query.handlers.js.map +0 -1
- package/dist/query/query.enum.js.map +0 -1
- package/dist/query/query.operation.js.map +0 -1
- package/dist/query/query.presentation.js.map +0 -1
- package/dist/query/query.schema.js.map +0 -1
- package/dist/query/query.test-spec.js.map +0 -1
- package/dist/query-engine/index.js.map +0 -1
- package/dist/seeders/index.js.map +0 -1
- package/dist/ui/AnalyticsDashboard.js.map +0 -1
- package/dist/ui/hooks/useAnalyticsData.js.map +0 -1
- package/dist/ui/renderers/analytics.markdown.js.map +0 -1
|
@@ -1,143 +1,138 @@
|
|
|
1
|
-
import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
|
|
2
|
-
|
|
3
|
-
//#region src/query/query.schema.d.ts
|
|
4
1
|
/**
|
|
5
2
|
* A data query.
|
|
6
3
|
*/
|
|
7
|
-
declare const QueryModel:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
4
|
+
export declare const QueryModel: import("@contractspec/lib.schema").SchemaModel<{
|
|
5
|
+
id: {
|
|
6
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
7
|
+
isOptional: false;
|
|
8
|
+
};
|
|
9
|
+
name: {
|
|
10
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
11
|
+
isOptional: false;
|
|
12
|
+
};
|
|
13
|
+
description: {
|
|
14
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
15
|
+
isOptional: true;
|
|
16
|
+
};
|
|
17
|
+
type: {
|
|
18
|
+
type: import("@contractspec/lib.schema").EnumType<[string, string, string, string]>;
|
|
19
|
+
isOptional: false;
|
|
20
|
+
};
|
|
21
|
+
definition: {
|
|
22
|
+
type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
|
|
23
|
+
isOptional: false;
|
|
24
|
+
};
|
|
25
|
+
sql: {
|
|
26
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
27
|
+
isOptional: true;
|
|
28
|
+
};
|
|
29
|
+
cacheTtlSeconds: {
|
|
30
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
31
|
+
isOptional: false;
|
|
32
|
+
};
|
|
33
|
+
isShared: {
|
|
34
|
+
type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
|
|
35
|
+
isOptional: false;
|
|
36
|
+
};
|
|
37
|
+
createdAt: {
|
|
38
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
39
|
+
isOptional: false;
|
|
40
|
+
};
|
|
44
41
|
}>;
|
|
45
42
|
/**
|
|
46
43
|
* Query execution result.
|
|
47
44
|
*/
|
|
48
|
-
declare const QueryResultModel:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
45
|
+
export declare const QueryResultModel: import("@contractspec/lib.schema").SchemaModel<{
|
|
46
|
+
queryId: {
|
|
47
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
48
|
+
isOptional: false;
|
|
49
|
+
};
|
|
50
|
+
data: {
|
|
51
|
+
type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
|
|
52
|
+
isOptional: false;
|
|
53
|
+
};
|
|
54
|
+
columns: {
|
|
55
|
+
type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
|
|
56
|
+
isOptional: false;
|
|
57
|
+
};
|
|
58
|
+
rowCount: {
|
|
59
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
60
|
+
isOptional: false;
|
|
61
|
+
};
|
|
62
|
+
executionTimeMs: {
|
|
63
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
64
|
+
isOptional: false;
|
|
65
|
+
};
|
|
66
|
+
cachedAt: {
|
|
67
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
68
|
+
isOptional: true;
|
|
69
|
+
};
|
|
70
|
+
error: {
|
|
71
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
72
|
+
isOptional: true;
|
|
73
|
+
};
|
|
77
74
|
}>;
|
|
78
75
|
/**
|
|
79
76
|
* Input for creating a query.
|
|
80
77
|
*/
|
|
81
|
-
declare const CreateQueryInputModel:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
78
|
+
export declare const CreateQueryInputModel: import("@contractspec/lib.schema").SchemaModel<{
|
|
79
|
+
name: {
|
|
80
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
81
|
+
isOptional: false;
|
|
82
|
+
};
|
|
83
|
+
description: {
|
|
84
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
85
|
+
isOptional: true;
|
|
86
|
+
};
|
|
87
|
+
type: {
|
|
88
|
+
type: import("@contractspec/lib.schema").EnumType<[string, string, string, string]>;
|
|
89
|
+
isOptional: false;
|
|
90
|
+
};
|
|
91
|
+
definition: {
|
|
92
|
+
type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
|
|
93
|
+
isOptional: false;
|
|
94
|
+
};
|
|
95
|
+
sql: {
|
|
96
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
97
|
+
isOptional: true;
|
|
98
|
+
};
|
|
99
|
+
metricIds: {
|
|
100
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
101
|
+
isArray: true;
|
|
102
|
+
isOptional: true;
|
|
103
|
+
};
|
|
104
|
+
cacheTtlSeconds: {
|
|
105
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
106
|
+
isOptional: true;
|
|
107
|
+
};
|
|
108
|
+
isShared: {
|
|
109
|
+
type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
|
|
110
|
+
isOptional: true;
|
|
111
|
+
};
|
|
115
112
|
}>;
|
|
116
113
|
/**
|
|
117
114
|
* Input for executing a query.
|
|
118
115
|
*/
|
|
119
|
-
declare const ExecuteQueryInputModel:
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
116
|
+
export declare const ExecuteQueryInputModel: import("@contractspec/lib.schema").SchemaModel<{
|
|
117
|
+
queryId: {
|
|
118
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
119
|
+
isOptional: false;
|
|
120
|
+
};
|
|
121
|
+
parameters: {
|
|
122
|
+
type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
|
|
123
|
+
isOptional: true;
|
|
124
|
+
};
|
|
125
|
+
dateRange: {
|
|
126
|
+
type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
|
|
127
|
+
isOptional: true;
|
|
128
|
+
};
|
|
129
|
+
filters: {
|
|
130
|
+
type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
|
|
131
|
+
isOptional: true;
|
|
132
|
+
};
|
|
133
|
+
forceRefresh: {
|
|
134
|
+
type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
|
|
135
|
+
isOptional: true;
|
|
136
|
+
};
|
|
140
137
|
}>;
|
|
141
|
-
//#endregion
|
|
142
|
-
export { CreateQueryInputModel, ExecuteQueryInputModel, QueryModel, QueryResultModel };
|
|
143
138
|
//# sourceMappingURL=query.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.schema.d.ts","
|
|
1
|
+
{"version":3,"file":"query.schema.d.ts","sourceRoot":"","sources":["../../src/query/query.schema.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAarB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;EASjC,CAAC"}
|
|
@@ -1,157 +1,71 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
// src/query/query.enum.ts
|
|
3
|
+
import { defineEnum } from "@contractspec/lib.schema";
|
|
4
|
+
var QueryTypeEnum = defineEnum("QueryType", [
|
|
5
|
+
"SQL",
|
|
6
|
+
"METRIC",
|
|
7
|
+
"AGGREGATION",
|
|
8
|
+
"CUSTOM"
|
|
9
|
+
]);
|
|
3
10
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
description: {
|
|
20
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
21
|
-
isOptional: true
|
|
22
|
-
},
|
|
23
|
-
type: {
|
|
24
|
-
type: QueryTypeEnum,
|
|
25
|
-
isOptional: false
|
|
26
|
-
},
|
|
27
|
-
definition: {
|
|
28
|
-
type: ScalarTypeEnum.JSON(),
|
|
29
|
-
isOptional: false
|
|
30
|
-
},
|
|
31
|
-
sql: {
|
|
32
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
33
|
-
isOptional: true
|
|
34
|
-
},
|
|
35
|
-
cacheTtlSeconds: {
|
|
36
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
37
|
-
isOptional: false
|
|
38
|
-
},
|
|
39
|
-
isShared: {
|
|
40
|
-
type: ScalarTypeEnum.Boolean(),
|
|
41
|
-
isOptional: false
|
|
42
|
-
},
|
|
43
|
-
createdAt: {
|
|
44
|
-
type: ScalarTypeEnum.DateTime(),
|
|
45
|
-
isOptional: false
|
|
46
|
-
}
|
|
47
|
-
}
|
|
11
|
+
// src/query/query.schema.ts
|
|
12
|
+
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
13
|
+
var QueryModel = defineSchemaModel({
|
|
14
|
+
name: "QueryModel",
|
|
15
|
+
fields: {
|
|
16
|
+
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
17
|
+
name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
18
|
+
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
19
|
+
type: { type: QueryTypeEnum, isOptional: false },
|
|
20
|
+
definition: { type: ScalarTypeEnum.JSON(), isOptional: false },
|
|
21
|
+
sql: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
22
|
+
cacheTtlSeconds: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
|
|
23
|
+
isShared: { type: ScalarTypeEnum.Boolean(), isOptional: false },
|
|
24
|
+
createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
25
|
+
}
|
|
48
26
|
});
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
type: ScalarTypeEnum.JSON(),
|
|
61
|
-
isOptional: false
|
|
62
|
-
},
|
|
63
|
-
columns: {
|
|
64
|
-
type: ScalarTypeEnum.JSON(),
|
|
65
|
-
isOptional: false
|
|
66
|
-
},
|
|
67
|
-
rowCount: {
|
|
68
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
69
|
-
isOptional: false
|
|
70
|
-
},
|
|
71
|
-
executionTimeMs: {
|
|
72
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
73
|
-
isOptional: false
|
|
74
|
-
},
|
|
75
|
-
cachedAt: {
|
|
76
|
-
type: ScalarTypeEnum.DateTime(),
|
|
77
|
-
isOptional: true
|
|
78
|
-
},
|
|
79
|
-
error: {
|
|
80
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
81
|
-
isOptional: true
|
|
82
|
-
}
|
|
83
|
-
}
|
|
27
|
+
var QueryResultModel = defineSchemaModel({
|
|
28
|
+
name: "QueryResultModel",
|
|
29
|
+
fields: {
|
|
30
|
+
queryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
31
|
+
data: { type: ScalarTypeEnum.JSON(), isOptional: false },
|
|
32
|
+
columns: { type: ScalarTypeEnum.JSON(), isOptional: false },
|
|
33
|
+
rowCount: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
|
|
34
|
+
executionTimeMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
|
|
35
|
+
cachedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
36
|
+
error: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
37
|
+
}
|
|
84
38
|
});
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
isOptional: false
|
|
102
|
-
},
|
|
103
|
-
definition: {
|
|
104
|
-
type: ScalarTypeEnum.JSON(),
|
|
105
|
-
isOptional: false
|
|
106
|
-
},
|
|
107
|
-
sql: {
|
|
108
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
109
|
-
isOptional: true
|
|
110
|
-
},
|
|
111
|
-
metricIds: {
|
|
112
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
113
|
-
isArray: true,
|
|
114
|
-
isOptional: true
|
|
115
|
-
},
|
|
116
|
-
cacheTtlSeconds: {
|
|
117
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
118
|
-
isOptional: true
|
|
119
|
-
},
|
|
120
|
-
isShared: {
|
|
121
|
-
type: ScalarTypeEnum.Boolean(),
|
|
122
|
-
isOptional: true
|
|
123
|
-
}
|
|
124
|
-
}
|
|
39
|
+
var CreateQueryInputModel = defineSchemaModel({
|
|
40
|
+
name: "CreateQueryInput",
|
|
41
|
+
fields: {
|
|
42
|
+
name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
43
|
+
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
44
|
+
type: { type: QueryTypeEnum, isOptional: false },
|
|
45
|
+
definition: { type: ScalarTypeEnum.JSON(), isOptional: false },
|
|
46
|
+
sql: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
47
|
+
metricIds: {
|
|
48
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
49
|
+
isArray: true,
|
|
50
|
+
isOptional: true
|
|
51
|
+
},
|
|
52
|
+
cacheTtlSeconds: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
|
|
53
|
+
isShared: { type: ScalarTypeEnum.Boolean(), isOptional: true }
|
|
54
|
+
}
|
|
125
55
|
});
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
},
|
|
136
|
-
parameters: {
|
|
137
|
-
type: ScalarTypeEnum.JSON(),
|
|
138
|
-
isOptional: true
|
|
139
|
-
},
|
|
140
|
-
dateRange: {
|
|
141
|
-
type: ScalarTypeEnum.JSON(),
|
|
142
|
-
isOptional: true
|
|
143
|
-
},
|
|
144
|
-
filters: {
|
|
145
|
-
type: ScalarTypeEnum.JSON(),
|
|
146
|
-
isOptional: true
|
|
147
|
-
},
|
|
148
|
-
forceRefresh: {
|
|
149
|
-
type: ScalarTypeEnum.Boolean(),
|
|
150
|
-
isOptional: true
|
|
151
|
-
}
|
|
152
|
-
}
|
|
56
|
+
var ExecuteQueryInputModel = defineSchemaModel({
|
|
57
|
+
name: "ExecuteQueryInput",
|
|
58
|
+
fields: {
|
|
59
|
+
queryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
60
|
+
parameters: { type: ScalarTypeEnum.JSON(), isOptional: true },
|
|
61
|
+
dateRange: { type: ScalarTypeEnum.JSON(), isOptional: true },
|
|
62
|
+
filters: { type: ScalarTypeEnum.JSON(), isOptional: true },
|
|
63
|
+
forceRefresh: { type: ScalarTypeEnum.Boolean(), isOptional: true }
|
|
64
|
+
}
|
|
153
65
|
});
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
66
|
+
export {
|
|
67
|
+
QueryResultModel,
|
|
68
|
+
QueryModel,
|
|
69
|
+
ExecuteQueryInputModel,
|
|
70
|
+
CreateQueryInputModel
|
|
71
|
+
};
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//#region src/query/query.test-spec.d.ts
|
|
4
|
-
declare const CreateQueryTest: _contractspec_lib_contracts0.TestSpec;
|
|
5
|
-
declare const ExecuteQueryTest: _contractspec_lib_contracts0.TestSpec;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { CreateQueryTest, ExecuteQueryTest };
|
|
1
|
+
export declare const CreateQueryTest: import("@contractspec/lib.contracts").TestSpec;
|
|
2
|
+
export declare const ExecuteQueryTest: import("@contractspec/lib.contracts").TestSpec;
|
|
8
3
|
//# sourceMappingURL=query.test-spec.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.test-spec.d.ts","
|
|
1
|
+
{"version":3,"file":"query.test-spec.d.ts","sourceRoot":"","sources":["../../src/query/query.test-spec.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,gDAqD1B,CAAC;AAEH,eAAO,MAAM,gBAAgB,gDAoD3B,CAAC"}
|