@contractspec/example.analytics-dashboard 1.51.0 → 1.53.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.presentation.js +1 -1
- package/dist/dashboard/dashboard.presentation.js.map +1 -1
- package/dist/dashboard.feature.js +3 -3
- package/dist/dashboard.feature.js.map +1 -1
- package/dist/query/query.enum.d.ts +2 -2
- package/dist/query/query.operation.d.ts +45 -45
- package/dist/query/query.schema.d.ts +34 -34
- package/dist/query/query.test-spec.d.ts +3 -3
- package/package.json +8 -8
|
@@ -4,7 +4,7 @@ import { StabilityEnum, definePresentation } from "@contractspec/lib.contracts";
|
|
|
4
4
|
//#region src/dashboard/dashboard.presentation.ts
|
|
5
5
|
const DashboardsListPresentation = definePresentation({
|
|
6
6
|
meta: {
|
|
7
|
-
key: "analytics.dashboard.
|
|
7
|
+
key: "analytics.dashboard.viewList",
|
|
8
8
|
version: "1.0.0",
|
|
9
9
|
title: "Dashboards List",
|
|
10
10
|
description: "List of analytics dashboards",
|
|
@@ -1 +1 @@
|
|
|
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.
|
|
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.viewList',\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"}
|
|
@@ -68,7 +68,7 @@ const AnalyticsDashboardFeature = defineFeature({
|
|
|
68
68
|
],
|
|
69
69
|
presentations: [
|
|
70
70
|
{
|
|
71
|
-
key: "analytics.dashboard.
|
|
71
|
+
key: "analytics.dashboard.viewList",
|
|
72
72
|
version: "1.0.0"
|
|
73
73
|
},
|
|
74
74
|
{
|
|
@@ -95,7 +95,7 @@ const AnalyticsDashboardFeature = defineFeature({
|
|
|
95
95
|
version: "1.0.0"
|
|
96
96
|
},
|
|
97
97
|
pres: {
|
|
98
|
-
key: "analytics.dashboard.
|
|
98
|
+
key: "analytics.dashboard.viewList",
|
|
99
99
|
version: "1.0.0"
|
|
100
100
|
}
|
|
101
101
|
},
|
|
@@ -132,7 +132,7 @@ const AnalyticsDashboardFeature = defineFeature({
|
|
|
132
132
|
],
|
|
133
133
|
presentationsTargets: [
|
|
134
134
|
{
|
|
135
|
-
key: "analytics.dashboard.
|
|
135
|
+
key: "analytics.dashboard.viewList",
|
|
136
136
|
version: "1.0.0",
|
|
137
137
|
targets: [
|
|
138
138
|
"react",
|
|
@@ -1 +1 @@
|
|
|
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.
|
|
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.viewList', 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.viewList', 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.viewList',\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;GAAgC,SAAS;GAAS;EACzD;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;IAAgC,SAAS;IAAS;GAChE;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"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema323 from "@contractspec/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/query/query.enum.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Query type enum.
|
|
6
6
|
*/
|
|
7
|
-
declare const QueryTypeEnum:
|
|
7
|
+
declare const QueryTypeEnum: _contractspec_lib_schema323.EnumType<[string, string, string, string]>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { QueryTypeEnum };
|
|
10
10
|
//# sourceMappingURL=query.enum.d.ts.map
|
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_contracts18 from "@contractspec/lib.contracts";
|
|
2
|
+
import * as _contractspec_lib_schema247 from "@contractspec/lib.schema";
|
|
3
3
|
|
|
4
4
|
//#region src/query/query.operation.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Create a data query.
|
|
7
7
|
*/
|
|
8
|
-
declare const CreateQueryContract:
|
|
8
|
+
declare const CreateQueryContract: _contractspec_lib_contracts18.OperationSpec<_contractspec_lib_schema247.SchemaModel<{
|
|
9
9
|
name: {
|
|
10
|
-
type:
|
|
10
|
+
type: _contractspec_lib_schema247.FieldType<string, string>;
|
|
11
11
|
isOptional: false;
|
|
12
12
|
};
|
|
13
13
|
description: {
|
|
14
|
-
type:
|
|
14
|
+
type: _contractspec_lib_schema247.FieldType<string, string>;
|
|
15
15
|
isOptional: true;
|
|
16
16
|
};
|
|
17
17
|
type: {
|
|
18
|
-
type:
|
|
18
|
+
type: _contractspec_lib_schema247.EnumType<[string, string, string, string]>;
|
|
19
19
|
isOptional: false;
|
|
20
20
|
};
|
|
21
21
|
definition: {
|
|
22
|
-
type:
|
|
22
|
+
type: _contractspec_lib_schema247.FieldType<unknown, unknown>;
|
|
23
23
|
isOptional: false;
|
|
24
24
|
};
|
|
25
25
|
sql: {
|
|
26
|
-
type:
|
|
26
|
+
type: _contractspec_lib_schema247.FieldType<string, string>;
|
|
27
27
|
isOptional: true;
|
|
28
28
|
};
|
|
29
29
|
metricIds: {
|
|
30
|
-
type:
|
|
30
|
+
type: _contractspec_lib_schema247.FieldType<string, string>;
|
|
31
31
|
isArray: true;
|
|
32
32
|
isOptional: true;
|
|
33
33
|
};
|
|
34
34
|
cacheTtlSeconds: {
|
|
35
|
-
type:
|
|
35
|
+
type: _contractspec_lib_schema247.FieldType<number, number>;
|
|
36
36
|
isOptional: true;
|
|
37
37
|
};
|
|
38
38
|
isShared: {
|
|
39
|
-
type:
|
|
39
|
+
type: _contractspec_lib_schema247.FieldType<boolean, boolean>;
|
|
40
40
|
isOptional: true;
|
|
41
41
|
};
|
|
42
|
-
}>,
|
|
42
|
+
}>, _contractspec_lib_schema247.SchemaModel<{
|
|
43
43
|
id: {
|
|
44
|
-
type:
|
|
44
|
+
type: _contractspec_lib_schema247.FieldType<string, string>;
|
|
45
45
|
isOptional: false;
|
|
46
46
|
};
|
|
47
47
|
name: {
|
|
48
|
-
type:
|
|
48
|
+
type: _contractspec_lib_schema247.FieldType<string, string>;
|
|
49
49
|
isOptional: false;
|
|
50
50
|
};
|
|
51
51
|
description: {
|
|
52
|
-
type:
|
|
52
|
+
type: _contractspec_lib_schema247.FieldType<string, string>;
|
|
53
53
|
isOptional: true;
|
|
54
54
|
};
|
|
55
55
|
type: {
|
|
56
|
-
type:
|
|
56
|
+
type: _contractspec_lib_schema247.EnumType<[string, string, string, string]>;
|
|
57
57
|
isOptional: false;
|
|
58
58
|
};
|
|
59
59
|
definition: {
|
|
60
|
-
type:
|
|
60
|
+
type: _contractspec_lib_schema247.FieldType<unknown, unknown>;
|
|
61
61
|
isOptional: false;
|
|
62
62
|
};
|
|
63
63
|
sql: {
|
|
64
|
-
type:
|
|
64
|
+
type: _contractspec_lib_schema247.FieldType<string, string>;
|
|
65
65
|
isOptional: true;
|
|
66
66
|
};
|
|
67
67
|
cacheTtlSeconds: {
|
|
68
|
-
type:
|
|
68
|
+
type: _contractspec_lib_schema247.FieldType<number, number>;
|
|
69
69
|
isOptional: false;
|
|
70
70
|
};
|
|
71
71
|
isShared: {
|
|
72
|
-
type:
|
|
72
|
+
type: _contractspec_lib_schema247.FieldType<boolean, boolean>;
|
|
73
73
|
isOptional: false;
|
|
74
74
|
};
|
|
75
75
|
createdAt: {
|
|
76
|
-
type:
|
|
76
|
+
type: _contractspec_lib_schema247.FieldType<Date, string>;
|
|
77
77
|
isOptional: false;
|
|
78
78
|
};
|
|
79
79
|
}>, {
|
|
@@ -83,41 +83,41 @@ declare const CreateQueryContract: _contractspec_lib_contracts20.OperationSpec<_
|
|
|
83
83
|
owners: "@example.analytics-dashboard"[];
|
|
84
84
|
tags: string[];
|
|
85
85
|
when: string;
|
|
86
|
-
payload:
|
|
86
|
+
payload: _contractspec_lib_schema247.SchemaModel<{
|
|
87
87
|
id: {
|
|
88
|
-
type:
|
|
88
|
+
type: _contractspec_lib_schema247.FieldType<string, string>;
|
|
89
89
|
isOptional: false;
|
|
90
90
|
};
|
|
91
91
|
name: {
|
|
92
|
-
type:
|
|
92
|
+
type: _contractspec_lib_schema247.FieldType<string, string>;
|
|
93
93
|
isOptional: false;
|
|
94
94
|
};
|
|
95
95
|
description: {
|
|
96
|
-
type:
|
|
96
|
+
type: _contractspec_lib_schema247.FieldType<string, string>;
|
|
97
97
|
isOptional: true;
|
|
98
98
|
};
|
|
99
99
|
type: {
|
|
100
|
-
type:
|
|
100
|
+
type: _contractspec_lib_schema247.EnumType<[string, string, string, string]>;
|
|
101
101
|
isOptional: false;
|
|
102
102
|
};
|
|
103
103
|
definition: {
|
|
104
|
-
type:
|
|
104
|
+
type: _contractspec_lib_schema247.FieldType<unknown, unknown>;
|
|
105
105
|
isOptional: false;
|
|
106
106
|
};
|
|
107
107
|
sql: {
|
|
108
|
-
type:
|
|
108
|
+
type: _contractspec_lib_schema247.FieldType<string, string>;
|
|
109
109
|
isOptional: true;
|
|
110
110
|
};
|
|
111
111
|
cacheTtlSeconds: {
|
|
112
|
-
type:
|
|
112
|
+
type: _contractspec_lib_schema247.FieldType<number, number>;
|
|
113
113
|
isOptional: false;
|
|
114
114
|
};
|
|
115
115
|
isShared: {
|
|
116
|
-
type:
|
|
116
|
+
type: _contractspec_lib_schema247.FieldType<boolean, boolean>;
|
|
117
117
|
isOptional: false;
|
|
118
118
|
};
|
|
119
119
|
createdAt: {
|
|
120
|
-
type:
|
|
120
|
+
type: _contractspec_lib_schema247.FieldType<Date, string>;
|
|
121
121
|
isOptional: false;
|
|
122
122
|
};
|
|
123
123
|
}>;
|
|
@@ -125,54 +125,54 @@ declare const CreateQueryContract: _contractspec_lib_contracts20.OperationSpec<_
|
|
|
125
125
|
/**
|
|
126
126
|
* Execute a data query.
|
|
127
127
|
*/
|
|
128
|
-
declare const ExecuteQueryContract:
|
|
128
|
+
declare const ExecuteQueryContract: _contractspec_lib_contracts18.OperationSpec<_contractspec_lib_schema247.SchemaModel<{
|
|
129
129
|
queryId: {
|
|
130
|
-
type:
|
|
130
|
+
type: _contractspec_lib_schema247.FieldType<string, string>;
|
|
131
131
|
isOptional: false;
|
|
132
132
|
};
|
|
133
133
|
parameters: {
|
|
134
|
-
type:
|
|
134
|
+
type: _contractspec_lib_schema247.FieldType<unknown, unknown>;
|
|
135
135
|
isOptional: true;
|
|
136
136
|
};
|
|
137
137
|
dateRange: {
|
|
138
|
-
type:
|
|
138
|
+
type: _contractspec_lib_schema247.FieldType<unknown, unknown>;
|
|
139
139
|
isOptional: true;
|
|
140
140
|
};
|
|
141
141
|
filters: {
|
|
142
|
-
type:
|
|
142
|
+
type: _contractspec_lib_schema247.FieldType<unknown, unknown>;
|
|
143
143
|
isOptional: true;
|
|
144
144
|
};
|
|
145
145
|
forceRefresh: {
|
|
146
|
-
type:
|
|
146
|
+
type: _contractspec_lib_schema247.FieldType<boolean, boolean>;
|
|
147
147
|
isOptional: true;
|
|
148
148
|
};
|
|
149
|
-
}>,
|
|
149
|
+
}>, _contractspec_lib_schema247.SchemaModel<{
|
|
150
150
|
queryId: {
|
|
151
|
-
type:
|
|
151
|
+
type: _contractspec_lib_schema247.FieldType<string, string>;
|
|
152
152
|
isOptional: false;
|
|
153
153
|
};
|
|
154
154
|
data: {
|
|
155
|
-
type:
|
|
155
|
+
type: _contractspec_lib_schema247.FieldType<unknown, unknown>;
|
|
156
156
|
isOptional: false;
|
|
157
157
|
};
|
|
158
158
|
columns: {
|
|
159
|
-
type:
|
|
159
|
+
type: _contractspec_lib_schema247.FieldType<unknown, unknown>;
|
|
160
160
|
isOptional: false;
|
|
161
161
|
};
|
|
162
162
|
rowCount: {
|
|
163
|
-
type:
|
|
163
|
+
type: _contractspec_lib_schema247.FieldType<number, number>;
|
|
164
164
|
isOptional: false;
|
|
165
165
|
};
|
|
166
166
|
executionTimeMs: {
|
|
167
|
-
type:
|
|
167
|
+
type: _contractspec_lib_schema247.FieldType<number, number>;
|
|
168
168
|
isOptional: false;
|
|
169
169
|
};
|
|
170
170
|
cachedAt: {
|
|
171
|
-
type:
|
|
171
|
+
type: _contractspec_lib_schema247.FieldType<Date, string>;
|
|
172
172
|
isOptional: true;
|
|
173
173
|
};
|
|
174
174
|
error: {
|
|
175
|
-
type:
|
|
175
|
+
type: _contractspec_lib_schema247.FieldType<string, string>;
|
|
176
176
|
isOptional: true;
|
|
177
177
|
};
|
|
178
178
|
}>, undefined>;
|
|
@@ -1,140 +1,140 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema290 from "@contractspec/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/query/query.schema.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* A data query.
|
|
6
6
|
*/
|
|
7
|
-
declare const QueryModel:
|
|
7
|
+
declare const QueryModel: _contractspec_lib_schema290.SchemaModel<{
|
|
8
8
|
id: {
|
|
9
|
-
type:
|
|
9
|
+
type: _contractspec_lib_schema290.FieldType<string, string>;
|
|
10
10
|
isOptional: false;
|
|
11
11
|
};
|
|
12
12
|
name: {
|
|
13
|
-
type:
|
|
13
|
+
type: _contractspec_lib_schema290.FieldType<string, string>;
|
|
14
14
|
isOptional: false;
|
|
15
15
|
};
|
|
16
16
|
description: {
|
|
17
|
-
type:
|
|
17
|
+
type: _contractspec_lib_schema290.FieldType<string, string>;
|
|
18
18
|
isOptional: true;
|
|
19
19
|
};
|
|
20
20
|
type: {
|
|
21
|
-
type:
|
|
21
|
+
type: _contractspec_lib_schema290.EnumType<[string, string, string, string]>;
|
|
22
22
|
isOptional: false;
|
|
23
23
|
};
|
|
24
24
|
definition: {
|
|
25
|
-
type:
|
|
25
|
+
type: _contractspec_lib_schema290.FieldType<unknown, unknown>;
|
|
26
26
|
isOptional: false;
|
|
27
27
|
};
|
|
28
28
|
sql: {
|
|
29
|
-
type:
|
|
29
|
+
type: _contractspec_lib_schema290.FieldType<string, string>;
|
|
30
30
|
isOptional: true;
|
|
31
31
|
};
|
|
32
32
|
cacheTtlSeconds: {
|
|
33
|
-
type:
|
|
33
|
+
type: _contractspec_lib_schema290.FieldType<number, number>;
|
|
34
34
|
isOptional: false;
|
|
35
35
|
};
|
|
36
36
|
isShared: {
|
|
37
|
-
type:
|
|
37
|
+
type: _contractspec_lib_schema290.FieldType<boolean, boolean>;
|
|
38
38
|
isOptional: false;
|
|
39
39
|
};
|
|
40
40
|
createdAt: {
|
|
41
|
-
type:
|
|
41
|
+
type: _contractspec_lib_schema290.FieldType<Date, string>;
|
|
42
42
|
isOptional: false;
|
|
43
43
|
};
|
|
44
44
|
}>;
|
|
45
45
|
/**
|
|
46
46
|
* Query execution result.
|
|
47
47
|
*/
|
|
48
|
-
declare const QueryResultModel:
|
|
48
|
+
declare const QueryResultModel: _contractspec_lib_schema290.SchemaModel<{
|
|
49
49
|
queryId: {
|
|
50
|
-
type:
|
|
50
|
+
type: _contractspec_lib_schema290.FieldType<string, string>;
|
|
51
51
|
isOptional: false;
|
|
52
52
|
};
|
|
53
53
|
data: {
|
|
54
|
-
type:
|
|
54
|
+
type: _contractspec_lib_schema290.FieldType<unknown, unknown>;
|
|
55
55
|
isOptional: false;
|
|
56
56
|
};
|
|
57
57
|
columns: {
|
|
58
|
-
type:
|
|
58
|
+
type: _contractspec_lib_schema290.FieldType<unknown, unknown>;
|
|
59
59
|
isOptional: false;
|
|
60
60
|
};
|
|
61
61
|
rowCount: {
|
|
62
|
-
type:
|
|
62
|
+
type: _contractspec_lib_schema290.FieldType<number, number>;
|
|
63
63
|
isOptional: false;
|
|
64
64
|
};
|
|
65
65
|
executionTimeMs: {
|
|
66
|
-
type:
|
|
66
|
+
type: _contractspec_lib_schema290.FieldType<number, number>;
|
|
67
67
|
isOptional: false;
|
|
68
68
|
};
|
|
69
69
|
cachedAt: {
|
|
70
|
-
type:
|
|
70
|
+
type: _contractspec_lib_schema290.FieldType<Date, string>;
|
|
71
71
|
isOptional: true;
|
|
72
72
|
};
|
|
73
73
|
error: {
|
|
74
|
-
type:
|
|
74
|
+
type: _contractspec_lib_schema290.FieldType<string, string>;
|
|
75
75
|
isOptional: true;
|
|
76
76
|
};
|
|
77
77
|
}>;
|
|
78
78
|
/**
|
|
79
79
|
* Input for creating a query.
|
|
80
80
|
*/
|
|
81
|
-
declare const CreateQueryInputModel:
|
|
81
|
+
declare const CreateQueryInputModel: _contractspec_lib_schema290.SchemaModel<{
|
|
82
82
|
name: {
|
|
83
|
-
type:
|
|
83
|
+
type: _contractspec_lib_schema290.FieldType<string, string>;
|
|
84
84
|
isOptional: false;
|
|
85
85
|
};
|
|
86
86
|
description: {
|
|
87
|
-
type:
|
|
87
|
+
type: _contractspec_lib_schema290.FieldType<string, string>;
|
|
88
88
|
isOptional: true;
|
|
89
89
|
};
|
|
90
90
|
type: {
|
|
91
|
-
type:
|
|
91
|
+
type: _contractspec_lib_schema290.EnumType<[string, string, string, string]>;
|
|
92
92
|
isOptional: false;
|
|
93
93
|
};
|
|
94
94
|
definition: {
|
|
95
|
-
type:
|
|
95
|
+
type: _contractspec_lib_schema290.FieldType<unknown, unknown>;
|
|
96
96
|
isOptional: false;
|
|
97
97
|
};
|
|
98
98
|
sql: {
|
|
99
|
-
type:
|
|
99
|
+
type: _contractspec_lib_schema290.FieldType<string, string>;
|
|
100
100
|
isOptional: true;
|
|
101
101
|
};
|
|
102
102
|
metricIds: {
|
|
103
|
-
type:
|
|
103
|
+
type: _contractspec_lib_schema290.FieldType<string, string>;
|
|
104
104
|
isArray: true;
|
|
105
105
|
isOptional: true;
|
|
106
106
|
};
|
|
107
107
|
cacheTtlSeconds: {
|
|
108
|
-
type:
|
|
108
|
+
type: _contractspec_lib_schema290.FieldType<number, number>;
|
|
109
109
|
isOptional: true;
|
|
110
110
|
};
|
|
111
111
|
isShared: {
|
|
112
|
-
type:
|
|
112
|
+
type: _contractspec_lib_schema290.FieldType<boolean, boolean>;
|
|
113
113
|
isOptional: true;
|
|
114
114
|
};
|
|
115
115
|
}>;
|
|
116
116
|
/**
|
|
117
117
|
* Input for executing a query.
|
|
118
118
|
*/
|
|
119
|
-
declare const ExecuteQueryInputModel:
|
|
119
|
+
declare const ExecuteQueryInputModel: _contractspec_lib_schema290.SchemaModel<{
|
|
120
120
|
queryId: {
|
|
121
|
-
type:
|
|
121
|
+
type: _contractspec_lib_schema290.FieldType<string, string>;
|
|
122
122
|
isOptional: false;
|
|
123
123
|
};
|
|
124
124
|
parameters: {
|
|
125
|
-
type:
|
|
125
|
+
type: _contractspec_lib_schema290.FieldType<unknown, unknown>;
|
|
126
126
|
isOptional: true;
|
|
127
127
|
};
|
|
128
128
|
dateRange: {
|
|
129
|
-
type:
|
|
129
|
+
type: _contractspec_lib_schema290.FieldType<unknown, unknown>;
|
|
130
130
|
isOptional: true;
|
|
131
131
|
};
|
|
132
132
|
filters: {
|
|
133
|
-
type:
|
|
133
|
+
type: _contractspec_lib_schema290.FieldType<unknown, unknown>;
|
|
134
134
|
isOptional: true;
|
|
135
135
|
};
|
|
136
136
|
forceRefresh: {
|
|
137
|
-
type:
|
|
137
|
+
type: _contractspec_lib_schema290.FieldType<boolean, boolean>;
|
|
138
138
|
isOptional: true;
|
|
139
139
|
};
|
|
140
140
|
}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_contracts20 from "@contractspec/lib.contracts";
|
|
2
2
|
|
|
3
3
|
//#region src/query/query.test-spec.d.ts
|
|
4
|
-
declare const CreateQueryTest:
|
|
5
|
-
declare const ExecuteQueryTest:
|
|
4
|
+
declare const CreateQueryTest: _contractspec_lib_contracts20.TestSpec;
|
|
5
|
+
declare const ExecuteQueryTest: _contractspec_lib_contracts20.TestSpec;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { CreateQueryTest, ExecuteQueryTest };
|
|
8
8
|
//# sourceMappingURL=query.test-spec.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/example.analytics-dashboard",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.53.0",
|
|
4
4
|
"description": "Analytics Dashboard example with widgets and query engine for ContractSpec",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
"lint:check": "eslint src"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@contractspec/lib.schema": "1.
|
|
21
|
-
"@contractspec/lib.contracts": "1.
|
|
22
|
-
"@contractspec/lib.example-shared-ui": "1.
|
|
23
|
-
"@contractspec/lib.design-system": "1.
|
|
24
|
-
"@contractspec/lib.runtime-sandbox": "0.
|
|
20
|
+
"@contractspec/lib.schema": "1.53.0",
|
|
21
|
+
"@contractspec/lib.contracts": "1.53.0",
|
|
22
|
+
"@contractspec/lib.example-shared-ui": "1.7.0",
|
|
23
|
+
"@contractspec/lib.design-system": "1.53.0",
|
|
24
|
+
"@contractspec/lib.runtime-sandbox": "0.8.0",
|
|
25
25
|
"react": "19.2.3",
|
|
26
26
|
"react-dom": "19.2.3"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@contractspec/tool.typescript": "1.
|
|
30
|
-
"@contractspec/tool.tsdown": "1.
|
|
29
|
+
"@contractspec/tool.typescript": "1.53.0",
|
|
30
|
+
"@contractspec/tool.tsdown": "1.53.0",
|
|
31
31
|
"typescript": "^5.9.3",
|
|
32
32
|
"@types/react": "^19.2.8",
|
|
33
33
|
"@types/react-dom": "^19.2.2"
|