@contractspec/example.analytics-dashboard 1.56.1 → 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 -7
- package/dist/dashboard.feature.d.ts.map +1 -1
- package/dist/dashboard.feature.js +83 -175
- package/dist/datasource/posthog-datasource.d.ts +18 -0
- package/dist/datasource/posthog-datasource.d.ts.map +1 -0
- package/dist/datasource/posthog-datasource.js +290 -0
- 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 +46 -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 +40 -55
- package/dist/handlers/analytics.handlers.d.ts +110 -110
- 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 -2
- package/dist/handlers/index.d.ts.map +1 -0
- package/dist/handlers/index.js +571 -2
- package/dist/handlers/query.handlers.d.ts +9 -0
- package/dist/handlers/query.handlers.d.ts.map +1 -0
- package/dist/handlers/query.handlers.js +295 -0
- package/dist/index.d.ts +12 -12
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1678 -13
- 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 -86
- package/dist/query-engine/index.d.ts.map +1 -1
- package/dist/query-engine/index.js +490 -187
- 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 -15
- 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 +329 -62
- 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/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/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/events.d.ts
CHANGED
|
@@ -1,149 +1,143 @@
|
|
|
1
|
-
|
|
2
|
-
import * as _contractspec_lib_schema77 from "@contractspec/lib.schema";
|
|
3
|
-
|
|
4
|
-
//#region src/events.d.ts
|
|
5
|
-
declare const DashboardCreatedEvent: _contractspec_lib_contracts7.EventSpec<_contractspec_lib_schema77.SchemaModel<{
|
|
6
|
-
dashboardId: {
|
|
7
|
-
type: _contractspec_lib_schema77.FieldType<string, string>;
|
|
8
|
-
isOptional: false;
|
|
9
|
-
};
|
|
10
|
-
title: {
|
|
11
|
-
type: _contractspec_lib_schema77.FieldType<string, string>;
|
|
12
|
-
isOptional: false;
|
|
13
|
-
};
|
|
14
|
-
orgId: {
|
|
15
|
-
type: _contractspec_lib_schema77.FieldType<string, string>;
|
|
16
|
-
isOptional: false;
|
|
17
|
-
};
|
|
18
|
-
createdBy: {
|
|
19
|
-
type: _contractspec_lib_schema77.FieldType<string, string>;
|
|
20
|
-
isOptional: false;
|
|
21
|
-
};
|
|
22
|
-
timestamp: {
|
|
23
|
-
type: _contractspec_lib_schema77.FieldType<Date, string>;
|
|
24
|
-
isOptional: false;
|
|
25
|
-
};
|
|
26
|
-
}>>;
|
|
27
|
-
declare const WidgetAddedEvent: _contractspec_lib_contracts7.EventSpec<_contractspec_lib_schema77.SchemaModel<{
|
|
28
|
-
widgetId: {
|
|
29
|
-
type: _contractspec_lib_schema77.FieldType<string, string>;
|
|
30
|
-
isOptional: false;
|
|
31
|
-
};
|
|
32
|
-
dashboardId: {
|
|
33
|
-
type: _contractspec_lib_schema77.FieldType<string, string>;
|
|
34
|
-
isOptional: false;
|
|
35
|
-
};
|
|
36
|
-
widgetType: {
|
|
37
|
-
type: _contractspec_lib_schema77.FieldType<string, string>;
|
|
38
|
-
isOptional: false;
|
|
39
|
-
};
|
|
40
|
-
orgId: {
|
|
41
|
-
type: _contractspec_lib_schema77.FieldType<string, string>;
|
|
42
|
-
isOptional: false;
|
|
43
|
-
};
|
|
44
|
-
timestamp: {
|
|
45
|
-
type: _contractspec_lib_schema77.FieldType<Date, string>;
|
|
46
|
-
isOptional: false;
|
|
47
|
-
};
|
|
48
|
-
}>>;
|
|
49
|
-
declare const QueryCreatedEvent: _contractspec_lib_contracts7.EventSpec<_contractspec_lib_schema77.SchemaModel<{
|
|
50
|
-
queryId: {
|
|
51
|
-
type: _contractspec_lib_schema77.FieldType<string, string>;
|
|
52
|
-
isOptional: false;
|
|
53
|
-
};
|
|
54
|
-
name: {
|
|
55
|
-
type: _contractspec_lib_schema77.FieldType<string, string>;
|
|
56
|
-
isOptional: false;
|
|
57
|
-
};
|
|
58
|
-
queryType: {
|
|
59
|
-
type: _contractspec_lib_schema77.FieldType<string, string>;
|
|
60
|
-
isOptional: false;
|
|
61
|
-
};
|
|
62
|
-
orgId: {
|
|
63
|
-
type: _contractspec_lib_schema77.FieldType<string, string>;
|
|
64
|
-
isOptional: false;
|
|
65
|
-
};
|
|
66
|
-
createdBy: {
|
|
67
|
-
type: _contractspec_lib_schema77.FieldType<string, string>;
|
|
68
|
-
isOptional: false;
|
|
69
|
-
};
|
|
70
|
-
timestamp: {
|
|
71
|
-
type: _contractspec_lib_schema77.FieldType<Date, string>;
|
|
72
|
-
isOptional: false;
|
|
73
|
-
};
|
|
74
|
-
}>>;
|
|
75
|
-
declare const AnalyticsDashboardEvents: {
|
|
76
|
-
DashboardCreatedEvent: _contractspec_lib_contracts7.EventSpec<_contractspec_lib_schema77.SchemaModel<{
|
|
1
|
+
export declare const DashboardCreatedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
77
2
|
dashboardId: {
|
|
78
|
-
|
|
79
|
-
|
|
3
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
4
|
+
isOptional: false;
|
|
80
5
|
};
|
|
81
6
|
title: {
|
|
82
|
-
|
|
83
|
-
|
|
7
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
8
|
+
isOptional: false;
|
|
84
9
|
};
|
|
85
10
|
orgId: {
|
|
86
|
-
|
|
87
|
-
|
|
11
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
12
|
+
isOptional: false;
|
|
88
13
|
};
|
|
89
14
|
createdBy: {
|
|
90
|
-
|
|
91
|
-
|
|
15
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
16
|
+
isOptional: false;
|
|
92
17
|
};
|
|
93
18
|
timestamp: {
|
|
94
|
-
|
|
95
|
-
|
|
19
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
20
|
+
isOptional: false;
|
|
96
21
|
};
|
|
97
|
-
|
|
98
|
-
|
|
22
|
+
}>>;
|
|
23
|
+
export declare const WidgetAddedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
99
24
|
widgetId: {
|
|
100
|
-
|
|
101
|
-
|
|
25
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
26
|
+
isOptional: false;
|
|
102
27
|
};
|
|
103
28
|
dashboardId: {
|
|
104
|
-
|
|
105
|
-
|
|
29
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
30
|
+
isOptional: false;
|
|
106
31
|
};
|
|
107
32
|
widgetType: {
|
|
108
|
-
|
|
109
|
-
|
|
33
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
34
|
+
isOptional: false;
|
|
110
35
|
};
|
|
111
36
|
orgId: {
|
|
112
|
-
|
|
113
|
-
|
|
37
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
38
|
+
isOptional: false;
|
|
114
39
|
};
|
|
115
40
|
timestamp: {
|
|
116
|
-
|
|
117
|
-
|
|
41
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
42
|
+
isOptional: false;
|
|
118
43
|
};
|
|
119
|
-
|
|
120
|
-
|
|
44
|
+
}>>;
|
|
45
|
+
export declare const QueryCreatedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
121
46
|
queryId: {
|
|
122
|
-
|
|
123
|
-
|
|
47
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
48
|
+
isOptional: false;
|
|
124
49
|
};
|
|
125
50
|
name: {
|
|
126
|
-
|
|
127
|
-
|
|
51
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
52
|
+
isOptional: false;
|
|
128
53
|
};
|
|
129
54
|
queryType: {
|
|
130
|
-
|
|
131
|
-
|
|
55
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
56
|
+
isOptional: false;
|
|
132
57
|
};
|
|
133
58
|
orgId: {
|
|
134
|
-
|
|
135
|
-
|
|
59
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
60
|
+
isOptional: false;
|
|
136
61
|
};
|
|
137
62
|
createdBy: {
|
|
138
|
-
|
|
139
|
-
|
|
63
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
64
|
+
isOptional: false;
|
|
140
65
|
};
|
|
141
66
|
timestamp: {
|
|
142
|
-
|
|
143
|
-
|
|
67
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
68
|
+
isOptional: false;
|
|
144
69
|
};
|
|
145
|
-
|
|
70
|
+
}>>;
|
|
71
|
+
export declare const AnalyticsDashboardEvents: {
|
|
72
|
+
DashboardCreatedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
73
|
+
dashboardId: {
|
|
74
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
75
|
+
isOptional: false;
|
|
76
|
+
};
|
|
77
|
+
title: {
|
|
78
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
79
|
+
isOptional: false;
|
|
80
|
+
};
|
|
81
|
+
orgId: {
|
|
82
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
83
|
+
isOptional: false;
|
|
84
|
+
};
|
|
85
|
+
createdBy: {
|
|
86
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
87
|
+
isOptional: false;
|
|
88
|
+
};
|
|
89
|
+
timestamp: {
|
|
90
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
91
|
+
isOptional: false;
|
|
92
|
+
};
|
|
93
|
+
}>>;
|
|
94
|
+
WidgetAddedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
95
|
+
widgetId: {
|
|
96
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
97
|
+
isOptional: false;
|
|
98
|
+
};
|
|
99
|
+
dashboardId: {
|
|
100
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
101
|
+
isOptional: false;
|
|
102
|
+
};
|
|
103
|
+
widgetType: {
|
|
104
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
105
|
+
isOptional: false;
|
|
106
|
+
};
|
|
107
|
+
orgId: {
|
|
108
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
109
|
+
isOptional: false;
|
|
110
|
+
};
|
|
111
|
+
timestamp: {
|
|
112
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
113
|
+
isOptional: false;
|
|
114
|
+
};
|
|
115
|
+
}>>;
|
|
116
|
+
QueryCreatedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
117
|
+
queryId: {
|
|
118
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
119
|
+
isOptional: false;
|
|
120
|
+
};
|
|
121
|
+
name: {
|
|
122
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
123
|
+
isOptional: false;
|
|
124
|
+
};
|
|
125
|
+
queryType: {
|
|
126
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
127
|
+
isOptional: false;
|
|
128
|
+
};
|
|
129
|
+
orgId: {
|
|
130
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
131
|
+
isOptional: false;
|
|
132
|
+
};
|
|
133
|
+
createdBy: {
|
|
134
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
135
|
+
isOptional: false;
|
|
136
|
+
};
|
|
137
|
+
timestamp: {
|
|
138
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
139
|
+
isOptional: false;
|
|
140
|
+
};
|
|
141
|
+
}>>;
|
|
146
142
|
};
|
|
147
|
-
//#endregion
|
|
148
|
-
export { AnalyticsDashboardEvents, DashboardCreatedEvent, QueryCreatedEvent, WidgetAddedEvent };
|
|
149
143
|
//# sourceMappingURL=events.d.ts.map
|
package/dist/events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAwCA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;GAUhC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;GAU3B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;GAU5B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIpC,CAAC"}
|
package/dist/events.js
CHANGED
|
@@ -1,128 +1,82 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/events.ts
|
|
3
|
+
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
1
4
|
import { defineEvent } from "@contractspec/lib.contracts";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
title: {
|
|
14
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
15
|
-
isOptional: false
|
|
16
|
-
},
|
|
17
|
-
orgId: {
|
|
18
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
19
|
-
isOptional: false
|
|
20
|
-
},
|
|
21
|
-
createdBy: {
|
|
22
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
23
|
-
isOptional: false
|
|
24
|
-
},
|
|
25
|
-
timestamp: {
|
|
26
|
-
type: ScalarTypeEnum.DateTime(),
|
|
27
|
-
isOptional: false
|
|
28
|
-
}
|
|
29
|
-
}
|
|
5
|
+
var DashboardEventPayload = defineSchemaModel({
|
|
6
|
+
name: "DashboardEventPayload",
|
|
7
|
+
description: "Payload for dashboard events",
|
|
8
|
+
fields: {
|
|
9
|
+
dashboardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
10
|
+
title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
11
|
+
orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
12
|
+
createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
13
|
+
timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
14
|
+
}
|
|
30
15
|
});
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
isOptional: false
|
|
42
|
-
},
|
|
43
|
-
widgetType: {
|
|
44
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
45
|
-
isOptional: false
|
|
46
|
-
},
|
|
47
|
-
orgId: {
|
|
48
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
49
|
-
isOptional: false
|
|
50
|
-
},
|
|
51
|
-
timestamp: {
|
|
52
|
-
type: ScalarTypeEnum.DateTime(),
|
|
53
|
-
isOptional: false
|
|
54
|
-
}
|
|
55
|
-
}
|
|
16
|
+
var WidgetEventPayload = defineSchemaModel({
|
|
17
|
+
name: "WidgetEventPayload",
|
|
18
|
+
description: "Payload for widget events",
|
|
19
|
+
fields: {
|
|
20
|
+
widgetId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
21
|
+
dashboardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
22
|
+
widgetType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
23
|
+
orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
24
|
+
timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
25
|
+
}
|
|
56
26
|
});
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
queryType: {
|
|
70
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
71
|
-
isOptional: false
|
|
72
|
-
},
|
|
73
|
-
orgId: {
|
|
74
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
75
|
-
isOptional: false
|
|
76
|
-
},
|
|
77
|
-
createdBy: {
|
|
78
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
79
|
-
isOptional: false
|
|
80
|
-
},
|
|
81
|
-
timestamp: {
|
|
82
|
-
type: ScalarTypeEnum.DateTime(),
|
|
83
|
-
isOptional: false
|
|
84
|
-
}
|
|
85
|
-
}
|
|
27
|
+
var QueryEventPayload = defineSchemaModel({
|
|
28
|
+
name: "QueryEventPayload",
|
|
29
|
+
description: "Payload for query events",
|
|
30
|
+
fields: {
|
|
31
|
+
queryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
32
|
+
name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
33
|
+
queryType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
34
|
+
orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
35
|
+
createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
36
|
+
timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
37
|
+
}
|
|
86
38
|
});
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
39
|
+
var DashboardCreatedEvent = defineEvent({
|
|
40
|
+
meta: {
|
|
41
|
+
key: "analytics.dashboard.created",
|
|
42
|
+
version: "1.0.0",
|
|
43
|
+
description: "A dashboard was created.",
|
|
44
|
+
stability: "stable",
|
|
45
|
+
owners: ["@analytics-team"],
|
|
46
|
+
tags: ["dashboard"]
|
|
47
|
+
},
|
|
48
|
+
payload: DashboardEventPayload
|
|
97
49
|
});
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
50
|
+
var WidgetAddedEvent = defineEvent({
|
|
51
|
+
meta: {
|
|
52
|
+
key: "analytics.widget.added",
|
|
53
|
+
version: "1.0.0",
|
|
54
|
+
description: "A widget was added to a dashboard.",
|
|
55
|
+
stability: "stable",
|
|
56
|
+
owners: ["@analytics-team"],
|
|
57
|
+
tags: ["dashboard"]
|
|
58
|
+
},
|
|
59
|
+
payload: WidgetEventPayload
|
|
108
60
|
});
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
61
|
+
var QueryCreatedEvent = defineEvent({
|
|
62
|
+
meta: {
|
|
63
|
+
key: "analytics.query.created",
|
|
64
|
+
version: "1.0.0",
|
|
65
|
+
description: "A query was created.",
|
|
66
|
+
stability: "stable",
|
|
67
|
+
owners: ["@analytics-team"],
|
|
68
|
+
tags: ["dashboard"]
|
|
69
|
+
},
|
|
70
|
+
payload: QueryEventPayload
|
|
119
71
|
});
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
72
|
+
var AnalyticsDashboardEvents = {
|
|
73
|
+
DashboardCreatedEvent,
|
|
74
|
+
WidgetAddedEvent,
|
|
75
|
+
QueryCreatedEvent
|
|
76
|
+
};
|
|
77
|
+
export {
|
|
78
|
+
WidgetAddedEvent,
|
|
79
|
+
QueryCreatedEvent,
|
|
80
|
+
DashboardCreatedEvent,
|
|
81
|
+
AnalyticsDashboardEvents
|
|
124
82
|
};
|
|
125
|
-
|
|
126
|
-
//#endregion
|
|
127
|
-
export { AnalyticsDashboardEvents, DashboardCreatedEvent, QueryCreatedEvent, WidgetAddedEvent };
|
|
128
|
-
//# sourceMappingURL=events.js.map
|
package/dist/example.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//#region src/example.d.ts
|
|
4
|
-
declare const example: _contractspec_lib_contracts13.ExampleSpec;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { example as default };
|
|
1
|
+
declare const example: import("@contractspec/lib.contracts").ExampleSpec;
|
|
2
|
+
export default example;
|
|
7
3
|
//# sourceMappingURL=example.d.ts.map
|
package/dist/example.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example.d.ts","
|
|
1
|
+
{"version":3,"file":"example.d.ts","sourceRoot":"","sources":["../src/example.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,OAAO,mDAoCX,CAAC;AAEH,eAAe,OAAO,CAAC"}
|
package/dist/example.js
CHANGED
|
@@ -1,58 +1,43 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/example.ts
|
|
1
3
|
import { defineExample } from "@contractspec/lib.contracts";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
sandbox: {
|
|
38
|
-
enabled: true,
|
|
39
|
-
modes: [
|
|
40
|
-
"playground",
|
|
41
|
-
"specs",
|
|
42
|
-
"builder",
|
|
43
|
-
"markdown",
|
|
44
|
-
"evolution"
|
|
45
|
-
]
|
|
46
|
-
},
|
|
47
|
-
studio: {
|
|
48
|
-
enabled: true,
|
|
49
|
-
installable: true
|
|
50
|
-
},
|
|
51
|
-
mcp: { enabled: true }
|
|
52
|
-
}
|
|
4
|
+
var example = defineExample({
|
|
5
|
+
meta: {
|
|
6
|
+
key: "analytics-dashboard",
|
|
7
|
+
version: "1.0.0",
|
|
8
|
+
title: "Analytics Dashboard",
|
|
9
|
+
description: "Tenant-scoped dashboards, widgets, query builder, and scheduled reports (spec-first widgets/queries).",
|
|
10
|
+
kind: "template",
|
|
11
|
+
visibility: "public",
|
|
12
|
+
stability: "experimental",
|
|
13
|
+
owners: ["@platform.core"],
|
|
14
|
+
tags: ["analytics", "dashboards", "bi", "queries"]
|
|
15
|
+
},
|
|
16
|
+
docs: {
|
|
17
|
+
rootDocId: "docs.examples.analytics-dashboard",
|
|
18
|
+
goalDocId: "docs.examples.analytics-dashboard.goal",
|
|
19
|
+
usageDocId: "docs.examples.analytics-dashboard.usage",
|
|
20
|
+
constraintsDocId: "docs.examples.analytics-dashboard.constraints"
|
|
21
|
+
},
|
|
22
|
+
entrypoints: {
|
|
23
|
+
packageName: "@contractspec/example.analytics-dashboard",
|
|
24
|
+
feature: "./feature",
|
|
25
|
+
contracts: "./contracts",
|
|
26
|
+
presentations: "./presentations",
|
|
27
|
+
handlers: "./handlers",
|
|
28
|
+
docs: "./docs"
|
|
29
|
+
},
|
|
30
|
+
surfaces: {
|
|
31
|
+
templates: true,
|
|
32
|
+
sandbox: {
|
|
33
|
+
enabled: true,
|
|
34
|
+
modes: ["playground", "specs", "builder", "markdown", "evolution"]
|
|
35
|
+
},
|
|
36
|
+
studio: { enabled: true, installable: true },
|
|
37
|
+
mcp: { enabled: true }
|
|
38
|
+
}
|
|
53
39
|
});
|
|
54
40
|
var example_default = example;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
//# sourceMappingURL=example.js.map
|
|
41
|
+
export {
|
|
42
|
+
example_default as default
|
|
43
|
+
};
|