@contractspec/example.analytics-dashboard 1.46.0 → 1.47.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/dashboard/dashboard.operation.d.ts +5 -5
- package/dist/dashboard/dashboard.presentation.d.ts +4 -4
- package/dist/dashboard/dashboard.presentation.d.ts.map +1 -1
- package/dist/dashboard/dashboard.presentation.js +7 -7
- package/dist/dashboard/dashboard.presentation.js.map +1 -1
- package/dist/dashboard/dashboard.test-spec.d.ts +10 -0
- package/dist/dashboard/dashboard.test-spec.d.ts.map +1 -0
- package/dist/dashboard/dashboard.test-spec.js +233 -0
- package/dist/dashboard/dashboard.test-spec.js.map +1 -0
- package/dist/dashboard.feature.d.ts +11 -2
- package/dist/dashboard.feature.d.ts.map +1 -1
- package/dist/dashboard.feature.js +13 -2
- package/dist/dashboard.feature.js.map +1 -1
- package/dist/events.d.ts +1 -1
- package/dist/events.js +1 -1
- package/dist/example.d.ts +2 -2
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +4 -2
- package/dist/example.js.map +1 -1
- package/dist/handlers/analytics.handlers.d.ts +122 -0
- package/dist/handlers/analytics.handlers.d.ts.map +1 -0
- package/dist/handlers/analytics.handlers.js +310 -0
- package/dist/handlers/analytics.handlers.js.map +1 -0
- package/dist/handlers/index.d.ts +2 -0
- package/dist/handlers/index.js +3 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +6 -1
- package/dist/query/query.operation.d.ts +3 -3
- package/dist/query/query.operation.d.ts.map +1 -1
- package/dist/query/query.presentation.d.ts +3 -3
- package/dist/query/query.presentation.d.ts.map +1 -1
- package/dist/query/query.presentation.js +5 -5
- package/dist/query/query.presentation.js.map +1 -1
- package/dist/query/query.test-spec.d.ts +8 -0
- package/dist/query/query.test-spec.d.ts.map +1 -0
- package/dist/query/query.test-spec.js +124 -0
- package/dist/query/query.test-spec.js.map +1 -0
- package/dist/query-engine/index.d.ts.map +1 -1
- package/dist/query-engine/index.js.map +1 -1
- package/dist/seeders/index.d.ts +10 -0
- package/dist/seeders/index.d.ts.map +1 -0
- package/dist/seeders/index.js +19 -0
- package/dist/seeders/index.js.map +1 -0
- package/dist/ui/AnalyticsDashboard.d.ts +7 -0
- package/dist/ui/AnalyticsDashboard.d.ts.map +1 -0
- package/dist/ui/AnalyticsDashboard.js +265 -0
- package/dist/ui/AnalyticsDashboard.js.map +1 -0
- package/dist/ui/hooks/index.d.ts +2 -0
- package/dist/ui/hooks/index.js +5 -0
- package/dist/ui/hooks/useAnalyticsData.d.ts +23 -0
- package/dist/ui/hooks/useAnalyticsData.d.ts.map +1 -0
- package/dist/ui/hooks/useAnalyticsData.js +73 -0
- package/dist/ui/hooks/useAnalyticsData.js.map +1 -0
- package/dist/ui/index.d.ts +6 -0
- package/dist/ui/index.js +6 -0
- package/dist/ui/renderers/analytics.markdown.d.ts +28 -0
- package/dist/ui/renderers/analytics.markdown.d.ts.map +1 -0
- package/dist/ui/renderers/analytics.markdown.js +264 -0
- package/dist/ui/renderers/analytics.markdown.js.map +1 -0
- package/dist/ui/renderers/index.d.ts +2 -0
- package/dist/ui/renderers/index.js +3 -0
- package/package.json +24 -8
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import * as _contractspec_lib_contracts7 from "@contractspec/lib.contracts";
|
|
1
2
|
import * as _contractspec_lib_schema40 from "@contractspec/lib.schema";
|
|
2
|
-
import * as _contractspec_lib_contracts5 from "@contractspec/lib.contracts";
|
|
3
3
|
|
|
4
4
|
//#region src/dashboard/dashboard.operation.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Create a new analytics dashboard.
|
|
7
7
|
*/
|
|
8
|
-
declare const CreateDashboardContract:
|
|
8
|
+
declare const CreateDashboardContract: _contractspec_lib_contracts7.OperationSpec<_contractspec_lib_schema40.SchemaModel<{
|
|
9
9
|
name: {
|
|
10
10
|
type: _contractspec_lib_schema40.FieldType<string, string>;
|
|
11
11
|
isOptional: false;
|
|
@@ -196,7 +196,7 @@ declare const CreateDashboardContract: _contractspec_lib_contracts5.OperationSpe
|
|
|
196
196
|
/**
|
|
197
197
|
* Add a widget to a dashboard.
|
|
198
198
|
*/
|
|
199
|
-
declare const AddWidgetContract:
|
|
199
|
+
declare const AddWidgetContract: _contractspec_lib_contracts7.OperationSpec<_contractspec_lib_schema40.SchemaModel<{
|
|
200
200
|
dashboardId: {
|
|
201
201
|
type: _contractspec_lib_schema40.FieldType<string, string>;
|
|
202
202
|
isOptional: false;
|
|
@@ -327,7 +327,7 @@ declare const AddWidgetContract: _contractspec_lib_contracts5.OperationSpec<_con
|
|
|
327
327
|
/**
|
|
328
328
|
* List dashboards.
|
|
329
329
|
*/
|
|
330
|
-
declare const ListDashboardsContract:
|
|
330
|
+
declare const ListDashboardsContract: _contractspec_lib_contracts7.OperationSpec<_contractspec_lib_schema40.SchemaModel<{
|
|
331
331
|
status: {
|
|
332
332
|
type: _contractspec_lib_schema40.EnumType<[string, string, string]>;
|
|
333
333
|
isOptional: true;
|
|
@@ -439,7 +439,7 @@ declare const ListDashboardsContract: _contractspec_lib_contracts5.OperationSpec
|
|
|
439
439
|
/**
|
|
440
440
|
* Get a dashboard with widgets.
|
|
441
441
|
*/
|
|
442
|
-
declare const GetDashboardContract:
|
|
442
|
+
declare const GetDashboardContract: _contractspec_lib_contracts7.OperationSpec<_contractspec_lib_schema40.SchemaModel<{
|
|
443
443
|
dashboardId: {
|
|
444
444
|
type: _contractspec_lib_schema40.FieldType<string, string>;
|
|
445
445
|
isOptional: true;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as _contractspec_lib_contracts11 from "@contractspec/lib.contracts";
|
|
2
2
|
|
|
3
3
|
//#region src/dashboard/dashboard.presentation.d.ts
|
|
4
|
-
declare const DashboardsListPresentation: PresentationSpec;
|
|
5
|
-
declare const DashboardViewPresentation: PresentationSpec;
|
|
6
|
-
declare const DashboardEditorPresentation: PresentationSpec;
|
|
4
|
+
declare const DashboardsListPresentation: _contractspec_lib_contracts11.PresentationSpec;
|
|
5
|
+
declare const DashboardViewPresentation: _contractspec_lib_contracts11.PresentationSpec;
|
|
6
|
+
declare const DashboardEditorPresentation: _contractspec_lib_contracts11.PresentationSpec;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { DashboardEditorPresentation, DashboardViewPresentation, DashboardsListPresentation };
|
|
9
9
|
//# sourceMappingURL=dashboard.presentation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.presentation.d.ts","names":[],"sources":["../../src/dashboard/dashboard.presentation.ts"],"sourcesContent":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"dashboard.presentation.d.ts","names":[],"sources":["../../src/dashboard/dashboard.presentation.ts"],"sourcesContent":[],"mappings":";;;cAGa,4BAuBX,6BAAA,CAvBqC;cAyB1B,2BAuBX,6BAAA,CAvBoC;cAyBzB,6BAuBX,6BAAA,CAvBsC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DashboardModel } from "./dashboard.schema.js";
|
|
2
|
-
import { StabilityEnum } from "@contractspec/lib.contracts";
|
|
2
|
+
import { StabilityEnum, definePresentation } from "@contractspec/lib.contracts";
|
|
3
3
|
|
|
4
4
|
//#region src/dashboard/dashboard.presentation.ts
|
|
5
|
-
const DashboardsListPresentation = {
|
|
5
|
+
const DashboardsListPresentation = definePresentation({
|
|
6
6
|
meta: {
|
|
7
7
|
key: "analytics.dashboard.list",
|
|
8
8
|
version: "1.0.0",
|
|
@@ -31,8 +31,8 @@ const DashboardsListPresentation = {
|
|
|
31
31
|
"application/json"
|
|
32
32
|
],
|
|
33
33
|
policy: { flags: ["analytics.dashboards.enabled"] }
|
|
34
|
-
};
|
|
35
|
-
const DashboardViewPresentation = {
|
|
34
|
+
});
|
|
35
|
+
const DashboardViewPresentation = definePresentation({
|
|
36
36
|
meta: {
|
|
37
37
|
key: "analytics.dashboard.view",
|
|
38
38
|
version: "1.0.0",
|
|
@@ -57,8 +57,8 @@ const DashboardViewPresentation = {
|
|
|
57
57
|
},
|
|
58
58
|
targets: ["react", "markdown"],
|
|
59
59
|
policy: { flags: ["analytics.dashboards.enabled"] }
|
|
60
|
-
};
|
|
61
|
-
const DashboardEditorPresentation = {
|
|
60
|
+
});
|
|
61
|
+
const DashboardEditorPresentation = definePresentation({
|
|
62
62
|
meta: {
|
|
63
63
|
key: "analytics.dashboard.editor",
|
|
64
64
|
version: "1.0.0",
|
|
@@ -83,7 +83,7 @@ const DashboardEditorPresentation = {
|
|
|
83
83
|
},
|
|
84
84
|
targets: ["react"],
|
|
85
85
|
policy: { flags: ["analytics.dashboards.enabled"] }
|
|
86
|
-
};
|
|
86
|
+
});
|
|
87
87
|
|
|
88
88
|
//#endregion
|
|
89
89
|
export { DashboardEditorPresentation, DashboardViewPresentation, DashboardsListPresentation };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.presentation.js","names":[
|
|
1
|
+
{"version":3,"file":"dashboard.presentation.js","names":[],"sources":["../../src/dashboard/dashboard.presentation.ts"],"sourcesContent":["import { definePresentation, StabilityEnum } from '@contractspec/lib.contracts';\nimport { DashboardModel } from './dashboard.schema';\n\nexport const DashboardsListPresentation = definePresentation({\n meta: {\n key: 'analytics.dashboard.list',\n version: '1.0.0',\n title: 'Dashboards List',\n description: 'List of analytics dashboards',\n domain: 'analytics',\n owners: ['@analytics-dashboard'],\n tags: ['analytics', 'dashboards', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Show users available analytics dashboards.',\n context: 'The main dashboard management view.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'DashboardsList',\n props: DashboardModel,\n },\n targets: ['react', 'markdown', 'application/json'],\n policy: {\n flags: ['analytics.dashboards.enabled'],\n },\n});\n\nexport const DashboardViewPresentation = definePresentation({\n meta: {\n key: 'analytics.dashboard.view',\n version: '1.0.0',\n title: 'Dashboard View',\n description: 'View a single dashboard with widgets',\n domain: 'analytics',\n owners: ['@analytics-dashboard'],\n tags: ['analytics', 'dashboard', 'view'],\n stability: StabilityEnum.Experimental,\n goal: 'Render a dashboard with its visualizations and data.',\n context: 'The interactive viewing interface.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'DashboardView',\n props: DashboardModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['analytics.dashboards.enabled'],\n },\n});\n\nexport const DashboardEditorPresentation = definePresentation({\n meta: {\n key: 'analytics.dashboard.editor',\n version: '1.0.0',\n title: 'Dashboard Editor',\n description: 'Edit dashboard configuration and widgets',\n domain: 'analytics',\n owners: ['@analytics-dashboard'],\n tags: ['analytics', 'dashboard', 'editor'],\n stability: StabilityEnum.Experimental,\n goal: 'Configure dashboard layout and widget settings.',\n context: 'Management tool for analysts.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'DashboardEditor',\n props: DashboardModel,\n },\n targets: ['react'],\n policy: {\n flags: ['analytics.dashboards.enabled'],\n },\n});\n"],"mappings":";;;;AAGA,MAAa,6BAA6B,mBAAmB;CAC3D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,uBAAuB;EAChC,MAAM;GAAC;GAAa;GAAc;GAAO;EACzC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS;EAAC;EAAS;EAAY;EAAmB;CAClD,QAAQ,EACN,OAAO,CAAC,+BAA+B,EACxC;CACF,CAAC;AAEF,MAAa,4BAA4B,mBAAmB;CAC1D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,uBAAuB;EAChC,MAAM;GAAC;GAAa;GAAa;GAAO;EACxC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,+BAA+B,EACxC;CACF,CAAC;AAEF,MAAa,8BAA8B,mBAAmB;CAC5D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,uBAAuB;EAChC,MAAM;GAAC;GAAa;GAAa;GAAS;EAC1C,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,QAAQ;CAClB,QAAQ,EACN,OAAO,CAAC,+BAA+B,EACxC;CACF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as _contractspec_lib_contracts14 from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/dashboard/dashboard.test-spec.d.ts
|
|
4
|
+
declare const CreateDashboardTest: _contractspec_lib_contracts14.TestSpec;
|
|
5
|
+
declare const ListDashboardsTest: _contractspec_lib_contracts14.TestSpec;
|
|
6
|
+
declare const GetDashboardTest: _contractspec_lib_contracts14.TestSpec;
|
|
7
|
+
declare const AddWidgetTest: _contractspec_lib_contracts14.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":"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"}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
|
|
2
2
|
|
|
3
3
|
//#region src/dashboard.feature.d.ts
|
|
4
4
|
|
|
5
|
-
|
|
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;
|
|
6
15
|
//#endregion
|
|
7
16
|
export { AnalyticsDashboardFeature };
|
|
8
17
|
//# sourceMappingURL=dashboard.feature.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.feature.d.ts","names":[],"sources":["../src/dashboard.feature.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dashboard.feature.d.ts","names":[],"sources":["../src/dashboard.feature.ts"],"sourcesContent":[],"mappings":";;;;;;;AAcA;;;;;;cAAa,2BA6GX,4BAAA,CA7GoC"}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
+
import { defineFeature } from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
1
3
|
//#region src/dashboard.feature.ts
|
|
2
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Analytics Dashboard Feature Module
|
|
6
|
+
*
|
|
7
|
+
* Comprehensive analytics and dashboarding solution for data visualization
|
|
8
|
+
* and reporting across the platform.
|
|
9
|
+
*
|
|
10
|
+
* This feature module bundles all dashboard and query operations, events,
|
|
11
|
+
* and presentations into an installable feature following FeatureModuleSpec.
|
|
12
|
+
*/
|
|
13
|
+
const AnalyticsDashboardFeature = defineFeature({
|
|
3
14
|
meta: {
|
|
4
15
|
key: "analytics-dashboard",
|
|
5
16
|
version: "1.0.0",
|
|
@@ -159,7 +170,7 @@ const AnalyticsDashboardFeature = {
|
|
|
159
170
|
version: "1.0.0"
|
|
160
171
|
}
|
|
161
172
|
] }
|
|
162
|
-
};
|
|
173
|
+
});
|
|
163
174
|
|
|
164
175
|
//#endregion
|
|
165
176
|
export { AnalyticsDashboardFeature };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.feature.js","names":[
|
|
1
|
+
{"version":3,"file":"dashboard.feature.js","names":[],"sources":["../src/dashboard.feature.ts"],"sourcesContent":["/**\n * Analytics Dashboard Feature Module\n *\n * Comprehensive analytics and dashboarding solution for data visualization\n * and reporting across the platform.\n *\n * This feature module bundles all dashboard and query operations, events,\n * and presentations into an installable feature following FeatureModuleSpec.\n */\n\nimport { defineFeature } from '@contractspec/lib.contracts';\n\n// ============ Feature Definition ============\n\nexport const AnalyticsDashboardFeature = defineFeature({\n meta: {\n key: 'analytics-dashboard',\n version: '1.0.0',\n title: 'Analytics Dashboard',\n description: 'Analytics dashboards with customizable widgets and queries',\n domain: 'analytics',\n owners: ['@analytics-dashboard'],\n tags: ['analytics', 'dashboards', 'widgets', 'queries'],\n stability: 'experimental',\n },\n\n // ============ Contract Operations ============\n // All contract operations included in this feature (OpRef[])\n operations: [\n // Dashboard operations\n { key: 'analytics.dashboard.create', version: '1.0.0' },\n { key: 'analytics.dashboard.list', version: '1.0.0' },\n { key: 'analytics.dashboard.get', version: '1.0.0' },\n\n // Widget operations\n { key: 'analytics.widget.add', version: '1.0.0' },\n\n // Query operations\n { key: 'analytics.query.create', version: '1.0.0' },\n { key: 'analytics.query.execute', version: '1.0.0' },\n ],\n\n // ============ Events ============\n // Events emitted by this feature (EventRef[])\n events: [\n // Dashboard events\n { key: 'analytics.dashboard.created', version: '1.0.0' },\n\n // Widget events\n { key: 'analytics.widget.added', version: '1.0.0' },\n\n // Query events\n { key: 'analytics.query.created', version: '1.0.0' },\n ],\n\n // ============ Presentations ============\n // Presentations associated with this feature (PresentationRef[])\n presentations: [\n // Dashboard presentations\n { key: 'analytics.dashboard.list', version: '1.0.0' },\n { key: 'analytics.dashboard.view', version: '1.0.0' },\n { key: 'analytics.dashboard.editor', version: '1.0.0' },\n\n // Query presentations\n { key: 'analytics.query.list', version: '1.0.0' },\n { key: 'analytics.query.builder', version: '1.0.0' },\n ],\n\n // ============ Op-to-Presentation Links ============\n // Links operations to their primary presentations\n opToPresentation: [\n {\n op: { key: 'analytics.dashboard.list', version: '1.0.0' },\n pres: { key: 'analytics.dashboard.list', version: '1.0.0' },\n },\n {\n op: { key: 'analytics.dashboard.get', version: '1.0.0' },\n pres: { key: 'analytics.dashboard.view', version: '1.0.0' },\n },\n {\n op: { key: 'analytics.dashboard.create', version: '1.0.0' },\n pres: { key: 'analytics.dashboard.editor', version: '1.0.0' },\n },\n {\n op: { key: 'analytics.query.create', version: '1.0.0' },\n pres: { key: 'analytics.query.builder', version: '1.0.0' },\n },\n ],\n\n // ============ Presentation Targets ============\n // Target requirements for multi-surface rendering\n presentationsTargets: [\n {\n key: 'analytics.dashboard.list',\n version: '1.0.0',\n targets: ['react', 'markdown', 'application/json'],\n },\n {\n key: 'analytics.dashboard.view',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'analytics.dashboard.editor',\n version: '1.0.0',\n targets: ['react'],\n },\n {\n key: 'analytics.query.builder',\n version: '1.0.0',\n targets: ['react'],\n },\n ],\n\n // ============ Capabilities ============\n // Capability requirements for this feature\n capabilities: {\n requires: [\n { key: 'identity', version: '1.0.0' },\n { key: 'metering', version: '1.0.0' },\n { key: 'audit-trail', version: '1.0.0' },\n ],\n },\n});\n"],"mappings":";;;;;;;;;;;;AAcA,MAAa,4BAA4B,cAAc;CACrD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,uBAAuB;EAChC,MAAM;GAAC;GAAa;GAAc;GAAW;GAAU;EACvD,WAAW;EACZ;CAID,YAAY;EAEV;GAAE,KAAK;GAA8B,SAAS;GAAS;EACvD;GAAE,KAAK;GAA4B,SAAS;GAAS;EACrD;GAAE,KAAK;GAA2B,SAAS;GAAS;EAGpD;GAAE,KAAK;GAAwB,SAAS;GAAS;EAGjD;GAAE,KAAK;GAA0B,SAAS;GAAS;EACnD;GAAE,KAAK;GAA2B,SAAS;GAAS;EACrD;CAID,QAAQ;EAEN;GAAE,KAAK;GAA+B,SAAS;GAAS;EAGxD;GAAE,KAAK;GAA0B,SAAS;GAAS;EAGnD;GAAE,KAAK;GAA2B,SAAS;GAAS;EACrD;CAID,eAAe;EAEb;GAAE,KAAK;GAA4B,SAAS;GAAS;EACrD;GAAE,KAAK;GAA4B,SAAS;GAAS;EACrD;GAAE,KAAK;GAA8B,SAAS;GAAS;EAGvD;GAAE,KAAK;GAAwB,SAAS;GAAS;EACjD;GAAE,KAAK;GAA2B,SAAS;GAAS;EACrD;CAID,kBAAkB;EAChB;GACE,IAAI;IAAE,KAAK;IAA4B,SAAS;IAAS;GACzD,MAAM;IAAE,KAAK;IAA4B,SAAS;IAAS;GAC5D;EACD;GACE,IAAI;IAAE,KAAK;IAA2B,SAAS;IAAS;GACxD,MAAM;IAAE,KAAK;IAA4B,SAAS;IAAS;GAC5D;EACD;GACE,IAAI;IAAE,KAAK;IAA8B,SAAS;IAAS;GAC3D,MAAM;IAAE,KAAK;IAA8B,SAAS;IAAS;GAC9D;EACD;GACE,IAAI;IAAE,KAAK;IAA0B,SAAS;IAAS;GACvD,MAAM;IAAE,KAAK;IAA2B,SAAS;IAAS;GAC3D;EACF;CAID,sBAAsB;EACpB;GACE,KAAK;GACL,SAAS;GACT,SAAS;IAAC;IAAS;IAAY;IAAmB;GACnD;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,QAAQ;GACnB;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,QAAQ;GACnB;EACF;CAID,cAAc,EACZ,UAAU;EACR;GAAE,KAAK;GAAY,SAAS;GAAS;EACrC;GAAE,KAAK;GAAY,SAAS;GAAS;EACrC;GAAE,KAAK;GAAe,SAAS;GAAS;EACzC,EACF;CACF,CAAC"}
|
package/dist/events.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
|
|
2
1
|
import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
|
|
2
|
+
import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
|
|
3
3
|
|
|
4
4
|
//#region src/events.d.ts
|
|
5
5
|
declare const DashboardCreatedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
|
package/dist/events.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
|
|
2
1
|
import { defineEvent } from "@contractspec/lib.contracts";
|
|
2
|
+
import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
|
|
3
3
|
|
|
4
4
|
//#region src/events.ts
|
|
5
5
|
const DashboardEventPayload = defineSchemaModel({
|
package/dist/example.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as _contractspec_lib_contracts6 from "@contractspec/lib.contracts";
|
|
2
2
|
|
|
3
3
|
//#region src/example.d.ts
|
|
4
|
-
declare const example: ExampleSpec;
|
|
4
|
+
declare const example: _contractspec_lib_contracts6.ExampleSpec;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { example as default };
|
|
7
7
|
//# sourceMappingURL=example.d.ts.map
|
package/dist/example.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";;;cAEM,
|
|
1
|
+
{"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";;;cAEM,SAoCJ,4BAAA,CApCW"}
|
package/dist/example.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { defineExample } from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
1
3
|
//#region src/example.ts
|
|
2
|
-
const example = {
|
|
4
|
+
const example = defineExample({
|
|
3
5
|
meta: {
|
|
4
6
|
key: "analytics-dashboard",
|
|
5
7
|
version: "1.0.0",
|
|
@@ -48,7 +50,7 @@ const example = {
|
|
|
48
50
|
},
|
|
49
51
|
mcp: { enabled: true }
|
|
50
52
|
}
|
|
51
|
-
};
|
|
53
|
+
});
|
|
52
54
|
var example_default = example;
|
|
53
55
|
|
|
54
56
|
//#endregion
|
package/dist/example.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example.js","names":[
|
|
1
|
+
{"version":3,"file":"example.js","names":[],"sources":["../src/example.ts"],"sourcesContent":["import { defineExample } from '@contractspec/lib.contracts';\n\nconst example = defineExample({\n meta: {\n key: 'analytics-dashboard',\n version: '1.0.0',\n title: 'Analytics Dashboard',\n description:\n 'Tenant-scoped dashboards, widgets, query builder, and scheduled reports (spec-first widgets/queries).',\n kind: 'template',\n visibility: 'public',\n stability: 'experimental',\n owners: ['@platform.core'],\n tags: ['analytics', 'dashboards', 'bi', 'queries'],\n },\n docs: {\n rootDocId: 'docs.examples.analytics-dashboard',\n goalDocId: 'docs.examples.analytics-dashboard.goal',\n usageDocId: 'docs.examples.analytics-dashboard.usage',\n constraintsDocId: 'docs.examples.analytics-dashboard.constraints',\n },\n entrypoints: {\n packageName: '@contractspec/example.analytics-dashboard',\n feature: './feature',\n contracts: './contracts',\n presentations: './presentations',\n handlers: './handlers',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: {\n enabled: true,\n modes: ['playground', 'specs', 'builder', 'markdown', 'evolution'],\n },\n studio: { enabled: true, installable: true },\n mcp: { enabled: true },\n },\n});\n\nexport default example;\n"],"mappings":";;;AAEA,MAAM,UAAU,cAAc;CAC5B,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,MAAM;EACN,YAAY;EACZ,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAa;GAAc;GAAM;GAAU;EACnD;CACD,MAAM;EACJ,WAAW;EACX,WAAW;EACX,YAAY;EACZ,kBAAkB;EACnB;CACD,aAAa;EACX,aAAa;EACb,SAAS;EACT,WAAW;EACX,eAAe;EACf,UAAU;EACV,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GACP,SAAS;GACT,OAAO;IAAC;IAAc;IAAS;IAAW;IAAY;IAAY;GACnE;EACD,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF,CAAC;AAEF,sBAAe"}
|