@contractspec/example.analytics-dashboard 1.57.0 → 1.58.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/dist/browser/dashboard/dashboard.enum.js +34 -0
  2. package/dist/browser/dashboard/dashboard.operation.js +289 -0
  3. package/dist/browser/dashboard/dashboard.presentation.js +197 -0
  4. package/dist/browser/dashboard/dashboard.schema.js +126 -0
  5. package/dist/browser/dashboard/dashboard.test-spec.js +213 -0
  6. package/dist/browser/dashboard/index.js +299 -0
  7. package/dist/browser/dashboard.feature.js +84 -0
  8. package/dist/browser/datasource/posthog-datasource.js +289 -0
  9. package/dist/browser/docs/analytics-dashboard.docblock.js +103 -0
  10. package/dist/browser/docs/index.js +103 -0
  11. package/dist/browser/events.js +81 -0
  12. package/dist/browser/example.js +42 -0
  13. package/dist/browser/handlers/analytics.handlers.js +278 -0
  14. package/dist/browser/handlers/index.js +571 -0
  15. package/dist/browser/handlers/query.handlers.js +294 -0
  16. package/dist/browser/index.js +1677 -0
  17. package/dist/browser/query/index.js +159 -0
  18. package/dist/browser/query/query.enum.js +11 -0
  19. package/dist/browser/query/query.operation.js +154 -0
  20. package/dist/browser/query/query.presentation.js +119 -0
  21. package/dist/browser/query/query.schema.js +70 -0
  22. package/dist/browser/query/query.test-spec.js +113 -0
  23. package/dist/browser/query-engine/index.js +491 -0
  24. package/dist/browser/seeders/index.js +20 -0
  25. package/dist/browser/ui/AnalyticsDashboard.js +394 -0
  26. package/dist/browser/ui/hooks/index.js +69 -0
  27. package/dist/browser/ui/hooks/useAnalyticsData.js +66 -0
  28. package/dist/browser/ui/index.js +671 -0
  29. package/dist/browser/ui/renderers/analytics.markdown.js +275 -0
  30. package/dist/browser/ui/renderers/index.js +275 -0
  31. package/dist/dashboard/dashboard.enum.d.ts +3 -8
  32. package/dist/dashboard/dashboard.enum.d.ts.map +1 -1
  33. package/dist/dashboard/dashboard.enum.js +31 -39
  34. package/dist/dashboard/dashboard.operation.d.ts +444 -450
  35. package/dist/dashboard/dashboard.operation.d.ts.map +1 -1
  36. package/dist/dashboard/dashboard.operation.js +284 -207
  37. package/dist/dashboard/dashboard.presentation.d.ts +3 -8
  38. package/dist/dashboard/dashboard.presentation.d.ts.map +1 -1
  39. package/dist/dashboard/dashboard.presentation.js +193 -85
  40. package/dist/dashboard/dashboard.schema.d.ts +289 -294
  41. package/dist/dashboard/dashboard.schema.d.ts.map +1 -1
  42. package/dist/dashboard/dashboard.schema.js +119 -228
  43. package/dist/dashboard/dashboard.test-spec.d.ts +4 -9
  44. package/dist/dashboard/dashboard.test-spec.d.ts.map +1 -1
  45. package/dist/dashboard/dashboard.test-spec.js +209 -228
  46. package/dist/dashboard/index.d.ts +7 -4
  47. package/dist/dashboard/index.d.ts.map +1 -0
  48. package/dist/dashboard/index.js +299 -4
  49. package/dist/dashboard.feature.d.ts +1 -6
  50. package/dist/dashboard.feature.d.ts.map +1 -1
  51. package/dist/dashboard.feature.js +83 -175
  52. package/dist/datasource/posthog-datasource.d.ts +15 -19
  53. package/dist/datasource/posthog-datasource.d.ts.map +1 -1
  54. package/dist/datasource/posthog-datasource.js +274 -238
  55. package/dist/docs/analytics-dashboard.docblock.d.ts +2 -1
  56. package/dist/docs/analytics-dashboard.docblock.d.ts.map +1 -0
  57. package/dist/docs/analytics-dashboard.docblock.js +45 -56
  58. package/dist/docs/index.d.ts +2 -1
  59. package/dist/docs/index.d.ts.map +1 -0
  60. package/dist/docs/index.js +104 -1
  61. package/dist/events.d.ts +109 -115
  62. package/dist/events.d.ts.map +1 -1
  63. package/dist/events.js +74 -120
  64. package/dist/example.d.ts +2 -6
  65. package/dist/example.d.ts.map +1 -1
  66. package/dist/example.js +41 -55
  67. package/dist/handlers/analytics.handlers.d.ts +110 -109
  68. package/dist/handlers/analytics.handlers.d.ts.map +1 -1
  69. package/dist/handlers/analytics.handlers.js +267 -298
  70. package/dist/handlers/index.d.ts +3 -3
  71. package/dist/handlers/index.d.ts.map +1 -0
  72. package/dist/handlers/index.js +571 -3
  73. package/dist/handlers/query.handlers.d.ts +7 -11
  74. package/dist/handlers/query.handlers.d.ts.map +1 -1
  75. package/dist/handlers/query.handlers.js +292 -7
  76. package/dist/index.d.ts +12 -13
  77. package/dist/index.d.ts.map +1 -0
  78. package/dist/index.js +1678 -14
  79. package/dist/node/dashboard/dashboard.enum.js +34 -0
  80. package/dist/node/dashboard/dashboard.operation.js +289 -0
  81. package/dist/node/dashboard/dashboard.presentation.js +197 -0
  82. package/dist/node/dashboard/dashboard.schema.js +126 -0
  83. package/dist/node/dashboard/dashboard.test-spec.js +213 -0
  84. package/dist/node/dashboard/index.js +299 -0
  85. package/dist/node/dashboard.feature.js +84 -0
  86. package/dist/node/datasource/posthog-datasource.js +289 -0
  87. package/dist/node/docs/analytics-dashboard.docblock.js +103 -0
  88. package/dist/node/docs/index.js +103 -0
  89. package/dist/node/events.js +81 -0
  90. package/dist/node/example.js +42 -0
  91. package/dist/node/handlers/analytics.handlers.js +278 -0
  92. package/dist/node/handlers/index.js +571 -0
  93. package/dist/node/handlers/query.handlers.js +294 -0
  94. package/dist/node/index.js +1677 -0
  95. package/dist/node/query/index.js +159 -0
  96. package/dist/node/query/query.enum.js +11 -0
  97. package/dist/node/query/query.operation.js +154 -0
  98. package/dist/node/query/query.presentation.js +119 -0
  99. package/dist/node/query/query.schema.js +70 -0
  100. package/dist/node/query/query.test-spec.js +113 -0
  101. package/dist/node/query-engine/index.js +491 -0
  102. package/dist/node/seeders/index.js +20 -0
  103. package/dist/node/ui/AnalyticsDashboard.js +394 -0
  104. package/dist/node/ui/hooks/index.js +69 -0
  105. package/dist/node/ui/hooks/useAnalyticsData.js +66 -0
  106. package/dist/node/ui/index.js +671 -0
  107. package/dist/node/ui/renderers/analytics.markdown.js +275 -0
  108. package/dist/node/ui/renderers/index.js +275 -0
  109. package/dist/query/index.d.ts +7 -4
  110. package/dist/query/index.d.ts.map +1 -0
  111. package/dist/query/index.js +159 -4
  112. package/dist/query/query.enum.d.ts +1 -6
  113. package/dist/query/query.enum.d.ts.map +1 -1
  114. package/dist/query/query.enum.js +10 -14
  115. package/dist/query/query.operation.d.ts +148 -154
  116. package/dist/query/query.operation.d.ts.map +1 -1
  117. package/dist/query/query.operation.js +151 -109
  118. package/dist/query/query.presentation.d.ts +2 -7
  119. package/dist/query/query.presentation.d.ts.map +1 -1
  120. package/dist/query/query.presentation.js +116 -56
  121. package/dist/query/query.schema.d.ts +121 -126
  122. package/dist/query/query.schema.d.ts.map +1 -1
  123. package/dist/query/query.schema.js +66 -152
  124. package/dist/query/query.test-spec.d.ts +2 -7
  125. package/dist/query/query.test-spec.d.ts.map +1 -1
  126. package/dist/query/query.test-spec.js +111 -121
  127. package/dist/query-engine/index.d.ts +84 -88
  128. package/dist/query-engine/index.d.ts.map +1 -1
  129. package/dist/query-engine/index.js +489 -188
  130. package/dist/seeders/index.d.ts +4 -8
  131. package/dist/seeders/index.d.ts.map +1 -1
  132. package/dist/seeders/index.js +18 -16
  133. package/dist/ui/AnalyticsDashboard.d.ts +1 -6
  134. package/dist/ui/AnalyticsDashboard.d.ts.map +1 -1
  135. package/dist/ui/AnalyticsDashboard.js +389 -259
  136. package/dist/ui/hooks/index.d.ts +2 -2
  137. package/dist/ui/hooks/index.d.ts.map +1 -0
  138. package/dist/ui/hooks/index.js +69 -4
  139. package/dist/ui/hooks/useAnalyticsData.d.ts +16 -20
  140. package/dist/ui/hooks/useAnalyticsData.d.ts.map +1 -1
  141. package/dist/ui/hooks/useAnalyticsData.js +63 -69
  142. package/dist/ui/index.d.ts +7 -6
  143. package/dist/ui/index.d.ts.map +1 -0
  144. package/dist/ui/index.js +671 -5
  145. package/dist/ui/renderers/analytics.markdown.d.ts +13 -14
  146. package/dist/ui/renderers/analytics.markdown.d.ts.map +1 -1
  147. package/dist/ui/renderers/analytics.markdown.js +266 -254
  148. package/dist/ui/renderers/index.d.ts +2 -2
  149. package/dist/ui/renderers/index.d.ts.map +1 -0
  150. package/dist/ui/renderers/index.js +275 -2
  151. package/package.json +328 -67
  152. package/dist/dashboard/dashboard.enum.js.map +0 -1
  153. package/dist/dashboard/dashboard.operation.js.map +0 -1
  154. package/dist/dashboard/dashboard.presentation.js.map +0 -1
  155. package/dist/dashboard/dashboard.schema.js.map +0 -1
  156. package/dist/dashboard/dashboard.test-spec.js.map +0 -1
  157. package/dist/dashboard.feature.js.map +0 -1
  158. package/dist/datasource/posthog-datasource.js.map +0 -1
  159. package/dist/docs/analytics-dashboard.docblock.js.map +0 -1
  160. package/dist/events.js.map +0 -1
  161. package/dist/example.js.map +0 -1
  162. package/dist/handlers/analytics.handlers.js.map +0 -1
  163. package/dist/handlers/query.handlers.js.map +0 -1
  164. package/dist/query/query.enum.js.map +0 -1
  165. package/dist/query/query.operation.js.map +0 -1
  166. package/dist/query/query.presentation.js.map +0 -1
  167. package/dist/query/query.schema.js.map +0 -1
  168. package/dist/query/query.test-spec.js.map +0 -1
  169. package/dist/query-engine/index.js.map +0 -1
  170. package/dist/seeders/index.js.map +0 -1
  171. package/dist/ui/AnalyticsDashboard.js.map +0 -1
  172. package/dist/ui/hooks/useAnalyticsData.js.map +0 -1
  173. package/dist/ui/renderers/analytics.markdown.js.map +0 -1
@@ -1,5 +1,160 @@
1
- import { QueryTypeEnum } from "./query.enum.js";
2
- import { CreateQueryInputModel, ExecuteQueryInputModel, QueryModel, QueryResultModel } from "./query.schema.js";
3
- import { CreateQueryContract, ExecuteQueryContract } from "./query.operation.js";
1
+ // @bun
2
+ // src/query/query.enum.ts
3
+ import { defineEnum } from "@contractspec/lib.schema";
4
+ var QueryTypeEnum = defineEnum("QueryType", [
5
+ "SQL",
6
+ "METRIC",
7
+ "AGGREGATION",
8
+ "CUSTOM"
9
+ ]);
4
10
 
5
- export { CreateQueryContract, CreateQueryInputModel, ExecuteQueryContract, ExecuteQueryInputModel, QueryModel, QueryResultModel, QueryTypeEnum };
11
+ // src/query/query.schema.ts
12
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
13
+ var QueryModel = defineSchemaModel({
14
+ name: "QueryModel",
15
+ fields: {
16
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
17
+ name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
18
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
19
+ type: { type: QueryTypeEnum, isOptional: false },
20
+ definition: { type: ScalarTypeEnum.JSON(), isOptional: false },
21
+ sql: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
22
+ cacheTtlSeconds: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
23
+ isShared: { type: ScalarTypeEnum.Boolean(), isOptional: false },
24
+ createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
25
+ }
26
+ });
27
+ var QueryResultModel = defineSchemaModel({
28
+ name: "QueryResultModel",
29
+ fields: {
30
+ queryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
31
+ data: { type: ScalarTypeEnum.JSON(), isOptional: false },
32
+ columns: { type: ScalarTypeEnum.JSON(), isOptional: false },
33
+ rowCount: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
34
+ executionTimeMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
35
+ cachedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
36
+ error: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
37
+ }
38
+ });
39
+ var CreateQueryInputModel = defineSchemaModel({
40
+ name: "CreateQueryInput",
41
+ fields: {
42
+ name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
43
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
44
+ type: { type: QueryTypeEnum, isOptional: false },
45
+ definition: { type: ScalarTypeEnum.JSON(), isOptional: false },
46
+ sql: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
47
+ metricIds: {
48
+ type: ScalarTypeEnum.String_unsecure(),
49
+ isArray: true,
50
+ isOptional: true
51
+ },
52
+ cacheTtlSeconds: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
53
+ isShared: { type: ScalarTypeEnum.Boolean(), isOptional: true }
54
+ }
55
+ });
56
+ var ExecuteQueryInputModel = defineSchemaModel({
57
+ name: "ExecuteQueryInput",
58
+ fields: {
59
+ queryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
60
+ parameters: { type: ScalarTypeEnum.JSON(), isOptional: true },
61
+ dateRange: { type: ScalarTypeEnum.JSON(), isOptional: true },
62
+ filters: { type: ScalarTypeEnum.JSON(), isOptional: true },
63
+ forceRefresh: { type: ScalarTypeEnum.Boolean(), isOptional: true }
64
+ }
65
+ });
66
+
67
+ // src/query/query.operation.ts
68
+ import {
69
+ defineCommand,
70
+ defineQuery
71
+ } from "@contractspec/lib.contracts/operations";
72
+ var OWNERS = ["@example.analytics-dashboard"];
73
+ var CreateQueryContract = defineCommand({
74
+ meta: {
75
+ key: "analytics.query.create",
76
+ version: "1.0.0",
77
+ stability: "stable",
78
+ owners: [...OWNERS],
79
+ tags: ["analytics", "query", "create"],
80
+ description: "Create a data query.",
81
+ goal: "Define reusable data queries.",
82
+ context: "Query builder."
83
+ },
84
+ io: { input: CreateQueryInputModel, output: QueryModel },
85
+ policy: { auth: "user" },
86
+ sideEffects: {
87
+ emits: [
88
+ {
89
+ key: "analytics.query.created",
90
+ version: "1.0.0",
91
+ stability: "stable",
92
+ owners: [...OWNERS],
93
+ tags: ["analytics", "query", "created"],
94
+ when: "Query created",
95
+ payload: QueryModel
96
+ }
97
+ ],
98
+ audit: ["analytics.query.created"]
99
+ },
100
+ acceptance: {
101
+ scenarios: [
102
+ {
103
+ key: "create-query-happy-path",
104
+ given: ["User is authenticated"],
105
+ when: ["User submits valid query definition"],
106
+ then: ["Query is created", "QueryCreated event is emitted"]
107
+ }
108
+ ],
109
+ examples: [
110
+ {
111
+ key: "create-sql-query",
112
+ input: {
113
+ name: "Monthly Revenue",
114
+ sql: "SELECT SUM(amount) FROM orders WHERE date >= :startDate"
115
+ },
116
+ output: { id: "query-123", name: "Monthly Revenue", type: "sql" }
117
+ }
118
+ ]
119
+ }
120
+ });
121
+ var ExecuteQueryContract = defineQuery({
122
+ meta: {
123
+ key: "analytics.query.execute",
124
+ version: "1.0.0",
125
+ stability: "stable",
126
+ owners: [...OWNERS],
127
+ tags: ["analytics", "query", "execute"],
128
+ description: "Execute a data query.",
129
+ goal: "Fetch data for visualizations.",
130
+ context: "Dashboard rendering."
131
+ },
132
+ io: { input: ExecuteQueryInputModel, output: QueryResultModel },
133
+ policy: { auth: "user" },
134
+ acceptance: {
135
+ scenarios: [
136
+ {
137
+ key: "execute-query-happy-path",
138
+ given: ["Query exists"],
139
+ when: ["User executes query with parameters"],
140
+ then: ["Query results are returned"]
141
+ }
142
+ ],
143
+ examples: [
144
+ {
145
+ key: "execute-with-params",
146
+ input: { queryId: "query-123", params: { startDate: "2025-01-01" } },
147
+ output: { columns: ["total"], rows: [{ total: 50000 }], rowCount: 1 }
148
+ }
149
+ ]
150
+ }
151
+ });
152
+ export {
153
+ QueryTypeEnum,
154
+ QueryResultModel,
155
+ QueryModel,
156
+ ExecuteQueryInputModel,
157
+ ExecuteQueryContract,
158
+ CreateQueryInputModel,
159
+ CreateQueryContract
160
+ };
@@ -1,10 +1,5 @@
1
- import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
2
-
3
- //#region src/query/query.enum.d.ts
4
1
  /**
5
2
  * Query type enum.
6
3
  */
7
- declare const QueryTypeEnum: _contractspec_lib_schema0.EnumType<[string, string, string, string]>;
8
- //#endregion
9
- export { QueryTypeEnum };
4
+ export declare const QueryTypeEnum: import("@contractspec/lib.schema").EnumType<[string, string, string, string]>;
10
5
  //# sourceMappingURL=query.enum.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query.enum.d.ts","names":[],"sources":["../../src/query/query.enum.ts"],"mappings":";;;;;;cAKa,aAAA,EAKX,yBAAA,CALwB,QAAA"}
1
+ {"version":3,"file":"query.enum.d.ts","sourceRoot":"","sources":["../../src/query/query.enum.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,aAAa,+EAKxB,CAAC"}
@@ -1,16 +1,12 @@
1
+ // @bun
2
+ // src/query/query.enum.ts
1
3
  import { defineEnum } from "@contractspec/lib.schema";
2
-
3
- //#region src/query/query.enum.ts
4
- /**
5
- * Query type enum.
6
- */
7
- const QueryTypeEnum = defineEnum("QueryType", [
8
- "SQL",
9
- "METRIC",
10
- "AGGREGATION",
11
- "CUSTOM"
4
+ var QueryTypeEnum = defineEnum("QueryType", [
5
+ "SQL",
6
+ "METRIC",
7
+ "AGGREGATION",
8
+ "CUSTOM"
12
9
  ]);
13
-
14
- //#endregion
15
- export { QueryTypeEnum };
16
- //# sourceMappingURL=query.enum.js.map
10
+ export {
11
+ QueryTypeEnum
12
+ };
@@ -1,181 +1,175 @@
1
- import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
2
- import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
3
-
4
- //#region src/query/query.operation.d.ts
5
1
  /**
6
2
  * Create a data query.
7
3
  */
8
- declare const CreateQueryContract: _contractspec_lib_contracts0.OperationSpec<_contractspec_lib_schema0.SchemaModel<{
9
- name: {
10
- type: _contractspec_lib_schema0.FieldType<string, string>;
11
- isOptional: false;
12
- };
13
- description: {
14
- type: _contractspec_lib_schema0.FieldType<string, string>;
15
- isOptional: true;
16
- };
17
- type: {
18
- type: _contractspec_lib_schema0.EnumType<[string, string, string, string]>;
19
- isOptional: false;
20
- };
21
- definition: {
22
- type: _contractspec_lib_schema0.FieldType<unknown, unknown>;
23
- isOptional: false;
24
- };
25
- sql: {
26
- type: _contractspec_lib_schema0.FieldType<string, string>;
27
- isOptional: true;
28
- };
29
- metricIds: {
30
- type: _contractspec_lib_schema0.FieldType<string, string>;
31
- isArray: true;
32
- isOptional: true;
33
- };
34
- cacheTtlSeconds: {
35
- type: _contractspec_lib_schema0.FieldType<number, number>;
36
- isOptional: true;
37
- };
38
- isShared: {
39
- type: _contractspec_lib_schema0.FieldType<boolean, boolean>;
40
- isOptional: true;
41
- };
42
- }>, _contractspec_lib_schema0.SchemaModel<{
43
- id: {
44
- type: _contractspec_lib_schema0.FieldType<string, string>;
45
- isOptional: false;
46
- };
47
- name: {
48
- type: _contractspec_lib_schema0.FieldType<string, string>;
49
- isOptional: false;
50
- };
51
- description: {
52
- type: _contractspec_lib_schema0.FieldType<string, string>;
53
- isOptional: true;
54
- };
55
- type: {
56
- type: _contractspec_lib_schema0.EnumType<[string, string, string, string]>;
57
- isOptional: false;
58
- };
59
- definition: {
60
- type: _contractspec_lib_schema0.FieldType<unknown, unknown>;
61
- isOptional: false;
62
- };
63
- sql: {
64
- type: _contractspec_lib_schema0.FieldType<string, string>;
65
- isOptional: true;
66
- };
67
- cacheTtlSeconds: {
68
- type: _contractspec_lib_schema0.FieldType<number, number>;
69
- isOptional: false;
70
- };
71
- isShared: {
72
- type: _contractspec_lib_schema0.FieldType<boolean, boolean>;
73
- isOptional: false;
74
- };
75
- createdAt: {
76
- type: _contractspec_lib_schema0.FieldType<Date, string>;
77
- isOptional: false;
78
- };
79
- }>, {
80
- key: string;
81
- version: string;
82
- stability: string;
83
- owners: "@example.analytics-dashboard"[];
84
- tags: string[];
85
- when: string;
86
- payload: _contractspec_lib_schema0.SchemaModel<{
4
+ export declare const CreateQueryContract: import("@contractspec/lib.contracts").OperationSpec<import("@contractspec/lib.schema").SchemaModel<{
5
+ name: {
6
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
7
+ isOptional: false;
8
+ };
9
+ description: {
10
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
11
+ isOptional: true;
12
+ };
13
+ type: {
14
+ type: import("@contractspec/lib.schema").EnumType<[string, string, string, string]>;
15
+ isOptional: false;
16
+ };
17
+ definition: {
18
+ type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
19
+ isOptional: false;
20
+ };
21
+ sql: {
22
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
23
+ isOptional: true;
24
+ };
25
+ metricIds: {
26
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
27
+ isArray: true;
28
+ isOptional: true;
29
+ };
30
+ cacheTtlSeconds: {
31
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
32
+ isOptional: true;
33
+ };
34
+ isShared: {
35
+ type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
36
+ isOptional: true;
37
+ };
38
+ }>, import("@contractspec/lib.schema").SchemaModel<{
87
39
  id: {
88
- type: _contractspec_lib_schema0.FieldType<string, string>;
89
- isOptional: false;
40
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
41
+ isOptional: false;
90
42
  };
91
43
  name: {
92
- type: _contractspec_lib_schema0.FieldType<string, string>;
93
- isOptional: false;
44
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
45
+ isOptional: false;
94
46
  };
95
47
  description: {
96
- type: _contractspec_lib_schema0.FieldType<string, string>;
97
- isOptional: true;
48
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
49
+ isOptional: true;
98
50
  };
99
51
  type: {
100
- type: _contractspec_lib_schema0.EnumType<[string, string, string, string]>;
101
- isOptional: false;
52
+ type: import("@contractspec/lib.schema").EnumType<[string, string, string, string]>;
53
+ isOptional: false;
102
54
  };
103
55
  definition: {
104
- type: _contractspec_lib_schema0.FieldType<unknown, unknown>;
105
- isOptional: false;
56
+ type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
57
+ isOptional: false;
106
58
  };
107
59
  sql: {
108
- type: _contractspec_lib_schema0.FieldType<string, string>;
109
- isOptional: true;
60
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
61
+ isOptional: true;
110
62
  };
111
63
  cacheTtlSeconds: {
112
- type: _contractspec_lib_schema0.FieldType<number, number>;
113
- isOptional: false;
64
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
65
+ isOptional: false;
114
66
  };
115
67
  isShared: {
116
- type: _contractspec_lib_schema0.FieldType<boolean, boolean>;
117
- isOptional: false;
68
+ type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
69
+ isOptional: false;
118
70
  };
119
71
  createdAt: {
120
- type: _contractspec_lib_schema0.FieldType<Date, string>;
121
- isOptional: false;
72
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
73
+ isOptional: false;
122
74
  };
123
- }>;
75
+ }>, {
76
+ key: string;
77
+ version: string;
78
+ stability: string;
79
+ owners: "@example.analytics-dashboard"[];
80
+ tags: string[];
81
+ when: string;
82
+ payload: import("@contractspec/lib.schema").SchemaModel<{
83
+ id: {
84
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
85
+ isOptional: false;
86
+ };
87
+ name: {
88
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
89
+ isOptional: false;
90
+ };
91
+ description: {
92
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
93
+ isOptional: true;
94
+ };
95
+ type: {
96
+ type: import("@contractspec/lib.schema").EnumType<[string, string, string, string]>;
97
+ isOptional: false;
98
+ };
99
+ definition: {
100
+ type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
101
+ isOptional: false;
102
+ };
103
+ sql: {
104
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
105
+ isOptional: true;
106
+ };
107
+ cacheTtlSeconds: {
108
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
109
+ isOptional: false;
110
+ };
111
+ isShared: {
112
+ type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
113
+ isOptional: false;
114
+ };
115
+ createdAt: {
116
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
117
+ isOptional: false;
118
+ };
119
+ }>;
124
120
  }[]>;
125
121
  /**
126
122
  * Execute a data query.
127
123
  */
128
- declare const ExecuteQueryContract: _contractspec_lib_contracts0.OperationSpec<_contractspec_lib_schema0.SchemaModel<{
129
- queryId: {
130
- type: _contractspec_lib_schema0.FieldType<string, string>;
131
- isOptional: false;
132
- };
133
- parameters: {
134
- type: _contractspec_lib_schema0.FieldType<unknown, unknown>;
135
- isOptional: true;
136
- };
137
- dateRange: {
138
- type: _contractspec_lib_schema0.FieldType<unknown, unknown>;
139
- isOptional: true;
140
- };
141
- filters: {
142
- type: _contractspec_lib_schema0.FieldType<unknown, unknown>;
143
- isOptional: true;
144
- };
145
- forceRefresh: {
146
- type: _contractspec_lib_schema0.FieldType<boolean, boolean>;
147
- isOptional: true;
148
- };
149
- }>, _contractspec_lib_schema0.SchemaModel<{
150
- queryId: {
151
- type: _contractspec_lib_schema0.FieldType<string, string>;
152
- isOptional: false;
153
- };
154
- data: {
155
- type: _contractspec_lib_schema0.FieldType<unknown, unknown>;
156
- isOptional: false;
157
- };
158
- columns: {
159
- type: _contractspec_lib_schema0.FieldType<unknown, unknown>;
160
- isOptional: false;
161
- };
162
- rowCount: {
163
- type: _contractspec_lib_schema0.FieldType<number, number>;
164
- isOptional: false;
165
- };
166
- executionTimeMs: {
167
- type: _contractspec_lib_schema0.FieldType<number, number>;
168
- isOptional: false;
169
- };
170
- cachedAt: {
171
- type: _contractspec_lib_schema0.FieldType<Date, string>;
172
- isOptional: true;
173
- };
174
- error: {
175
- type: _contractspec_lib_schema0.FieldType<string, string>;
176
- isOptional: true;
177
- };
124
+ export declare const ExecuteQueryContract: import("@contractspec/lib.contracts").OperationSpec<import("@contractspec/lib.schema").SchemaModel<{
125
+ queryId: {
126
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
127
+ isOptional: false;
128
+ };
129
+ parameters: {
130
+ type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
131
+ isOptional: true;
132
+ };
133
+ dateRange: {
134
+ type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
135
+ isOptional: true;
136
+ };
137
+ filters: {
138
+ type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
139
+ isOptional: true;
140
+ };
141
+ forceRefresh: {
142
+ type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
143
+ isOptional: true;
144
+ };
145
+ }>, import("@contractspec/lib.schema").SchemaModel<{
146
+ queryId: {
147
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
148
+ isOptional: false;
149
+ };
150
+ data: {
151
+ type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
152
+ isOptional: false;
153
+ };
154
+ columns: {
155
+ type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
156
+ isOptional: false;
157
+ };
158
+ rowCount: {
159
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
160
+ isOptional: false;
161
+ };
162
+ executionTimeMs: {
163
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
164
+ isOptional: false;
165
+ };
166
+ cachedAt: {
167
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
168
+ isOptional: true;
169
+ };
170
+ error: {
171
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
172
+ isOptional: true;
173
+ };
178
174
  }>, undefined>;
179
- //#endregion
180
- export { CreateQueryContract, ExecuteQueryContract };
181
175
  //# sourceMappingURL=query.operation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query.operation.d.ts","names":[],"sources":["../../src/query/query.operation.ts"],"mappings":";;;;;;;cAgBa,mBAAA,+BAAmB,aAAA,2BAAA,WAAA;;UA+C9B,yBAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA/C8B,yBAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAoDnB,oBAAA,+BAAoB,aAAA,2BAAA,WAAA;;UA8B/B,yBAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;UA9B+B,yBAAA,CAAA,SAAA"}
1
+ {"version":3,"file":"query.operation.d.ts","sourceRoot":"","sources":["../../src/query/query.operation.ts"],"names":[],"mappings":"AAaA;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+C9B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8B/B,CAAC"}