@contractspec/example.analytics-dashboard 0.0.0-canary-20260113170453

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 (98) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +281 -0
  3. package/dist/dashboard/dashboard.enum.d.ts +18 -0
  4. package/dist/dashboard/dashboard.enum.d.ts.map +1 -0
  5. package/dist/dashboard/dashboard.enum.js +43 -0
  6. package/dist/dashboard/dashboard.enum.js.map +1 -0
  7. package/dist/dashboard/dashboard.operation.d.ts +537 -0
  8. package/dist/dashboard/dashboard.operation.d.ts.map +1 -0
  9. package/dist/dashboard/dashboard.operation.js +213 -0
  10. package/dist/dashboard/dashboard.operation.js.map +1 -0
  11. package/dist/dashboard/dashboard.presentation.d.ts +9 -0
  12. package/dist/dashboard/dashboard.presentation.d.ts.map +1 -0
  13. package/dist/dashboard/dashboard.presentation.js +90 -0
  14. package/dist/dashboard/dashboard.presentation.js.map +1 -0
  15. package/dist/dashboard/dashboard.schema.d.ts +333 -0
  16. package/dist/dashboard/dashboard.schema.d.ts.map +1 -0
  17. package/dist/dashboard/dashboard.schema.js +236 -0
  18. package/dist/dashboard/dashboard.schema.js.map +1 -0
  19. package/dist/dashboard/dashboard.test-spec.d.ts +10 -0
  20. package/dist/dashboard/dashboard.test-spec.d.ts.map +1 -0
  21. package/dist/dashboard/dashboard.test-spec.js +233 -0
  22. package/dist/dashboard/dashboard.test-spec.js.map +1 -0
  23. package/dist/dashboard/index.d.ts +4 -0
  24. package/dist/dashboard/index.js +5 -0
  25. package/dist/dashboard.feature.d.ts +17 -0
  26. package/dist/dashboard.feature.d.ts.map +1 -0
  27. package/dist/dashboard.feature.js +177 -0
  28. package/dist/dashboard.feature.js.map +1 -0
  29. package/dist/docs/analytics-dashboard.docblock.d.ts +1 -0
  30. package/dist/docs/analytics-dashboard.docblock.js +114 -0
  31. package/dist/docs/analytics-dashboard.docblock.js.map +1 -0
  32. package/dist/docs/index.d.ts +1 -0
  33. package/dist/docs/index.js +1 -0
  34. package/dist/events.d.ts +149 -0
  35. package/dist/events.d.ts.map +1 -0
  36. package/dist/events.js +128 -0
  37. package/dist/events.js.map +1 -0
  38. package/dist/example.d.ts +7 -0
  39. package/dist/example.d.ts.map +1 -0
  40. package/dist/example.js +58 -0
  41. package/dist/example.js.map +1 -0
  42. package/dist/handlers/analytics.handlers.d.ts +122 -0
  43. package/dist/handlers/analytics.handlers.d.ts.map +1 -0
  44. package/dist/handlers/analytics.handlers.js +310 -0
  45. package/dist/handlers/analytics.handlers.js.map +1 -0
  46. package/dist/handlers/index.d.ts +2 -0
  47. package/dist/handlers/index.js +3 -0
  48. package/dist/index.d.ts +12 -0
  49. package/dist/index.js +13 -0
  50. package/dist/query/index.d.ts +4 -0
  51. package/dist/query/index.js +5 -0
  52. package/dist/query/query.enum.d.ts +10 -0
  53. package/dist/query/query.enum.d.ts.map +1 -0
  54. package/dist/query/query.enum.js +16 -0
  55. package/dist/query/query.enum.js.map +1 -0
  56. package/dist/query/query.operation.d.ts +181 -0
  57. package/dist/query/query.operation.d.ts.map +1 -0
  58. package/dist/query/query.operation.js +113 -0
  59. package/dist/query/query.operation.js.map +1 -0
  60. package/dist/query/query.presentation.d.ts +8 -0
  61. package/dist/query/query.presentation.d.ts.map +1 -0
  62. package/dist/query/query.presentation.js +60 -0
  63. package/dist/query/query.presentation.js.map +1 -0
  64. package/dist/query/query.schema.d.ts +143 -0
  65. package/dist/query/query.schema.d.ts.map +1 -0
  66. package/dist/query/query.schema.js +157 -0
  67. package/dist/query/query.schema.js.map +1 -0
  68. package/dist/query/query.test-spec.d.ts +8 -0
  69. package/dist/query/query.test-spec.d.ts.map +1 -0
  70. package/dist/query/query.test-spec.js +124 -0
  71. package/dist/query/query.test-spec.js.map +1 -0
  72. package/dist/query-engine/index.d.ts +106 -0
  73. package/dist/query-engine/index.d.ts.map +1 -0
  74. package/dist/query-engine/index.js +189 -0
  75. package/dist/query-engine/index.js.map +1 -0
  76. package/dist/seeders/index.d.ts +10 -0
  77. package/dist/seeders/index.d.ts.map +1 -0
  78. package/dist/seeders/index.js +19 -0
  79. package/dist/seeders/index.js.map +1 -0
  80. package/dist/ui/AnalyticsDashboard.d.ts +7 -0
  81. package/dist/ui/AnalyticsDashboard.d.ts.map +1 -0
  82. package/dist/ui/AnalyticsDashboard.js +265 -0
  83. package/dist/ui/AnalyticsDashboard.js.map +1 -0
  84. package/dist/ui/hooks/index.d.ts +2 -0
  85. package/dist/ui/hooks/index.js +5 -0
  86. package/dist/ui/hooks/useAnalyticsData.d.ts +23 -0
  87. package/dist/ui/hooks/useAnalyticsData.d.ts.map +1 -0
  88. package/dist/ui/hooks/useAnalyticsData.js +73 -0
  89. package/dist/ui/hooks/useAnalyticsData.js.map +1 -0
  90. package/dist/ui/index.d.ts +6 -0
  91. package/dist/ui/index.js +6 -0
  92. package/dist/ui/renderers/analytics.markdown.d.ts +28 -0
  93. package/dist/ui/renderers/analytics.markdown.d.ts.map +1 -0
  94. package/dist/ui/renderers/analytics.markdown.js +264 -0
  95. package/dist/ui/renderers/analytics.markdown.js.map +1 -0
  96. package/dist/ui/renderers/index.d.ts +2 -0
  97. package/dist/ui/renderers/index.js +3 -0
  98. package/package.json +101 -0
@@ -0,0 +1,236 @@
1
+ import { DashboardStatusEnum, RefreshIntervalEnum, WidgetTypeEnum } from "./dashboard.enum.js";
2
+ import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
3
+
4
+ //#region src/dashboard/dashboard.schema.ts
5
+ /**
6
+ * A dashboard widget.
7
+ */
8
+ const WidgetModel = defineSchemaModel({
9
+ name: "WidgetModel",
10
+ fields: {
11
+ id: {
12
+ type: ScalarTypeEnum.String_unsecure(),
13
+ isOptional: false
14
+ },
15
+ dashboardId: {
16
+ type: ScalarTypeEnum.String_unsecure(),
17
+ isOptional: false
18
+ },
19
+ name: {
20
+ type: ScalarTypeEnum.String_unsecure(),
21
+ isOptional: false
22
+ },
23
+ type: {
24
+ type: WidgetTypeEnum,
25
+ isOptional: false
26
+ },
27
+ gridX: {
28
+ type: ScalarTypeEnum.Int_unsecure(),
29
+ isOptional: false
30
+ },
31
+ gridY: {
32
+ type: ScalarTypeEnum.Int_unsecure(),
33
+ isOptional: false
34
+ },
35
+ gridWidth: {
36
+ type: ScalarTypeEnum.Int_unsecure(),
37
+ isOptional: false
38
+ },
39
+ gridHeight: {
40
+ type: ScalarTypeEnum.Int_unsecure(),
41
+ isOptional: false
42
+ },
43
+ queryId: {
44
+ type: ScalarTypeEnum.String_unsecure(),
45
+ isOptional: true
46
+ },
47
+ config: {
48
+ type: ScalarTypeEnum.JSON(),
49
+ isOptional: true
50
+ }
51
+ }
52
+ });
53
+ /**
54
+ * An analytics dashboard.
55
+ */
56
+ const DashboardModel = defineSchemaModel({
57
+ name: "DashboardModel",
58
+ fields: {
59
+ id: {
60
+ type: ScalarTypeEnum.String_unsecure(),
61
+ isOptional: false
62
+ },
63
+ name: {
64
+ type: ScalarTypeEnum.String_unsecure(),
65
+ isOptional: false
66
+ },
67
+ slug: {
68
+ type: ScalarTypeEnum.String_unsecure(),
69
+ isOptional: false
70
+ },
71
+ description: {
72
+ type: ScalarTypeEnum.String_unsecure(),
73
+ isOptional: true
74
+ },
75
+ status: {
76
+ type: DashboardStatusEnum,
77
+ isOptional: false
78
+ },
79
+ refreshInterval: {
80
+ type: RefreshIntervalEnum,
81
+ isOptional: false
82
+ },
83
+ isPublic: {
84
+ type: ScalarTypeEnum.Boolean(),
85
+ isOptional: false
86
+ },
87
+ widgets: {
88
+ type: WidgetModel,
89
+ isArray: true,
90
+ isOptional: true
91
+ },
92
+ createdAt: {
93
+ type: ScalarTypeEnum.DateTime(),
94
+ isOptional: false
95
+ }
96
+ }
97
+ });
98
+ /**
99
+ * Input for creating a dashboard.
100
+ */
101
+ const CreateDashboardInputModel = defineSchemaModel({
102
+ name: "CreateDashboardInput",
103
+ fields: {
104
+ name: {
105
+ type: ScalarTypeEnum.NonEmptyString(),
106
+ isOptional: false
107
+ },
108
+ slug: {
109
+ type: ScalarTypeEnum.NonEmptyString(),
110
+ isOptional: false
111
+ },
112
+ description: {
113
+ type: ScalarTypeEnum.String_unsecure(),
114
+ isOptional: true
115
+ },
116
+ refreshInterval: {
117
+ type: RefreshIntervalEnum,
118
+ isOptional: true
119
+ },
120
+ dateRange: {
121
+ type: ScalarTypeEnum.JSON(),
122
+ isOptional: true
123
+ }
124
+ }
125
+ });
126
+ /**
127
+ * Input for adding a widget.
128
+ */
129
+ const AddWidgetInputModel = defineSchemaModel({
130
+ name: "AddWidgetInput",
131
+ fields: {
132
+ dashboardId: {
133
+ type: ScalarTypeEnum.String_unsecure(),
134
+ isOptional: false
135
+ },
136
+ name: {
137
+ type: ScalarTypeEnum.NonEmptyString(),
138
+ isOptional: false
139
+ },
140
+ type: {
141
+ type: WidgetTypeEnum,
142
+ isOptional: false
143
+ },
144
+ gridX: {
145
+ type: ScalarTypeEnum.Int_unsecure(),
146
+ isOptional: true
147
+ },
148
+ gridY: {
149
+ type: ScalarTypeEnum.Int_unsecure(),
150
+ isOptional: true
151
+ },
152
+ gridWidth: {
153
+ type: ScalarTypeEnum.Int_unsecure(),
154
+ isOptional: true
155
+ },
156
+ gridHeight: {
157
+ type: ScalarTypeEnum.Int_unsecure(),
158
+ isOptional: true
159
+ },
160
+ queryId: {
161
+ type: ScalarTypeEnum.String_unsecure(),
162
+ isOptional: true
163
+ },
164
+ config: {
165
+ type: ScalarTypeEnum.JSON(),
166
+ isOptional: true
167
+ }
168
+ }
169
+ });
170
+ /**
171
+ * Input for listing dashboards.
172
+ */
173
+ const ListDashboardsInputModel = defineSchemaModel({
174
+ name: "ListDashboardsInput",
175
+ fields: {
176
+ status: {
177
+ type: DashboardStatusEnum,
178
+ isOptional: true
179
+ },
180
+ search: {
181
+ type: ScalarTypeEnum.String_unsecure(),
182
+ isOptional: true
183
+ },
184
+ limit: {
185
+ type: ScalarTypeEnum.Int_unsecure(),
186
+ isOptional: true,
187
+ defaultValue: 20
188
+ },
189
+ offset: {
190
+ type: ScalarTypeEnum.Int_unsecure(),
191
+ isOptional: true,
192
+ defaultValue: 0
193
+ }
194
+ }
195
+ });
196
+ /**
197
+ * Output for listing dashboards.
198
+ */
199
+ const ListDashboardsOutputModel = defineSchemaModel({
200
+ name: "ListDashboardsOutput",
201
+ fields: {
202
+ dashboards: {
203
+ type: DashboardModel,
204
+ isArray: true,
205
+ isOptional: false
206
+ },
207
+ total: {
208
+ type: ScalarTypeEnum.Int_unsecure(),
209
+ isOptional: false
210
+ }
211
+ }
212
+ });
213
+ /**
214
+ * Input for getting a dashboard.
215
+ */
216
+ const GetDashboardInputModel = defineSchemaModel({
217
+ name: "GetDashboardInput",
218
+ fields: {
219
+ dashboardId: {
220
+ type: ScalarTypeEnum.String_unsecure(),
221
+ isOptional: true
222
+ },
223
+ slug: {
224
+ type: ScalarTypeEnum.String_unsecure(),
225
+ isOptional: true
226
+ },
227
+ shareToken: {
228
+ type: ScalarTypeEnum.String_unsecure(),
229
+ isOptional: true
230
+ }
231
+ }
232
+ });
233
+
234
+ //#endregion
235
+ export { AddWidgetInputModel, CreateDashboardInputModel, DashboardModel, GetDashboardInputModel, ListDashboardsInputModel, ListDashboardsOutputModel, WidgetModel };
236
+ //# sourceMappingURL=dashboard.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard.schema.js","names":[],"sources":["../../src/dashboard/dashboard.schema.ts"],"sourcesContent":["import { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';\nimport {\n DashboardStatusEnum,\n WidgetTypeEnum,\n RefreshIntervalEnum,\n} from './dashboard.enum';\n\n/**\n * A dashboard widget.\n */\nexport const WidgetModel = defineSchemaModel({\n name: 'WidgetModel',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n dashboardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n type: { type: WidgetTypeEnum, isOptional: false },\n gridX: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n gridY: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n gridWidth: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n gridHeight: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n queryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n config: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n\n/**\n * An analytics dashboard.\n */\nexport const DashboardModel = defineSchemaModel({\n name: 'DashboardModel',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n status: { type: DashboardStatusEnum, isOptional: false },\n refreshInterval: { type: RefreshIntervalEnum, isOptional: false },\n isPublic: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n widgets: { type: WidgetModel, isArray: true, isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Input for creating a dashboard.\n */\nexport const CreateDashboardInputModel = defineSchemaModel({\n name: 'CreateDashboardInput',\n fields: {\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n slug: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n refreshInterval: { type: RefreshIntervalEnum, isOptional: true },\n dateRange: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n\n/**\n * Input for adding a widget.\n */\nexport const AddWidgetInputModel = defineSchemaModel({\n name: 'AddWidgetInput',\n fields: {\n dashboardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n type: { type: WidgetTypeEnum, isOptional: false },\n gridX: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n gridY: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n gridWidth: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n gridHeight: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n queryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n config: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n\n/**\n * Input for listing dashboards.\n */\nexport const ListDashboardsInputModel = defineSchemaModel({\n name: 'ListDashboardsInput',\n fields: {\n status: { type: DashboardStatusEnum, isOptional: true },\n search: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n limit: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 20,\n },\n offset: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 0,\n },\n },\n});\n\n/**\n * Output for listing dashboards.\n */\nexport const ListDashboardsOutputModel = defineSchemaModel({\n name: 'ListDashboardsOutput',\n fields: {\n dashboards: { type: DashboardModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n});\n\n/**\n * Input for getting a dashboard.\n */\nexport const GetDashboardInputModel = defineSchemaModel({\n name: 'GetDashboardInput',\n fields: {\n dashboardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n shareToken: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n"],"mappings":";;;;;;;AAUA,MAAa,cAAc,kBAAkB;CAC3C,MAAM;CACN,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC1E,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,MAAM;GAAE,MAAM;GAAgB,YAAY;GAAO;EACjD,OAAO;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;G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zE;CACF,CAAC"}
@@ -0,0 +1,10 @@
1
+ import * as _contractspec_lib_contracts16 from "@contractspec/lib.contracts";
2
+
3
+ //#region src/dashboard/dashboard.test-spec.d.ts
4
+ declare const CreateDashboardTest: _contractspec_lib_contracts16.TestSpec;
5
+ declare const ListDashboardsTest: _contractspec_lib_contracts16.TestSpec;
6
+ declare const GetDashboardTest: _contractspec_lib_contracts16.TestSpec;
7
+ declare const AddWidgetTest: _contractspec_lib_contracts16.TestSpec;
8
+ //#endregion
9
+ export { AddWidgetTest, CreateDashboardTest, GetDashboardTest, ListDashboardsTest };
10
+ //# sourceMappingURL=dashboard.test-spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard.test-spec.d.ts","names":[],"sources":["../../src/dashboard/dashboard.test-spec.ts"],"sourcesContent":[],"mappings":";;;cAEa,qBAmDX,6BAAA,CAnD8B;cAqDnB,oBA+CX,6BAAA,CA/C6B;cAiDlB,kBA8CX,6BAAA,CA9C2B;AAtGhB,cAsJA,aAnGX,EA4JA,6BAAA,CAzDwB,QAnGxB"}
@@ -0,0 +1,233 @@
1
+ import { defineTestSpec } from "@contractspec/lib.contracts";
2
+
3
+ //#region src/dashboard/dashboard.test-spec.ts
4
+ const CreateDashboardTest = defineTestSpec({
5
+ meta: {
6
+ key: "analytics.dashboard.create.test",
7
+ version: "1.0.0",
8
+ title: "Create Dashboard Test",
9
+ description: "Verifies dashboard creation flow",
10
+ owners: ["@example.analytics-dashboard"],
11
+ tags: [
12
+ "analytics",
13
+ "dashboard",
14
+ "test"
15
+ ],
16
+ stability: "stable"
17
+ },
18
+ target: {
19
+ type: "operation",
20
+ operation: {
21
+ key: "analytics.dashboard.create",
22
+ version: "1.0.0"
23
+ }
24
+ },
25
+ scenarios: [{
26
+ key: "success",
27
+ description: "Successfully create a dashboard",
28
+ when: {
29
+ operation: {
30
+ key: "analytics.dashboard.create",
31
+ version: "1.0.0"
32
+ },
33
+ input: {
34
+ name: "Test Dashboard",
35
+ description: "Test Description"
36
+ }
37
+ },
38
+ then: [{
39
+ type: "expectOutput",
40
+ match: { name: "Test Dashboard" }
41
+ }]
42
+ }, {
43
+ key: "error-invalid-input",
44
+ description: "Fail to create dashboard with invalid input",
45
+ when: {
46
+ operation: {
47
+ key: "analytics.dashboard.create",
48
+ version: "1.0.0"
49
+ },
50
+ input: { name: "" }
51
+ },
52
+ then: [{
53
+ type: "expectError",
54
+ messageIncludes: "VALIDATION_ERROR"
55
+ }]
56
+ }]
57
+ });
58
+ const ListDashboardsTest = defineTestSpec({
59
+ meta: {
60
+ key: "analytics.dashboard.list.test",
61
+ version: "1.0.0",
62
+ title: "List Dashboards Test",
63
+ description: "Verifies dashboard listing",
64
+ owners: ["@example.analytics-dashboard"],
65
+ tags: [
66
+ "analytics",
67
+ "dashboard",
68
+ "test"
69
+ ],
70
+ stability: "stable"
71
+ },
72
+ target: {
73
+ type: "operation",
74
+ operation: {
75
+ key: "analytics.dashboard.list",
76
+ version: "1.0.0"
77
+ }
78
+ },
79
+ scenarios: [{
80
+ key: "success",
81
+ description: "Successfully list dashboards",
82
+ when: {
83
+ operation: {
84
+ key: "analytics.dashboard.list",
85
+ version: "1.0.0"
86
+ },
87
+ input: {
88
+ limit: 10,
89
+ offset: 0
90
+ }
91
+ },
92
+ then: [{
93
+ type: "expectOutput",
94
+ match: {
95
+ items: [],
96
+ total: 0
97
+ }
98
+ }]
99
+ }, {
100
+ key: "error-invalid-format",
101
+ description: "Fail with invalid pagination",
102
+ when: {
103
+ operation: {
104
+ key: "analytics.dashboard.list",
105
+ version: "1.0.0"
106
+ },
107
+ input: { limit: -1 }
108
+ },
109
+ then: [{
110
+ type: "expectError",
111
+ messageIncludes: "VALIDATION_ERROR"
112
+ }]
113
+ }]
114
+ });
115
+ const GetDashboardTest = defineTestSpec({
116
+ meta: {
117
+ key: "analytics.dashboard.get.test",
118
+ version: "1.0.0",
119
+ title: "Get Dashboard Test",
120
+ description: "Verifies dashboard retrieval",
121
+ owners: ["@example.analytics-dashboard"],
122
+ tags: [
123
+ "analytics",
124
+ "dashboard",
125
+ "test"
126
+ ],
127
+ stability: "stable"
128
+ },
129
+ target: {
130
+ type: "operation",
131
+ operation: {
132
+ key: "analytics.dashboard.get",
133
+ version: "1.0.0"
134
+ }
135
+ },
136
+ scenarios: [{
137
+ key: "success",
138
+ description: "Successfully get dashboard",
139
+ when: {
140
+ operation: {
141
+ key: "analytics.dashboard.get",
142
+ version: "1.0.0"
143
+ },
144
+ input: { dashboardId: "dash-123" }
145
+ },
146
+ then: [{
147
+ type: "expectOutput",
148
+ match: { id: "dash-123" }
149
+ }]
150
+ }, {
151
+ key: "error-not-found",
152
+ description: "Fail when dashboard not found",
153
+ when: {
154
+ operation: {
155
+ key: "analytics.dashboard.get",
156
+ version: "1.0.0"
157
+ },
158
+ input: { dashboardId: "dash-999" }
159
+ },
160
+ then: [{
161
+ type: "expectError",
162
+ messageIncludes: "NOT_FOUND"
163
+ }]
164
+ }]
165
+ });
166
+ const AddWidgetTest = defineTestSpec({
167
+ meta: {
168
+ key: "analytics.widget.add.test",
169
+ version: "1.0.0",
170
+ title: "Add Widget Test",
171
+ description: "Verifies adding widget to dashboard",
172
+ owners: ["@example.analytics-dashboard"],
173
+ tags: [
174
+ "analytics",
175
+ "widget",
176
+ "test"
177
+ ],
178
+ stability: "stable"
179
+ },
180
+ target: {
181
+ type: "operation",
182
+ operation: {
183
+ key: "analytics.widget.add",
184
+ version: "1.0.0"
185
+ }
186
+ },
187
+ scenarios: [{
188
+ key: "success",
189
+ description: "Successfully add widget",
190
+ when: {
191
+ operation: {
192
+ key: "analytics.widget.add",
193
+ version: "1.0.0"
194
+ },
195
+ input: {
196
+ dashboardId: "dash-123",
197
+ type: "chart",
198
+ queryId: "q-1",
199
+ config: {}
200
+ }
201
+ },
202
+ then: [{
203
+ type: "expectOutput",
204
+ match: {
205
+ type: "chart",
206
+ dashboardId: "dash-123"
207
+ }
208
+ }]
209
+ }, {
210
+ key: "error-dashboard-not-found",
211
+ description: "Fail when dashboard does not exist",
212
+ when: {
213
+ operation: {
214
+ key: "analytics.widget.add",
215
+ version: "1.0.0"
216
+ },
217
+ input: {
218
+ dashboardId: "dash-999",
219
+ type: "chart",
220
+ queryId: "q-1",
221
+ config: {}
222
+ }
223
+ },
224
+ then: [{
225
+ type: "expectError",
226
+ messageIncludes: "NOT_FOUND"
227
+ }]
228
+ }]
229
+ });
230
+
231
+ //#endregion
232
+ export { AddWidgetTest, CreateDashboardTest, GetDashboardTest, ListDashboardsTest };
233
+ //# sourceMappingURL=dashboard.test-spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard.test-spec.js","names":[],"sources":["../../src/dashboard/dashboard.test-spec.ts"],"sourcesContent":["import { defineTestSpec } from '@contractspec/lib.contracts';\n\nexport const CreateDashboardTest = defineTestSpec({\n meta: {\n key: 'analytics.dashboard.create.test',\n version: '1.0.0',\n title: 'Create Dashboard Test',\n description: 'Verifies dashboard creation flow',\n owners: ['@example.analytics-dashboard'],\n tags: ['analytics', 'dashboard', 'test'],\n stability: 'stable',\n },\n target: {\n type: 'operation',\n operation: { key: 'analytics.dashboard.create', version: '1.0.0' },\n },\n scenarios: [\n {\n key: 'success',\n description: 'Successfully create a dashboard',\n when: {\n operation: { key: 'analytics.dashboard.create', version: '1.0.0' },\n input: {\n name: 'Test Dashboard',\n description: 'Test Description',\n },\n },\n then: [\n {\n type: 'expectOutput',\n match: {\n name: 'Test Dashboard',\n },\n },\n ],\n },\n {\n key: 'error-invalid-input',\n description: 'Fail to create dashboard with invalid input',\n when: {\n operation: { key: 'analytics.dashboard.create', version: '1.0.0' },\n input: {\n name: '',\n },\n },\n then: [\n {\n type: 'expectError',\n messageIncludes: 'VALIDATION_ERROR',\n },\n ],\n },\n ],\n});\n\nexport const ListDashboardsTest = defineTestSpec({\n meta: {\n key: 'analytics.dashboard.list.test',\n version: '1.0.0',\n title: 'List Dashboards Test',\n description: 'Verifies dashboard listing',\n owners: ['@example.analytics-dashboard'],\n tags: ['analytics', 'dashboard', 'test'],\n stability: 'stable',\n },\n target: {\n type: 'operation',\n operation: { key: 'analytics.dashboard.list', version: '1.0.0' },\n },\n scenarios: [\n {\n key: 'success',\n description: 'Successfully list dashboards',\n when: {\n operation: { key: 'analytics.dashboard.list', version: '1.0.0' },\n input: { limit: 10, offset: 0 },\n },\n then: [\n {\n type: 'expectOutput',\n match: {\n items: [],\n total: 0,\n },\n },\n ],\n },\n {\n key: 'error-invalid-format',\n description: 'Fail with invalid pagination',\n when: {\n operation: { key: 'analytics.dashboard.list', version: '1.0.0' },\n input: { limit: -1 },\n },\n then: [\n {\n type: 'expectError',\n messageIncludes: 'VALIDATION_ERROR',\n },\n ],\n },\n ],\n});\n\nexport const GetDashboardTest = defineTestSpec({\n meta: {\n key: 'analytics.dashboard.get.test',\n version: '1.0.0',\n title: 'Get Dashboard Test',\n description: 'Verifies dashboard retrieval',\n owners: ['@example.analytics-dashboard'],\n tags: ['analytics', 'dashboard', 'test'],\n stability: 'stable',\n },\n target: {\n type: 'operation',\n operation: { key: 'analytics.dashboard.get', version: '1.0.0' },\n },\n scenarios: [\n {\n key: 'success',\n description: 'Successfully get dashboard',\n when: {\n operation: { key: 'analytics.dashboard.get', version: '1.0.0' },\n input: { dashboardId: 'dash-123' },\n },\n then: [\n {\n type: 'expectOutput',\n match: {\n id: 'dash-123',\n },\n },\n ],\n },\n {\n key: 'error-not-found',\n description: 'Fail when dashboard not found',\n when: {\n operation: { key: 'analytics.dashboard.get', version: '1.0.0' },\n input: { dashboardId: 'dash-999' },\n },\n then: [\n {\n type: 'expectError',\n messageIncludes: 'NOT_FOUND',\n },\n ],\n },\n ],\n});\n\nexport const AddWidgetTest = defineTestSpec({\n meta: {\n key: 'analytics.widget.add.test',\n version: '1.0.0',\n title: 'Add Widget Test',\n description: 'Verifies adding widget to dashboard',\n owners: ['@example.analytics-dashboard'],\n tags: ['analytics', 'widget', 'test'],\n stability: 'stable',\n },\n target: {\n type: 'operation',\n operation: { key: 'analytics.widget.add', version: '1.0.0' },\n },\n scenarios: [\n {\n key: 'success',\n description: 'Successfully add widget',\n when: {\n operation: { key: 'analytics.widget.add', version: '1.0.0' },\n input: {\n dashboardId: 'dash-123',\n type: 'chart',\n queryId: 'q-1',\n config: {},\n },\n },\n then: [\n {\n type: 'expectOutput',\n match: {\n type: 'chart',\n dashboardId: 'dash-123',\n },\n },\n ],\n },\n {\n key: 'error-dashboard-not-found',\n description: 'Fail when dashboard does not exist',\n when: {\n operation: { key: 'analytics.widget.add', version: '1.0.0' },\n input: {\n dashboardId: 'dash-999',\n type: 'chart',\n queryId: 'q-1',\n config: {},\n },\n },\n then: [\n {\n type: 'expectError',\n messageIncludes: 'NOT_FOUND',\n },\n ],\n },\n ],\n});\n"],"mappings":";;;AAEA,MAAa,sBAAsB,eAAe;CAChD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ,CAAC,+BAA+B;EACxC,MAAM;GAAC;GAAa;GAAa;GAAO;EACxC,WAAW;EACZ;CACD,QAAQ;EACN,MAAM;EACN,WAAW;GAAE,KAAK;GAA8B,SAAS;GAAS;EACnE;CACD,WAAW,CACT;EACE,KAAK;EACL,aAAa;EACb,MAAM;GACJ,WAAW;IAAE,KAAK;IAA8B,SAAS;IAAS;GAClE,OAAO;IACL,MAAM;IACN,aAAa;IACd;GACF;EACD,MAAM,CACJ;GACE,MAAM;GACN,OAAO,EACL,MAAM,kBACP;GACF,CACF;EACF,EACD;EACE,KAAK;EACL,aAAa;EACb,MAAM;GACJ,WAAW;IAAE,KAAK;IAA8B,SAAS;IAAS;GAClE,OAAO,EACL,MAAM,IACP;GACF;EACD,MAAM,CACJ;GACE,MAAM;GACN,iBAAiB;GAClB,CACF;EACF,CACF;CACF,CAAC;AAEF,MAAa,qBAAqB,eAAe;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ,CAAC,+BAA+B;EACxC,MAAM;GA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;EACb,QAAQ,CAAC,+BAA+B;EACxC,MAAM;GAAC;GAAa;GAAU;GAAO;EACrC,WAAW;EACZ;CACD,QAAQ;EACN,MAAM;EACN,WAAW;GAAE,KAAK;GAAwB,SAAS;GAAS;EAC7D;CACD,WAAW,CACT;EACE,KAAK;EACL,aAAa;EACb,MAAM;GACJ,WAAW;IAAE,KAAK;IAAwB,SAAS;IAAS;GAC5D,OAAO;IACL,aAAa;IACb,MAAM;IACN,SAAS;IACT,QAAQ,EAAE;IACX;GACF;EACD,MAAM,CACJ;GACE,MAAM;GACN,OAAO;IACL,MAAM;IACN,aAAa;IACd;GACF,CACF;EACF,EACD;EACE,KAAK;EACL,aAAa;EACb,MAAM;GACJ,WAAW;IAAE,KAAK;IAAwB,SAAS;IAAS;GAC5D,OAAO;IACL,aAAa;IACb,MAAM;IACN,SAAS;IACT,QAAQ,EAAE;IACX;GACF;EACD,MAAM,CACJ;GACE,MAAM;GACN,iBAAiB;GAClB,CACF;EACF,CACF;CACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { DashboardStatusEnum, RefreshIntervalEnum, WidgetTypeEnum } from "./dashboard.enum.js";
2
+ import { AddWidgetContract, CreateDashboardContract, GetDashboardContract, ListDashboardsContract } from "./dashboard.operation.js";
3
+ import { AddWidgetInputModel, CreateDashboardInputModel, DashboardModel, GetDashboardInputModel, ListDashboardsInputModel, ListDashboardsOutputModel, WidgetModel } from "./dashboard.schema.js";
4
+ export { AddWidgetContract, AddWidgetInputModel, CreateDashboardContract, CreateDashboardInputModel, DashboardModel, DashboardStatusEnum, GetDashboardContract, GetDashboardInputModel, ListDashboardsContract, ListDashboardsInputModel, ListDashboardsOutputModel, RefreshIntervalEnum, WidgetModel, WidgetTypeEnum };
@@ -0,0 +1,5 @@
1
+ import { DashboardStatusEnum, RefreshIntervalEnum, WidgetTypeEnum } from "./dashboard.enum.js";
2
+ import { AddWidgetInputModel, CreateDashboardInputModel, DashboardModel, GetDashboardInputModel, ListDashboardsInputModel, ListDashboardsOutputModel, WidgetModel } from "./dashboard.schema.js";
3
+ import { AddWidgetContract, CreateDashboardContract, GetDashboardContract, ListDashboardsContract } from "./dashboard.operation.js";
4
+
5
+ export { AddWidgetContract, AddWidgetInputModel, CreateDashboardContract, CreateDashboardInputModel, DashboardModel, DashboardStatusEnum, GetDashboardContract, GetDashboardInputModel, ListDashboardsContract, ListDashboardsInputModel, ListDashboardsOutputModel, RefreshIntervalEnum, WidgetModel, WidgetTypeEnum };
@@ -0,0 +1,17 @@
1
+ import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
2
+
3
+ //#region src/dashboard.feature.d.ts
4
+
5
+ /**
6
+ * Analytics Dashboard Feature Module
7
+ *
8
+ * Comprehensive analytics and dashboarding solution for data visualization
9
+ * and reporting across the platform.
10
+ *
11
+ * This feature module bundles all dashboard and query operations, events,
12
+ * and presentations into an installable feature following FeatureModuleSpec.
13
+ */
14
+ declare const AnalyticsDashboardFeature: _contractspec_lib_contracts0.FeatureModuleSpec;
15
+ //#endregion
16
+ export { AnalyticsDashboardFeature };
17
+ //# sourceMappingURL=dashboard.feature.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard.feature.d.ts","names":[],"sources":["../src/dashboard.feature.ts"],"sourcesContent":[],"mappings":";;;;;;;AAcA;;;;;;cAAa,2BA6GX,4BAAA,CA7GoC"}