@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
package/dist/query/index.js
CHANGED
|
@@ -1,5 +1,160 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
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
|
+
]);
|
|
4
10
|
|
|
5
|
-
|
|
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
|
+
}
|
|
26
|
+
});
|
|
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
|
+
}
|
|
38
|
+
});
|
|
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
|
+
}
|
|
55
|
+
});
|
|
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
|
+
}
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// src/query/query.operation.ts
|
|
68
|
+
import {
|
|
69
|
+
defineCommand,
|
|
70
|
+
defineQuery
|
|
71
|
+
} from "@contractspec/lib.contracts/operations";
|
|
72
|
+
var OWNERS = ["@example.analytics-dashboard"];
|
|
73
|
+
var CreateQueryContract = defineCommand({
|
|
74
|
+
meta: {
|
|
75
|
+
key: "analytics.query.create",
|
|
76
|
+
version: "1.0.0",
|
|
77
|
+
stability: "stable",
|
|
78
|
+
owners: [...OWNERS],
|
|
79
|
+
tags: ["analytics", "query", "create"],
|
|
80
|
+
description: "Create a data query.",
|
|
81
|
+
goal: "Define reusable data queries.",
|
|
82
|
+
context: "Query builder."
|
|
83
|
+
},
|
|
84
|
+
io: { input: CreateQueryInputModel, output: QueryModel },
|
|
85
|
+
policy: { auth: "user" },
|
|
86
|
+
sideEffects: {
|
|
87
|
+
emits: [
|
|
88
|
+
{
|
|
89
|
+
key: "analytics.query.created",
|
|
90
|
+
version: "1.0.0",
|
|
91
|
+
stability: "stable",
|
|
92
|
+
owners: [...OWNERS],
|
|
93
|
+
tags: ["analytics", "query", "created"],
|
|
94
|
+
when: "Query created",
|
|
95
|
+
payload: QueryModel
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
audit: ["analytics.query.created"]
|
|
99
|
+
},
|
|
100
|
+
acceptance: {
|
|
101
|
+
scenarios: [
|
|
102
|
+
{
|
|
103
|
+
key: "create-query-happy-path",
|
|
104
|
+
given: ["User is authenticated"],
|
|
105
|
+
when: ["User submits valid query definition"],
|
|
106
|
+
then: ["Query is created", "QueryCreated event is emitted"]
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
examples: [
|
|
110
|
+
{
|
|
111
|
+
key: "create-sql-query",
|
|
112
|
+
input: {
|
|
113
|
+
name: "Monthly Revenue",
|
|
114
|
+
sql: "SELECT SUM(amount) FROM orders WHERE date >= :startDate"
|
|
115
|
+
},
|
|
116
|
+
output: { id: "query-123", name: "Monthly Revenue", type: "sql" }
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
var ExecuteQueryContract = defineQuery({
|
|
122
|
+
meta: {
|
|
123
|
+
key: "analytics.query.execute",
|
|
124
|
+
version: "1.0.0",
|
|
125
|
+
stability: "stable",
|
|
126
|
+
owners: [...OWNERS],
|
|
127
|
+
tags: ["analytics", "query", "execute"],
|
|
128
|
+
description: "Execute a data query.",
|
|
129
|
+
goal: "Fetch data for visualizations.",
|
|
130
|
+
context: "Dashboard rendering."
|
|
131
|
+
},
|
|
132
|
+
io: { input: ExecuteQueryInputModel, output: QueryResultModel },
|
|
133
|
+
policy: { auth: "user" },
|
|
134
|
+
acceptance: {
|
|
135
|
+
scenarios: [
|
|
136
|
+
{
|
|
137
|
+
key: "execute-query-happy-path",
|
|
138
|
+
given: ["Query exists"],
|
|
139
|
+
when: ["User executes query with parameters"],
|
|
140
|
+
then: ["Query results are returned"]
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
examples: [
|
|
144
|
+
{
|
|
145
|
+
key: "execute-with-params",
|
|
146
|
+
input: { queryId: "query-123", params: { startDate: "2025-01-01" } },
|
|
147
|
+
output: { columns: ["total"], rows: [{ total: 50000 }], rowCount: 1 }
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
export {
|
|
153
|
+
QueryTypeEnum,
|
|
154
|
+
QueryResultModel,
|
|
155
|
+
QueryModel,
|
|
156
|
+
ExecuteQueryInputModel,
|
|
157
|
+
ExecuteQueryContract,
|
|
158
|
+
CreateQueryInputModel,
|
|
159
|
+
CreateQueryContract
|
|
160
|
+
};
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
|
|
2
|
-
|
|
3
|
-
//#region src/query/query.enum.d.ts
|
|
4
1
|
/**
|
|
5
2
|
* Query type enum.
|
|
6
3
|
*/
|
|
7
|
-
declare const QueryTypeEnum:
|
|
8
|
-
//#endregion
|
|
9
|
-
export { QueryTypeEnum };
|
|
4
|
+
export declare const QueryTypeEnum: import("@contractspec/lib.schema").EnumType<[string, string, string, string]>;
|
|
10
5
|
//# sourceMappingURL=query.enum.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.enum.d.ts","
|
|
1
|
+
{"version":3,"file":"query.enum.d.ts","sourceRoot":"","sources":["../../src/query/query.enum.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,aAAa,+EAKxB,CAAC"}
|
package/dist/query/query.enum.js
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/query/query.enum.ts
|
|
1
3
|
import { defineEnum } from "@contractspec/lib.schema";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const QueryTypeEnum = defineEnum("QueryType", [
|
|
8
|
-
"SQL",
|
|
9
|
-
"METRIC",
|
|
10
|
-
"AGGREGATION",
|
|
11
|
-
"CUSTOM"
|
|
4
|
+
var QueryTypeEnum = defineEnum("QueryType", [
|
|
5
|
+
"SQL",
|
|
6
|
+
"METRIC",
|
|
7
|
+
"AGGREGATION",
|
|
8
|
+
"CUSTOM"
|
|
12
9
|
]);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=query.enum.js.map
|
|
10
|
+
export {
|
|
11
|
+
QueryTypeEnum
|
|
12
|
+
};
|
|
@@ -1,181 +1,175 @@
|
|
|
1
|
-
import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
|
|
2
|
-
import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
|
|
3
|
-
|
|
4
|
-
//#region src/query/query.operation.d.ts
|
|
5
1
|
/**
|
|
6
2
|
* Create a data query.
|
|
7
3
|
*/
|
|
8
|
-
declare const CreateQueryContract:
|
|
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
|
-
id: {
|
|
44
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
45
|
-
isOptional: false;
|
|
46
|
-
};
|
|
47
|
-
name: {
|
|
48
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
49
|
-
isOptional: false;
|
|
50
|
-
};
|
|
51
|
-
description: {
|
|
52
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
53
|
-
isOptional: true;
|
|
54
|
-
};
|
|
55
|
-
type: {
|
|
56
|
-
type: _contractspec_lib_schema0.EnumType<[string, string, string, string]>;
|
|
57
|
-
isOptional: false;
|
|
58
|
-
};
|
|
59
|
-
definition: {
|
|
60
|
-
type: _contractspec_lib_schema0.FieldType<unknown, unknown>;
|
|
61
|
-
isOptional: false;
|
|
62
|
-
};
|
|
63
|
-
sql: {
|
|
64
|
-
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
65
|
-
isOptional: true;
|
|
66
|
-
};
|
|
67
|
-
cacheTtlSeconds: {
|
|
68
|
-
type: _contractspec_lib_schema0.FieldType<number, number>;
|
|
69
|
-
isOptional: false;
|
|
70
|
-
};
|
|
71
|
-
isShared: {
|
|
72
|
-
type: _contractspec_lib_schema0.FieldType<boolean, boolean>;
|
|
73
|
-
isOptional: false;
|
|
74
|
-
};
|
|
75
|
-
createdAt: {
|
|
76
|
-
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
77
|
-
isOptional: false;
|
|
78
|
-
};
|
|
79
|
-
}>, {
|
|
80
|
-
key: string;
|
|
81
|
-
version: string;
|
|
82
|
-
stability: string;
|
|
83
|
-
owners: "@example.analytics-dashboard"[];
|
|
84
|
-
tags: string[];
|
|
85
|
-
when: string;
|
|
86
|
-
payload: _contractspec_lib_schema0.SchemaModel<{
|
|
4
|
+
export declare const CreateQueryContract: import("@contractspec/lib.contracts").OperationSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
5
|
+
name: {
|
|
6
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
7
|
+
isOptional: false;
|
|
8
|
+
};
|
|
9
|
+
description: {
|
|
10
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
11
|
+
isOptional: true;
|
|
12
|
+
};
|
|
13
|
+
type: {
|
|
14
|
+
type: import("@contractspec/lib.schema").EnumType<[string, string, string, string]>;
|
|
15
|
+
isOptional: false;
|
|
16
|
+
};
|
|
17
|
+
definition: {
|
|
18
|
+
type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
|
|
19
|
+
isOptional: false;
|
|
20
|
+
};
|
|
21
|
+
sql: {
|
|
22
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
23
|
+
isOptional: true;
|
|
24
|
+
};
|
|
25
|
+
metricIds: {
|
|
26
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
27
|
+
isArray: true;
|
|
28
|
+
isOptional: true;
|
|
29
|
+
};
|
|
30
|
+
cacheTtlSeconds: {
|
|
31
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
32
|
+
isOptional: true;
|
|
33
|
+
};
|
|
34
|
+
isShared: {
|
|
35
|
+
type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
|
|
36
|
+
isOptional: true;
|
|
37
|
+
};
|
|
38
|
+
}>, import("@contractspec/lib.schema").SchemaModel<{
|
|
87
39
|
id: {
|
|
88
|
-
|
|
89
|
-
|
|
40
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
41
|
+
isOptional: false;
|
|
90
42
|
};
|
|
91
43
|
name: {
|
|
92
|
-
|
|
93
|
-
|
|
44
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
45
|
+
isOptional: false;
|
|
94
46
|
};
|
|
95
47
|
description: {
|
|
96
|
-
|
|
97
|
-
|
|
48
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
49
|
+
isOptional: true;
|
|
98
50
|
};
|
|
99
51
|
type: {
|
|
100
|
-
|
|
101
|
-
|
|
52
|
+
type: import("@contractspec/lib.schema").EnumType<[string, string, string, string]>;
|
|
53
|
+
isOptional: false;
|
|
102
54
|
};
|
|
103
55
|
definition: {
|
|
104
|
-
|
|
105
|
-
|
|
56
|
+
type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
|
|
57
|
+
isOptional: false;
|
|
106
58
|
};
|
|
107
59
|
sql: {
|
|
108
|
-
|
|
109
|
-
|
|
60
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
61
|
+
isOptional: true;
|
|
110
62
|
};
|
|
111
63
|
cacheTtlSeconds: {
|
|
112
|
-
|
|
113
|
-
|
|
64
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
65
|
+
isOptional: false;
|
|
114
66
|
};
|
|
115
67
|
isShared: {
|
|
116
|
-
|
|
117
|
-
|
|
68
|
+
type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
|
|
69
|
+
isOptional: false;
|
|
118
70
|
};
|
|
119
71
|
createdAt: {
|
|
120
|
-
|
|
121
|
-
|
|
72
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
73
|
+
isOptional: false;
|
|
122
74
|
};
|
|
123
|
-
|
|
75
|
+
}>, {
|
|
76
|
+
key: string;
|
|
77
|
+
version: string;
|
|
78
|
+
stability: string;
|
|
79
|
+
owners: "@example.analytics-dashboard"[];
|
|
80
|
+
tags: string[];
|
|
81
|
+
when: string;
|
|
82
|
+
payload: import("@contractspec/lib.schema").SchemaModel<{
|
|
83
|
+
id: {
|
|
84
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
85
|
+
isOptional: false;
|
|
86
|
+
};
|
|
87
|
+
name: {
|
|
88
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
89
|
+
isOptional: false;
|
|
90
|
+
};
|
|
91
|
+
description: {
|
|
92
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
93
|
+
isOptional: true;
|
|
94
|
+
};
|
|
95
|
+
type: {
|
|
96
|
+
type: import("@contractspec/lib.schema").EnumType<[string, string, string, string]>;
|
|
97
|
+
isOptional: false;
|
|
98
|
+
};
|
|
99
|
+
definition: {
|
|
100
|
+
type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
|
|
101
|
+
isOptional: false;
|
|
102
|
+
};
|
|
103
|
+
sql: {
|
|
104
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
105
|
+
isOptional: true;
|
|
106
|
+
};
|
|
107
|
+
cacheTtlSeconds: {
|
|
108
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
109
|
+
isOptional: false;
|
|
110
|
+
};
|
|
111
|
+
isShared: {
|
|
112
|
+
type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
|
|
113
|
+
isOptional: false;
|
|
114
|
+
};
|
|
115
|
+
createdAt: {
|
|
116
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
117
|
+
isOptional: false;
|
|
118
|
+
};
|
|
119
|
+
}>;
|
|
124
120
|
}[]>;
|
|
125
121
|
/**
|
|
126
122
|
* Execute a data query.
|
|
127
123
|
*/
|
|
128
|
-
declare const ExecuteQueryContract:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}>,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
124
|
+
export declare const ExecuteQueryContract: import("@contractspec/lib.contracts").OperationSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
125
|
+
queryId: {
|
|
126
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
127
|
+
isOptional: false;
|
|
128
|
+
};
|
|
129
|
+
parameters: {
|
|
130
|
+
type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
|
|
131
|
+
isOptional: true;
|
|
132
|
+
};
|
|
133
|
+
dateRange: {
|
|
134
|
+
type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
|
|
135
|
+
isOptional: true;
|
|
136
|
+
};
|
|
137
|
+
filters: {
|
|
138
|
+
type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
|
|
139
|
+
isOptional: true;
|
|
140
|
+
};
|
|
141
|
+
forceRefresh: {
|
|
142
|
+
type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
|
|
143
|
+
isOptional: true;
|
|
144
|
+
};
|
|
145
|
+
}>, import("@contractspec/lib.schema").SchemaModel<{
|
|
146
|
+
queryId: {
|
|
147
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
148
|
+
isOptional: false;
|
|
149
|
+
};
|
|
150
|
+
data: {
|
|
151
|
+
type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
|
|
152
|
+
isOptional: false;
|
|
153
|
+
};
|
|
154
|
+
columns: {
|
|
155
|
+
type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
|
|
156
|
+
isOptional: false;
|
|
157
|
+
};
|
|
158
|
+
rowCount: {
|
|
159
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
160
|
+
isOptional: false;
|
|
161
|
+
};
|
|
162
|
+
executionTimeMs: {
|
|
163
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
164
|
+
isOptional: false;
|
|
165
|
+
};
|
|
166
|
+
cachedAt: {
|
|
167
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
168
|
+
isOptional: true;
|
|
169
|
+
};
|
|
170
|
+
error: {
|
|
171
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
172
|
+
isOptional: true;
|
|
173
|
+
};
|
|
178
174
|
}>, undefined>;
|
|
179
|
-
//#endregion
|
|
180
|
-
export { CreateQueryContract, ExecuteQueryContract };
|
|
181
175
|
//# sourceMappingURL=query.operation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.operation.d.ts","
|
|
1
|
+
{"version":3,"file":"query.operation.d.ts","sourceRoot":"","sources":["../../src/query/query.operation.ts"],"names":[],"mappings":"AAaA;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+C9B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8B/B,CAAC"}
|