@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.
Files changed (171) hide show
  1. package/dist/browser/dashboard/dashboard.enum.js +34 -0
  2. package/dist/browser/dashboard/dashboard.operation.js +289 -0
  3. package/dist/browser/dashboard/dashboard.presentation.js +197 -0
  4. package/dist/browser/dashboard/dashboard.schema.js +126 -0
  5. package/dist/browser/dashboard/dashboard.test-spec.js +213 -0
  6. package/dist/browser/dashboard/index.js +299 -0
  7. package/dist/browser/dashboard.feature.js +84 -0
  8. package/dist/browser/datasource/posthog-datasource.js +289 -0
  9. package/dist/browser/docs/analytics-dashboard.docblock.js +103 -0
  10. package/dist/browser/docs/index.js +103 -0
  11. package/dist/browser/events.js +81 -0
  12. package/dist/browser/example.js +42 -0
  13. package/dist/browser/handlers/analytics.handlers.js +278 -0
  14. package/dist/browser/handlers/index.js +571 -0
  15. package/dist/browser/handlers/query.handlers.js +294 -0
  16. package/dist/browser/index.js +1677 -0
  17. package/dist/browser/query/index.js +159 -0
  18. package/dist/browser/query/query.enum.js +11 -0
  19. package/dist/browser/query/query.operation.js +154 -0
  20. package/dist/browser/query/query.presentation.js +119 -0
  21. package/dist/browser/query/query.schema.js +70 -0
  22. package/dist/browser/query/query.test-spec.js +113 -0
  23. package/dist/browser/query-engine/index.js +491 -0
  24. package/dist/browser/seeders/index.js +20 -0
  25. package/dist/browser/ui/AnalyticsDashboard.js +394 -0
  26. package/dist/browser/ui/hooks/index.js +69 -0
  27. package/dist/browser/ui/hooks/useAnalyticsData.js +66 -0
  28. package/dist/browser/ui/index.js +671 -0
  29. package/dist/browser/ui/renderers/analytics.markdown.js +275 -0
  30. package/dist/browser/ui/renderers/index.js +275 -0
  31. package/dist/dashboard/dashboard.enum.d.ts +3 -8
  32. package/dist/dashboard/dashboard.enum.d.ts.map +1 -1
  33. package/dist/dashboard/dashboard.enum.js +31 -39
  34. package/dist/dashboard/dashboard.operation.d.ts +444 -450
  35. package/dist/dashboard/dashboard.operation.d.ts.map +1 -1
  36. package/dist/dashboard/dashboard.operation.js +284 -207
  37. package/dist/dashboard/dashboard.presentation.d.ts +3 -8
  38. package/dist/dashboard/dashboard.presentation.d.ts.map +1 -1
  39. package/dist/dashboard/dashboard.presentation.js +193 -85
  40. package/dist/dashboard/dashboard.schema.d.ts +289 -294
  41. package/dist/dashboard/dashboard.schema.d.ts.map +1 -1
  42. package/dist/dashboard/dashboard.schema.js +119 -228
  43. package/dist/dashboard/dashboard.test-spec.d.ts +4 -9
  44. package/dist/dashboard/dashboard.test-spec.d.ts.map +1 -1
  45. package/dist/dashboard/dashboard.test-spec.js +209 -228
  46. package/dist/dashboard/index.d.ts +7 -4
  47. package/dist/dashboard/index.d.ts.map +1 -0
  48. package/dist/dashboard/index.js +299 -4
  49. package/dist/dashboard.feature.d.ts +1 -7
  50. package/dist/dashboard.feature.d.ts.map +1 -1
  51. package/dist/dashboard.feature.js +83 -175
  52. package/dist/datasource/posthog-datasource.d.ts +18 -0
  53. package/dist/datasource/posthog-datasource.d.ts.map +1 -0
  54. package/dist/datasource/posthog-datasource.js +290 -0
  55. package/dist/docs/analytics-dashboard.docblock.d.ts +2 -1
  56. package/dist/docs/analytics-dashboard.docblock.d.ts.map +1 -0
  57. package/dist/docs/analytics-dashboard.docblock.js +46 -56
  58. package/dist/docs/index.d.ts +2 -1
  59. package/dist/docs/index.d.ts.map +1 -0
  60. package/dist/docs/index.js +104 -1
  61. package/dist/events.d.ts +109 -115
  62. package/dist/events.d.ts.map +1 -1
  63. package/dist/events.js +74 -120
  64. package/dist/example.d.ts +2 -6
  65. package/dist/example.d.ts.map +1 -1
  66. package/dist/example.js +40 -55
  67. package/dist/handlers/analytics.handlers.d.ts +110 -110
  68. package/dist/handlers/analytics.handlers.d.ts.map +1 -1
  69. package/dist/handlers/analytics.handlers.js +267 -298
  70. package/dist/handlers/index.d.ts +3 -2
  71. package/dist/handlers/index.d.ts.map +1 -0
  72. package/dist/handlers/index.js +571 -2
  73. package/dist/handlers/query.handlers.d.ts +9 -0
  74. package/dist/handlers/query.handlers.d.ts.map +1 -0
  75. package/dist/handlers/query.handlers.js +295 -0
  76. package/dist/index.d.ts +12 -12
  77. package/dist/index.d.ts.map +1 -0
  78. package/dist/index.js +1678 -13
  79. package/dist/node/dashboard/dashboard.enum.js +34 -0
  80. package/dist/node/dashboard/dashboard.operation.js +289 -0
  81. package/dist/node/dashboard/dashboard.presentation.js +197 -0
  82. package/dist/node/dashboard/dashboard.schema.js +126 -0
  83. package/dist/node/dashboard/dashboard.test-spec.js +213 -0
  84. package/dist/node/dashboard/index.js +299 -0
  85. package/dist/node/dashboard.feature.js +84 -0
  86. package/dist/node/datasource/posthog-datasource.js +289 -0
  87. package/dist/node/docs/analytics-dashboard.docblock.js +103 -0
  88. package/dist/node/docs/index.js +103 -0
  89. package/dist/node/events.js +81 -0
  90. package/dist/node/example.js +42 -0
  91. package/dist/node/handlers/analytics.handlers.js +278 -0
  92. package/dist/node/handlers/index.js +571 -0
  93. package/dist/node/handlers/query.handlers.js +294 -0
  94. package/dist/node/index.js +1677 -0
  95. package/dist/node/query/index.js +159 -0
  96. package/dist/node/query/query.enum.js +11 -0
  97. package/dist/node/query/query.operation.js +154 -0
  98. package/dist/node/query/query.presentation.js +119 -0
  99. package/dist/node/query/query.schema.js +70 -0
  100. package/dist/node/query/query.test-spec.js +113 -0
  101. package/dist/node/query-engine/index.js +491 -0
  102. package/dist/node/seeders/index.js +20 -0
  103. package/dist/node/ui/AnalyticsDashboard.js +394 -0
  104. package/dist/node/ui/hooks/index.js +69 -0
  105. package/dist/node/ui/hooks/useAnalyticsData.js +66 -0
  106. package/dist/node/ui/index.js +671 -0
  107. package/dist/node/ui/renderers/analytics.markdown.js +275 -0
  108. package/dist/node/ui/renderers/index.js +275 -0
  109. package/dist/query/index.d.ts +7 -4
  110. package/dist/query/index.d.ts.map +1 -0
  111. package/dist/query/index.js +159 -4
  112. package/dist/query/query.enum.d.ts +1 -6
  113. package/dist/query/query.enum.d.ts.map +1 -1
  114. package/dist/query/query.enum.js +10 -14
  115. package/dist/query/query.operation.d.ts +148 -154
  116. package/dist/query/query.operation.d.ts.map +1 -1
  117. package/dist/query/query.operation.js +151 -109
  118. package/dist/query/query.presentation.d.ts +2 -7
  119. package/dist/query/query.presentation.d.ts.map +1 -1
  120. package/dist/query/query.presentation.js +116 -56
  121. package/dist/query/query.schema.d.ts +121 -126
  122. package/dist/query/query.schema.d.ts.map +1 -1
  123. package/dist/query/query.schema.js +66 -152
  124. package/dist/query/query.test-spec.d.ts +2 -7
  125. package/dist/query/query.test-spec.d.ts.map +1 -1
  126. package/dist/query/query.test-spec.js +111 -121
  127. package/dist/query-engine/index.d.ts +84 -86
  128. package/dist/query-engine/index.d.ts.map +1 -1
  129. package/dist/query-engine/index.js +490 -187
  130. package/dist/seeders/index.d.ts +4 -8
  131. package/dist/seeders/index.d.ts.map +1 -1
  132. package/dist/seeders/index.js +18 -16
  133. package/dist/ui/AnalyticsDashboard.d.ts +1 -6
  134. package/dist/ui/AnalyticsDashboard.d.ts.map +1 -1
  135. package/dist/ui/AnalyticsDashboard.js +389 -259
  136. package/dist/ui/hooks/index.d.ts +2 -2
  137. package/dist/ui/hooks/index.d.ts.map +1 -0
  138. package/dist/ui/hooks/index.js +69 -4
  139. package/dist/ui/hooks/useAnalyticsData.d.ts +16 -20
  140. package/dist/ui/hooks/useAnalyticsData.d.ts.map +1 -1
  141. package/dist/ui/hooks/useAnalyticsData.js +63 -69
  142. package/dist/ui/index.d.ts +7 -6
  143. package/dist/ui/index.d.ts.map +1 -0
  144. package/dist/ui/index.js +671 -5
  145. package/dist/ui/renderers/analytics.markdown.d.ts +13 -15
  146. package/dist/ui/renderers/analytics.markdown.d.ts.map +1 -1
  147. package/dist/ui/renderers/analytics.markdown.js +266 -254
  148. package/dist/ui/renderers/index.d.ts +2 -2
  149. package/dist/ui/renderers/index.d.ts.map +1 -0
  150. package/dist/ui/renderers/index.js +275 -2
  151. package/package.json +329 -62
  152. package/dist/dashboard/dashboard.enum.js.map +0 -1
  153. package/dist/dashboard/dashboard.operation.js.map +0 -1
  154. package/dist/dashboard/dashboard.presentation.js.map +0 -1
  155. package/dist/dashboard/dashboard.schema.js.map +0 -1
  156. package/dist/dashboard/dashboard.test-spec.js.map +0 -1
  157. package/dist/dashboard.feature.js.map +0 -1
  158. package/dist/docs/analytics-dashboard.docblock.js.map +0 -1
  159. package/dist/events.js.map +0 -1
  160. package/dist/example.js.map +0 -1
  161. package/dist/handlers/analytics.handlers.js.map +0 -1
  162. package/dist/query/query.enum.js.map +0 -1
  163. package/dist/query/query.operation.js.map +0 -1
  164. package/dist/query/query.presentation.js.map +0 -1
  165. package/dist/query/query.schema.js.map +0 -1
  166. package/dist/query/query.test-spec.js.map +0 -1
  167. package/dist/query-engine/index.js.map +0 -1
  168. package/dist/seeders/index.js.map +0 -1
  169. package/dist/ui/AnalyticsDashboard.js.map +0 -1
  170. package/dist/ui/hooks/useAnalyticsData.js.map +0 -1
  171. package/dist/ui/renderers/analytics.markdown.js.map +0 -1
package/dist/events.d.ts CHANGED
@@ -1,149 +1,143 @@
1
- import * as _contractspec_lib_contracts7 from "@contractspec/lib.contracts";
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
- type: _contractspec_lib_schema77.FieldType<string, string>;
79
- isOptional: false;
3
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
4
+ isOptional: false;
80
5
  };
81
6
  title: {
82
- type: _contractspec_lib_schema77.FieldType<string, string>;
83
- isOptional: false;
7
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
8
+ isOptional: false;
84
9
  };
85
10
  orgId: {
86
- type: _contractspec_lib_schema77.FieldType<string, string>;
87
- isOptional: false;
11
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
12
+ isOptional: false;
88
13
  };
89
14
  createdBy: {
90
- type: _contractspec_lib_schema77.FieldType<string, string>;
91
- isOptional: false;
15
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
16
+ isOptional: false;
92
17
  };
93
18
  timestamp: {
94
- type: _contractspec_lib_schema77.FieldType<Date, string>;
95
- isOptional: false;
19
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
20
+ isOptional: false;
96
21
  };
97
- }>>;
98
- WidgetAddedEvent: _contractspec_lib_contracts7.EventSpec<_contractspec_lib_schema77.SchemaModel<{
22
+ }>>;
23
+ export declare const WidgetAddedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
99
24
  widgetId: {
100
- type: _contractspec_lib_schema77.FieldType<string, string>;
101
- isOptional: false;
25
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
26
+ isOptional: false;
102
27
  };
103
28
  dashboardId: {
104
- type: _contractspec_lib_schema77.FieldType<string, string>;
105
- isOptional: false;
29
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
30
+ isOptional: false;
106
31
  };
107
32
  widgetType: {
108
- type: _contractspec_lib_schema77.FieldType<string, string>;
109
- isOptional: false;
33
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
34
+ isOptional: false;
110
35
  };
111
36
  orgId: {
112
- type: _contractspec_lib_schema77.FieldType<string, string>;
113
- isOptional: false;
37
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
38
+ isOptional: false;
114
39
  };
115
40
  timestamp: {
116
- type: _contractspec_lib_schema77.FieldType<Date, string>;
117
- isOptional: false;
41
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
42
+ isOptional: false;
118
43
  };
119
- }>>;
120
- QueryCreatedEvent: _contractspec_lib_contracts7.EventSpec<_contractspec_lib_schema77.SchemaModel<{
44
+ }>>;
45
+ export declare const QueryCreatedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
121
46
  queryId: {
122
- type: _contractspec_lib_schema77.FieldType<string, string>;
123
- isOptional: false;
47
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
48
+ isOptional: false;
124
49
  };
125
50
  name: {
126
- type: _contractspec_lib_schema77.FieldType<string, string>;
127
- isOptional: false;
51
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
52
+ isOptional: false;
128
53
  };
129
54
  queryType: {
130
- type: _contractspec_lib_schema77.FieldType<string, string>;
131
- isOptional: false;
55
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
56
+ isOptional: false;
132
57
  };
133
58
  orgId: {
134
- type: _contractspec_lib_schema77.FieldType<string, string>;
135
- isOptional: false;
59
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
60
+ isOptional: false;
136
61
  };
137
62
  createdBy: {
138
- type: _contractspec_lib_schema77.FieldType<string, string>;
139
- isOptional: false;
63
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
64
+ isOptional: false;
140
65
  };
141
66
  timestamp: {
142
- type: _contractspec_lib_schema77.FieldType<Date, string>;
143
- isOptional: false;
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
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","names":[],"sources":["../src/events.ts"],"sourcesContent":[],"mappings":";;;;cAwCa,uBAAqB,4BAAA,CAAA,qCAAA;;UAUhC,0BAAA,CAAA;;EAVW,CAAA;EAUX,KAAA,EAAA;;;;;;;EAVgC,CAAA;EAAA,SAAA,EAAA;IAYrB,IAAA,sCAUX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;AAV2B,cAAhB,gBAAgB,EAAA,4BAAA,CAAA,SAAA,4BAAA,WAAA,CAAA;EAAA,QAAA,EAAA;IAYhB,IAAA,EAFX,0BAAA,CAAA,SAYA,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;8CAV4B,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAAA,CAAA;EAYjB,KAAA,EAAA;IAIZ,IAAA,sCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;cAhBY,mBAAiB,4BAAA,CAAA,qCAAA;;UAU5B,0BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;cAEW;;;YAIZ,0BAAA,CAAA"}
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
- import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
3
-
4
- //#region src/events.ts
5
- const DashboardEventPayload = defineSchemaModel({
6
- name: "DashboardEventPayload",
7
- description: "Payload for dashboard events",
8
- fields: {
9
- dashboardId: {
10
- type: ScalarTypeEnum.String_unsecure(),
11
- isOptional: false
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
- const WidgetEventPayload = defineSchemaModel({
32
- name: "WidgetEventPayload",
33
- description: "Payload for widget events",
34
- fields: {
35
- widgetId: {
36
- type: ScalarTypeEnum.String_unsecure(),
37
- isOptional: false
38
- },
39
- dashboardId: {
40
- type: ScalarTypeEnum.String_unsecure(),
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
- const QueryEventPayload = defineSchemaModel({
58
- name: "QueryEventPayload",
59
- description: "Payload for query events",
60
- fields: {
61
- queryId: {
62
- type: ScalarTypeEnum.String_unsecure(),
63
- isOptional: false
64
- },
65
- name: {
66
- type: ScalarTypeEnum.String_unsecure(),
67
- isOptional: false
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
- const DashboardCreatedEvent = defineEvent({
88
- meta: {
89
- key: "analytics.dashboard.created",
90
- version: "1.0.0",
91
- description: "A dashboard was created.",
92
- stability: "stable",
93
- owners: ["@analytics-team"],
94
- tags: ["dashboard"]
95
- },
96
- payload: DashboardEventPayload
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
- const WidgetAddedEvent = defineEvent({
99
- meta: {
100
- key: "analytics.widget.added",
101
- version: "1.0.0",
102
- description: "A widget was added to a dashboard.",
103
- stability: "stable",
104
- owners: ["@analytics-team"],
105
- tags: ["dashboard"]
106
- },
107
- payload: WidgetEventPayload
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
- const QueryCreatedEvent = defineEvent({
110
- meta: {
111
- key: "analytics.query.created",
112
- version: "1.0.0",
113
- description: "A query was created.",
114
- stability: "stable",
115
- owners: ["@analytics-team"],
116
- tags: ["dashboard"]
117
- },
118
- payload: QueryEventPayload
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
- const AnalyticsDashboardEvents = {
121
- DashboardCreatedEvent,
122
- WidgetAddedEvent,
123
- QueryCreatedEvent
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
- import * as _contractspec_lib_contracts13 from "@contractspec/lib.contracts";
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
@@ -1 +1 @@
1
- {"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";;;cAEM,SAoCJ,6BAAA,CApCW"}
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
- //#region src/example.ts
4
- const 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: [
15
- "analytics",
16
- "dashboards",
17
- "bi",
18
- "queries"
19
- ]
20
- },
21
- docs: {
22
- rootDocId: "docs.examples.analytics-dashboard",
23
- goalDocId: "docs.examples.analytics-dashboard.goal",
24
- usageDocId: "docs.examples.analytics-dashboard.usage",
25
- constraintsDocId: "docs.examples.analytics-dashboard.constraints"
26
- },
27
- entrypoints: {
28
- packageName: "@contractspec/example.analytics-dashboard",
29
- feature: "./feature",
30
- contracts: "./contracts",
31
- presentations: "./presentations",
32
- handlers: "./handlers",
33
- docs: "./docs"
34
- },
35
- surfaces: {
36
- templates: true,
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
- //#endregion
57
- export { example_default as default };
58
- //# sourceMappingURL=example.js.map
41
+ export {
42
+ example_default as default
43
+ };