@lssm/example.analytics-dashboard 0.0.0-canary-20251217062139 → 0.0.0-canary-20251217060834

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 (138) hide show
  1. package/dist/dashboard/dashboard.contracts.d.ts +130 -130
  2. package/dist/dashboard/dashboard.contracts.js +5 -5
  3. package/dist/dashboard/dashboard.enum.d.ts +4 -4
  4. package/dist/dashboard/dashboard.enum.js +4 -5
  5. package/dist/dashboard/dashboard.schema.d.ts +79 -79
  6. package/dist/dashboard/dashboard.schema.js +42 -44
  7. package/dist/docs/analytics-dashboard.docblock.js +2 -3
  8. package/dist/events.d.ts +39 -39
  9. package/dist/events.js +24 -27
  10. package/dist/index.d.ts +1 -0
  11. package/dist/query/query.contracts.d.ts +1 -1
  12. package/dist/query/query.contracts.js +3 -3
  13. package/dist/query/query.enum.d.ts +2 -2
  14. package/dist/query/query.enum.js +2 -3
  15. package/dist/query/query.schema.d.ts +34 -34
  16. package/dist/query/query.schema.js +32 -34
  17. package/package.json +10 -10
  18. package/dist/libs/contracts/dist/capabilities/openbanking.js +0 -84
  19. package/dist/libs/contracts/dist/client/index.js +0 -5
  20. package/dist/libs/contracts/dist/client/react/feature-render.js +0 -2
  21. package/dist/libs/contracts/dist/client/react/form-render.js +0 -4
  22. package/dist/libs/contracts/dist/client/react/index.js +0 -4
  23. package/dist/libs/contracts/dist/contract-registry/index.js +0 -1
  24. package/dist/libs/contracts/dist/contract-registry/schemas.js +0 -57
  25. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -91
  26. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -365
  27. package/dist/libs/contracts/dist/docs/index.js +0 -29
  28. package/dist/libs/contracts/dist/docs/presentations.js +0 -67
  29. package/dist/libs/contracts/dist/docs/registry.js +0 -42
  30. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -398
  31. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -83
  32. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -155
  33. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -101
  34. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
  35. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +0 -80
  36. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +0 -57
  37. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -228
  38. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +0 -357
  39. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +0 -21
  40. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +0 -16
  41. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +0 -281
  42. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +0 -22
  43. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +0 -79
  44. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +0 -84
  45. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +0 -57
  46. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +0 -22
  47. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -40
  48. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +0 -86
  49. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +0 -22
  50. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +0 -62
  51. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +0 -155
  52. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +0 -20
  53. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +0 -101
  54. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +0 -20
  55. package/dist/libs/contracts/dist/events.js +0 -9
  56. package/dist/libs/contracts/dist/experiments/evaluator.js +0 -1
  57. package/dist/libs/contracts/dist/index.js +0 -71
  58. package/dist/libs/contracts/dist/install.js +0 -2
  59. package/dist/libs/contracts/dist/integrations/contracts.js +0 -371
  60. package/dist/libs/contracts/dist/integrations/index.js +0 -18
  61. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +0 -225
  62. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +0 -157
  63. package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +0 -3
  64. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +0 -208
  65. package/dist/libs/contracts/dist/integrations/openbanking/models.js +0 -240
  66. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +0 -24
  67. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +0 -52
  68. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +0 -75
  69. package/dist/libs/contracts/dist/integrations/providers/gmail.js +0 -87
  70. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +0 -66
  71. package/dist/libs/contracts/dist/integrations/providers/index.js +0 -11
  72. package/dist/libs/contracts/dist/integrations/providers/mistral.js +0 -68
  73. package/dist/libs/contracts/dist/integrations/providers/postmark.js +0 -68
  74. package/dist/libs/contracts/dist/integrations/providers/powens.js +0 -116
  75. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +0 -73
  76. package/dist/libs/contracts/dist/integrations/providers/registry.js +0 -10
  77. package/dist/libs/contracts/dist/integrations/providers/stripe.js +0 -83
  78. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +0 -61
  79. package/dist/libs/contracts/dist/jsonschema.js +0 -1
  80. package/dist/libs/contracts/dist/knowledge/contracts.js +0 -299
  81. package/dist/libs/contracts/dist/knowledge/index.js +0 -7
  82. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +0 -34
  83. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +0 -34
  84. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +0 -38
  85. package/dist/libs/contracts/dist/knowledge/spaces/index.js +0 -6
  86. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +0 -34
  87. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +0 -37
  88. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +0 -34
  89. package/dist/libs/contracts/dist/llm/exporters.js +0 -18
  90. package/dist/libs/contracts/dist/llm/index.js +0 -2
  91. package/dist/libs/contracts/dist/llm/prompts.js +0 -1
  92. package/dist/libs/contracts/dist/onboarding-base.js +0 -179
  93. package/dist/libs/contracts/dist/openapi.js +0 -1
  94. package/dist/libs/contracts/dist/ownership.js +0 -36
  95. package/dist/libs/contracts/dist/presentations.js +0 -1
  96. package/dist/libs/contracts/dist/presentations.v2.js +0 -7
  97. package/dist/libs/contracts/dist/prompt.js +0 -1
  98. package/dist/libs/contracts/dist/promptRegistry.js +0 -1
  99. package/dist/libs/contracts/dist/regenerator/index.js +0 -1
  100. package/dist/libs/contracts/dist/regenerator/service.js +0 -1
  101. package/dist/libs/contracts/dist/registry.js +0 -2
  102. package/dist/libs/contracts/dist/resources.js +0 -1
  103. package/dist/libs/contracts/dist/schema/dist/EnumType.js +0 -2
  104. package/dist/libs/contracts/dist/schema/dist/FieldType.js +0 -39
  105. package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -222
  106. package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +0 -23
  107. package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
  108. package/dist/libs/contracts/dist/schema/dist/entity/index.js +0 -2
  109. package/dist/libs/contracts/dist/schema/dist/entity/types.js +0 -1
  110. package/dist/libs/contracts/dist/schema/dist/index.js +0 -6
  111. package/dist/libs/contracts/dist/server/graphql-pothos.js +0 -6
  112. package/dist/libs/contracts/dist/server/index.js +0 -8
  113. package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +0 -4
  114. package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +0 -2
  115. package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +0 -1
  116. package/dist/libs/contracts/dist/server/mcp/registerResources.js +0 -2
  117. package/dist/libs/contracts/dist/server/mcp/registerTools.js +0 -1
  118. package/dist/libs/contracts/dist/server/provider-mcp.js +0 -1
  119. package/dist/libs/contracts/dist/server/rest-elysia.js +0 -1
  120. package/dist/libs/contracts/dist/server/rest-express.js +0 -1
  121. package/dist/libs/contracts/dist/server/rest-generic.js +0 -1
  122. package/dist/libs/contracts/dist/server/rest-next-app.js +0 -1
  123. package/dist/libs/contracts/dist/server/rest-next-pages.js +0 -1
  124. package/dist/libs/contracts/dist/spec.js +0 -25
  125. package/dist/libs/contracts/dist/telemetry/index.js +0 -1
  126. package/dist/libs/contracts/dist/telemetry/tracker.js +0 -1
  127. package/dist/libs/contracts/dist/tests/index.js +0 -1
  128. package/dist/libs/contracts/dist/tests/runner.js +0 -2
  129. package/dist/libs/contracts/dist/workflow/index.js +0 -1
  130. package/dist/libs/contracts/dist/workflow/runner.js +0 -1
  131. package/dist/libs/schema/dist/EnumType.js +0 -40
  132. package/dist/libs/schema/dist/FieldType.js +0 -39
  133. package/dist/libs/schema/dist/ScalarTypeEnum.js +0 -222
  134. package/dist/libs/schema/dist/SchemaModel.js +0 -24
  135. package/dist/libs/schema/dist/entity/defineEntity.js +0 -1
  136. package/dist/libs/schema/dist/entity/index.js +0 -2
  137. package/dist/libs/schema/dist/entity/types.js +0 -1
  138. package/dist/libs/schema/dist/index.js +0 -6
@@ -1,25 +1,23 @@
1
- import { l } from "../libs/schema/dist/ScalarTypeEnum.js";
2
- import { n } from "../libs/schema/dist/SchemaModel.js";
3
- import "../libs/schema/dist/index.js";
4
1
  import { DashboardStatusEnum, RefreshIntervalEnum, WidgetTypeEnum } from "./dashboard.enum.js";
2
+ import { ScalarTypeEnum, defineSchemaModel } from "@lssm/lib.schema";
5
3
 
6
4
  //#region src/dashboard/dashboard.schema.ts
7
5
  /**
8
6
  * A dashboard widget.
9
7
  */
10
- const WidgetModel = n({
8
+ const WidgetModel = defineSchemaModel({
11
9
  name: "WidgetModel",
12
10
  fields: {
13
11
  id: {
14
- type: l.String_unsecure(),
12
+ type: ScalarTypeEnum.String_unsecure(),
15
13
  isOptional: false
16
14
  },
17
15
  dashboardId: {
18
- type: l.String_unsecure(),
16
+ type: ScalarTypeEnum.String_unsecure(),
19
17
  isOptional: false
20
18
  },
21
19
  name: {
22
- type: l.String_unsecure(),
20
+ type: ScalarTypeEnum.String_unsecure(),
23
21
  isOptional: false
24
22
  },
25
23
  type: {
@@ -27,27 +25,27 @@ const WidgetModel = n({
27
25
  isOptional: false
28
26
  },
29
27
  gridX: {
30
- type: l.Int_unsecure(),
28
+ type: ScalarTypeEnum.Int_unsecure(),
31
29
  isOptional: false
32
30
  },
33
31
  gridY: {
34
- type: l.Int_unsecure(),
32
+ type: ScalarTypeEnum.Int_unsecure(),
35
33
  isOptional: false
36
34
  },
37
35
  gridWidth: {
38
- type: l.Int_unsecure(),
36
+ type: ScalarTypeEnum.Int_unsecure(),
39
37
  isOptional: false
40
38
  },
41
39
  gridHeight: {
42
- type: l.Int_unsecure(),
40
+ type: ScalarTypeEnum.Int_unsecure(),
43
41
  isOptional: false
44
42
  },
45
43
  queryId: {
46
- type: l.String_unsecure(),
44
+ type: ScalarTypeEnum.String_unsecure(),
47
45
  isOptional: true
48
46
  },
49
47
  config: {
50
- type: l.JSON(),
48
+ type: ScalarTypeEnum.JSON(),
51
49
  isOptional: true
52
50
  }
53
51
  }
@@ -55,23 +53,23 @@ const WidgetModel = n({
55
53
  /**
56
54
  * An analytics dashboard.
57
55
  */
58
- const DashboardModel = n({
56
+ const DashboardModel = defineSchemaModel({
59
57
  name: "DashboardModel",
60
58
  fields: {
61
59
  id: {
62
- type: l.String_unsecure(),
60
+ type: ScalarTypeEnum.String_unsecure(),
63
61
  isOptional: false
64
62
  },
65
63
  name: {
66
- type: l.String_unsecure(),
64
+ type: ScalarTypeEnum.String_unsecure(),
67
65
  isOptional: false
68
66
  },
69
67
  slug: {
70
- type: l.String_unsecure(),
68
+ type: ScalarTypeEnum.String_unsecure(),
71
69
  isOptional: false
72
70
  },
73
71
  description: {
74
- type: l.String_unsecure(),
72
+ type: ScalarTypeEnum.String_unsecure(),
75
73
  isOptional: true
76
74
  },
77
75
  status: {
@@ -83,7 +81,7 @@ const DashboardModel = n({
83
81
  isOptional: false
84
82
  },
85
83
  isPublic: {
86
- type: l.Boolean(),
84
+ type: ScalarTypeEnum.Boolean(),
87
85
  isOptional: false
88
86
  },
89
87
  widgets: {
@@ -92,7 +90,7 @@ const DashboardModel = n({
92
90
  isOptional: true
93
91
  },
94
92
  createdAt: {
95
- type: l.DateTime(),
93
+ type: ScalarTypeEnum.DateTime(),
96
94
  isOptional: false
97
95
  }
98
96
  }
@@ -100,19 +98,19 @@ const DashboardModel = n({
100
98
  /**
101
99
  * Input for creating a dashboard.
102
100
  */
103
- const CreateDashboardInputModel = n({
101
+ const CreateDashboardInputModel = defineSchemaModel({
104
102
  name: "CreateDashboardInput",
105
103
  fields: {
106
104
  name: {
107
- type: l.NonEmptyString(),
105
+ type: ScalarTypeEnum.NonEmptyString(),
108
106
  isOptional: false
109
107
  },
110
108
  slug: {
111
- type: l.NonEmptyString(),
109
+ type: ScalarTypeEnum.NonEmptyString(),
112
110
  isOptional: false
113
111
  },
114
112
  description: {
115
- type: l.String_unsecure(),
113
+ type: ScalarTypeEnum.String_unsecure(),
116
114
  isOptional: true
117
115
  },
118
116
  refreshInterval: {
@@ -120,7 +118,7 @@ const CreateDashboardInputModel = n({
120
118
  isOptional: true
121
119
  },
122
120
  dateRange: {
123
- type: l.JSON(),
121
+ type: ScalarTypeEnum.JSON(),
124
122
  isOptional: true
125
123
  }
126
124
  }
@@ -128,15 +126,15 @@ const CreateDashboardInputModel = n({
128
126
  /**
129
127
  * Input for adding a widget.
130
128
  */
131
- const AddWidgetInputModel = n({
129
+ const AddWidgetInputModel = defineSchemaModel({
132
130
  name: "AddWidgetInput",
133
131
  fields: {
134
132
  dashboardId: {
135
- type: l.String_unsecure(),
133
+ type: ScalarTypeEnum.String_unsecure(),
136
134
  isOptional: false
137
135
  },
138
136
  name: {
139
- type: l.NonEmptyString(),
137
+ type: ScalarTypeEnum.NonEmptyString(),
140
138
  isOptional: false
141
139
  },
142
140
  type: {
@@ -144,27 +142,27 @@ const AddWidgetInputModel = n({
144
142
  isOptional: false
145
143
  },
146
144
  gridX: {
147
- type: l.Int_unsecure(),
145
+ type: ScalarTypeEnum.Int_unsecure(),
148
146
  isOptional: true
149
147
  },
150
148
  gridY: {
151
- type: l.Int_unsecure(),
149
+ type: ScalarTypeEnum.Int_unsecure(),
152
150
  isOptional: true
153
151
  },
154
152
  gridWidth: {
155
- type: l.Int_unsecure(),
153
+ type: ScalarTypeEnum.Int_unsecure(),
156
154
  isOptional: true
157
155
  },
158
156
  gridHeight: {
159
- type: l.Int_unsecure(),
157
+ type: ScalarTypeEnum.Int_unsecure(),
160
158
  isOptional: true
161
159
  },
162
160
  queryId: {
163
- type: l.String_unsecure(),
161
+ type: ScalarTypeEnum.String_unsecure(),
164
162
  isOptional: true
165
163
  },
166
164
  config: {
167
- type: l.JSON(),
165
+ type: ScalarTypeEnum.JSON(),
168
166
  isOptional: true
169
167
  }
170
168
  }
@@ -172,7 +170,7 @@ const AddWidgetInputModel = n({
172
170
  /**
173
171
  * Input for listing dashboards.
174
172
  */
175
- const ListDashboardsInputModel = n({
173
+ const ListDashboardsInputModel = defineSchemaModel({
176
174
  name: "ListDashboardsInput",
177
175
  fields: {
178
176
  status: {
@@ -180,16 +178,16 @@ const ListDashboardsInputModel = n({
180
178
  isOptional: true
181
179
  },
182
180
  search: {
183
- type: l.String_unsecure(),
181
+ type: ScalarTypeEnum.String_unsecure(),
184
182
  isOptional: true
185
183
  },
186
184
  limit: {
187
- type: l.Int_unsecure(),
185
+ type: ScalarTypeEnum.Int_unsecure(),
188
186
  isOptional: true,
189
187
  defaultValue: 20
190
188
  },
191
189
  offset: {
192
- type: l.Int_unsecure(),
190
+ type: ScalarTypeEnum.Int_unsecure(),
193
191
  isOptional: true,
194
192
  defaultValue: 0
195
193
  }
@@ -198,7 +196,7 @@ const ListDashboardsInputModel = n({
198
196
  /**
199
197
  * Output for listing dashboards.
200
198
  */
201
- const ListDashboardsOutputModel = n({
199
+ const ListDashboardsOutputModel = defineSchemaModel({
202
200
  name: "ListDashboardsOutput",
203
201
  fields: {
204
202
  dashboards: {
@@ -207,7 +205,7 @@ const ListDashboardsOutputModel = n({
207
205
  isOptional: false
208
206
  },
209
207
  total: {
210
- type: l.Int_unsecure(),
208
+ type: ScalarTypeEnum.Int_unsecure(),
211
209
  isOptional: false
212
210
  }
213
211
  }
@@ -215,19 +213,19 @@ const ListDashboardsOutputModel = n({
215
213
  /**
216
214
  * Input for getting a dashboard.
217
215
  */
218
- const GetDashboardInputModel = n({
216
+ const GetDashboardInputModel = defineSchemaModel({
219
217
  name: "GetDashboardInput",
220
218
  fields: {
221
219
  dashboardId: {
222
- type: l.String_unsecure(),
220
+ type: ScalarTypeEnum.String_unsecure(),
223
221
  isOptional: true
224
222
  },
225
223
  slug: {
226
- type: l.String_unsecure(),
224
+ type: ScalarTypeEnum.String_unsecure(),
227
225
  isOptional: true
228
226
  },
229
227
  shareToken: {
230
- type: l.String_unsecure(),
228
+ type: ScalarTypeEnum.String_unsecure(),
231
229
  isOptional: true
232
230
  }
233
231
  }
@@ -1,8 +1,7 @@
1
- import { a } from "../libs/contracts/dist/docs/registry.js";
2
- import "../libs/contracts/dist/docs/index.js";
1
+ import { registerDocBlocks } from "@lssm/lib.contracts/docs";
3
2
 
4
3
  //#region src/docs/analytics-dashboard.docblock.ts
5
- a([
4
+ registerDocBlocks([
6
5
  {
7
6
  id: "docs.examples.analytics-dashboard",
8
7
  title: "Analytics Dashboard",
package/dist/events.d.ts CHANGED
@@ -1,145 +1,145 @@
1
+ import * as _lssm_lib_schema0 from "@lssm/lib.schema";
1
2
  import * as _lssm_lib_contracts0 from "@lssm/lib.contracts";
2
- import * as _lssm_lib_schema3 from "@lssm/lib.schema";
3
3
 
4
4
  //#region src/events.d.ts
5
- declare const DashboardCreatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema3.SchemaModel<{
5
+ declare const DashboardCreatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
6
6
  dashboardId: {
7
- type: _lssm_lib_schema3.FieldType<string, string>;
7
+ type: _lssm_lib_schema0.FieldType<string, string>;
8
8
  isOptional: false;
9
9
  };
10
10
  title: {
11
- type: _lssm_lib_schema3.FieldType<string, string>;
11
+ type: _lssm_lib_schema0.FieldType<string, string>;
12
12
  isOptional: false;
13
13
  };
14
14
  orgId: {
15
- type: _lssm_lib_schema3.FieldType<string, string>;
15
+ type: _lssm_lib_schema0.FieldType<string, string>;
16
16
  isOptional: false;
17
17
  };
18
18
  createdBy: {
19
- type: _lssm_lib_schema3.FieldType<string, string>;
19
+ type: _lssm_lib_schema0.FieldType<string, string>;
20
20
  isOptional: false;
21
21
  };
22
22
  timestamp: {
23
- type: _lssm_lib_schema3.FieldType<Date, string>;
23
+ type: _lssm_lib_schema0.FieldType<Date, string>;
24
24
  isOptional: false;
25
25
  };
26
26
  }>>;
27
- declare const WidgetAddedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema3.SchemaModel<{
27
+ declare const WidgetAddedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
28
28
  widgetId: {
29
- type: _lssm_lib_schema3.FieldType<string, string>;
29
+ type: _lssm_lib_schema0.FieldType<string, string>;
30
30
  isOptional: false;
31
31
  };
32
32
  dashboardId: {
33
- type: _lssm_lib_schema3.FieldType<string, string>;
33
+ type: _lssm_lib_schema0.FieldType<string, string>;
34
34
  isOptional: false;
35
35
  };
36
36
  widgetType: {
37
- type: _lssm_lib_schema3.FieldType<string, string>;
37
+ type: _lssm_lib_schema0.FieldType<string, string>;
38
38
  isOptional: false;
39
39
  };
40
40
  orgId: {
41
- type: _lssm_lib_schema3.FieldType<string, string>;
41
+ type: _lssm_lib_schema0.FieldType<string, string>;
42
42
  isOptional: false;
43
43
  };
44
44
  timestamp: {
45
- type: _lssm_lib_schema3.FieldType<Date, string>;
45
+ type: _lssm_lib_schema0.FieldType<Date, string>;
46
46
  isOptional: false;
47
47
  };
48
48
  }>>;
49
- declare const QueryCreatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema3.SchemaModel<{
49
+ declare const QueryCreatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
50
50
  queryId: {
51
- type: _lssm_lib_schema3.FieldType<string, string>;
51
+ type: _lssm_lib_schema0.FieldType<string, string>;
52
52
  isOptional: false;
53
53
  };
54
54
  name: {
55
- type: _lssm_lib_schema3.FieldType<string, string>;
55
+ type: _lssm_lib_schema0.FieldType<string, string>;
56
56
  isOptional: false;
57
57
  };
58
58
  queryType: {
59
- type: _lssm_lib_schema3.FieldType<string, string>;
59
+ type: _lssm_lib_schema0.FieldType<string, string>;
60
60
  isOptional: false;
61
61
  };
62
62
  orgId: {
63
- type: _lssm_lib_schema3.FieldType<string, string>;
63
+ type: _lssm_lib_schema0.FieldType<string, string>;
64
64
  isOptional: false;
65
65
  };
66
66
  createdBy: {
67
- type: _lssm_lib_schema3.FieldType<string, string>;
67
+ type: _lssm_lib_schema0.FieldType<string, string>;
68
68
  isOptional: false;
69
69
  };
70
70
  timestamp: {
71
- type: _lssm_lib_schema3.FieldType<Date, string>;
71
+ type: _lssm_lib_schema0.FieldType<Date, string>;
72
72
  isOptional: false;
73
73
  };
74
74
  }>>;
75
75
  declare const AnalyticsDashboardEvents: {
76
- DashboardCreatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema3.SchemaModel<{
76
+ DashboardCreatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
77
77
  dashboardId: {
78
- type: _lssm_lib_schema3.FieldType<string, string>;
78
+ type: _lssm_lib_schema0.FieldType<string, string>;
79
79
  isOptional: false;
80
80
  };
81
81
  title: {
82
- type: _lssm_lib_schema3.FieldType<string, string>;
82
+ type: _lssm_lib_schema0.FieldType<string, string>;
83
83
  isOptional: false;
84
84
  };
85
85
  orgId: {
86
- type: _lssm_lib_schema3.FieldType<string, string>;
86
+ type: _lssm_lib_schema0.FieldType<string, string>;
87
87
  isOptional: false;
88
88
  };
89
89
  createdBy: {
90
- type: _lssm_lib_schema3.FieldType<string, string>;
90
+ type: _lssm_lib_schema0.FieldType<string, string>;
91
91
  isOptional: false;
92
92
  };
93
93
  timestamp: {
94
- type: _lssm_lib_schema3.FieldType<Date, string>;
94
+ type: _lssm_lib_schema0.FieldType<Date, string>;
95
95
  isOptional: false;
96
96
  };
97
97
  }>>;
98
- WidgetAddedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema3.SchemaModel<{
98
+ WidgetAddedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
99
99
  widgetId: {
100
- type: _lssm_lib_schema3.FieldType<string, string>;
100
+ type: _lssm_lib_schema0.FieldType<string, string>;
101
101
  isOptional: false;
102
102
  };
103
103
  dashboardId: {
104
- type: _lssm_lib_schema3.FieldType<string, string>;
104
+ type: _lssm_lib_schema0.FieldType<string, string>;
105
105
  isOptional: false;
106
106
  };
107
107
  widgetType: {
108
- type: _lssm_lib_schema3.FieldType<string, string>;
108
+ type: _lssm_lib_schema0.FieldType<string, string>;
109
109
  isOptional: false;
110
110
  };
111
111
  orgId: {
112
- type: _lssm_lib_schema3.FieldType<string, string>;
112
+ type: _lssm_lib_schema0.FieldType<string, string>;
113
113
  isOptional: false;
114
114
  };
115
115
  timestamp: {
116
- type: _lssm_lib_schema3.FieldType<Date, string>;
116
+ type: _lssm_lib_schema0.FieldType<Date, string>;
117
117
  isOptional: false;
118
118
  };
119
119
  }>>;
120
- QueryCreatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema3.SchemaModel<{
120
+ QueryCreatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
121
121
  queryId: {
122
- type: _lssm_lib_schema3.FieldType<string, string>;
122
+ type: _lssm_lib_schema0.FieldType<string, string>;
123
123
  isOptional: false;
124
124
  };
125
125
  name: {
126
- type: _lssm_lib_schema3.FieldType<string, string>;
126
+ type: _lssm_lib_schema0.FieldType<string, string>;
127
127
  isOptional: false;
128
128
  };
129
129
  queryType: {
130
- type: _lssm_lib_schema3.FieldType<string, string>;
130
+ type: _lssm_lib_schema0.FieldType<string, string>;
131
131
  isOptional: false;
132
132
  };
133
133
  orgId: {
134
- type: _lssm_lib_schema3.FieldType<string, string>;
134
+ type: _lssm_lib_schema0.FieldType<string, string>;
135
135
  isOptional: false;
136
136
  };
137
137
  createdBy: {
138
- type: _lssm_lib_schema3.FieldType<string, string>;
138
+ type: _lssm_lib_schema0.FieldType<string, string>;
139
139
  isOptional: false;
140
140
  };
141
141
  timestamp: {
142
- type: _lssm_lib_schema3.FieldType<Date, string>;
142
+ type: _lssm_lib_schema0.FieldType<Date, string>;
143
143
  isOptional: false;
144
144
  };
145
145
  }>>;
package/dist/events.js CHANGED
@@ -1,105 +1,102 @@
1
- import { l } from "./libs/schema/dist/ScalarTypeEnum.js";
2
- import { n } from "./libs/schema/dist/SchemaModel.js";
3
- import "./libs/schema/dist/index.js";
4
- import { e } from "./libs/contracts/dist/events.js";
5
- import "./libs/contracts/dist/index.js";
1
+ import { ScalarTypeEnum, defineSchemaModel } from "@lssm/lib.schema";
2
+ import { defineEvent } from "@lssm/lib.contracts";
6
3
 
7
4
  //#region src/events.ts
8
- const DashboardEventPayload = n({
5
+ const DashboardEventPayload = defineSchemaModel({
9
6
  name: "DashboardEventPayload",
10
7
  description: "Payload for dashboard events",
11
8
  fields: {
12
9
  dashboardId: {
13
- type: l.String_unsecure(),
10
+ type: ScalarTypeEnum.String_unsecure(),
14
11
  isOptional: false
15
12
  },
16
13
  title: {
17
- type: l.String_unsecure(),
14
+ type: ScalarTypeEnum.String_unsecure(),
18
15
  isOptional: false
19
16
  },
20
17
  orgId: {
21
- type: l.String_unsecure(),
18
+ type: ScalarTypeEnum.String_unsecure(),
22
19
  isOptional: false
23
20
  },
24
21
  createdBy: {
25
- type: l.String_unsecure(),
22
+ type: ScalarTypeEnum.String_unsecure(),
26
23
  isOptional: false
27
24
  },
28
25
  timestamp: {
29
- type: l.DateTime(),
26
+ type: ScalarTypeEnum.DateTime(),
30
27
  isOptional: false
31
28
  }
32
29
  }
33
30
  });
34
- const WidgetEventPayload = n({
31
+ const WidgetEventPayload = defineSchemaModel({
35
32
  name: "WidgetEventPayload",
36
33
  description: "Payload for widget events",
37
34
  fields: {
38
35
  widgetId: {
39
- type: l.String_unsecure(),
36
+ type: ScalarTypeEnum.String_unsecure(),
40
37
  isOptional: false
41
38
  },
42
39
  dashboardId: {
43
- type: l.String_unsecure(),
40
+ type: ScalarTypeEnum.String_unsecure(),
44
41
  isOptional: false
45
42
  },
46
43
  widgetType: {
47
- type: l.String_unsecure(),
44
+ type: ScalarTypeEnum.String_unsecure(),
48
45
  isOptional: false
49
46
  },
50
47
  orgId: {
51
- type: l.String_unsecure(),
48
+ type: ScalarTypeEnum.String_unsecure(),
52
49
  isOptional: false
53
50
  },
54
51
  timestamp: {
55
- type: l.DateTime(),
52
+ type: ScalarTypeEnum.DateTime(),
56
53
  isOptional: false
57
54
  }
58
55
  }
59
56
  });
60
- const QueryEventPayload = n({
57
+ const QueryEventPayload = defineSchemaModel({
61
58
  name: "QueryEventPayload",
62
59
  description: "Payload for query events",
63
60
  fields: {
64
61
  queryId: {
65
- type: l.String_unsecure(),
62
+ type: ScalarTypeEnum.String_unsecure(),
66
63
  isOptional: false
67
64
  },
68
65
  name: {
69
- type: l.String_unsecure(),
66
+ type: ScalarTypeEnum.String_unsecure(),
70
67
  isOptional: false
71
68
  },
72
69
  queryType: {
73
- type: l.String_unsecure(),
70
+ type: ScalarTypeEnum.String_unsecure(),
74
71
  isOptional: false
75
72
  },
76
73
  orgId: {
77
- type: l.String_unsecure(),
74
+ type: ScalarTypeEnum.String_unsecure(),
78
75
  isOptional: false
79
76
  },
80
77
  createdBy: {
81
- type: l.String_unsecure(),
78
+ type: ScalarTypeEnum.String_unsecure(),
82
79
  isOptional: false
83
80
  },
84
81
  timestamp: {
85
- type: l.DateTime(),
82
+ type: ScalarTypeEnum.DateTime(),
86
83
  isOptional: false
87
84
  }
88
85
  }
89
86
  });
90
- const DashboardCreatedEvent = e({
87
+ const DashboardCreatedEvent = defineEvent({
91
88
  name: "analytics.dashboard.created",
92
89
  version: 1,
93
90
  description: "A dashboard was created.",
94
91
  payload: DashboardEventPayload
95
92
  });
96
- const WidgetAddedEvent = e({
93
+ const WidgetAddedEvent = defineEvent({
97
94
  name: "analytics.widget.added",
98
95
  version: 1,
99
96
  description: "A widget was added to a dashboard.",
100
97
  payload: WidgetEventPayload
101
98
  });
102
- const QueryCreatedEvent = e({
99
+ const QueryCreatedEvent = defineEvent({
103
100
  name: "analytics.query.created",
104
101
  version: 1,
105
102
  description: "A query was created.",
package/dist/index.d.ts CHANGED
@@ -2,5 +2,6 @@ import { AnalyticsDashboardFeature } from "./dashboard.feature.js";
2
2
  import { QueryTypeEnum } from "./query/query.enum.js";
3
3
  import { CreateQueryInputModel, ExecuteQueryInputModel, QueryModel, QueryResultModel } from "./query/query.schema.js";
4
4
  import { CreateQueryContract, ExecuteQueryContract } from "./query/query.contracts.js";
5
+ import "./query/index.js";
5
6
  import { AggregationDefinition, BasicQueryEngine, ColumnDefinition, CustomQueryDefinition, DimensionDefinition, FilterDefinition, IQueryCache, IQueryEngine, InMemoryQueryCache, MeasureDefinition, OrderByDefinition, QueryDefinition, QueryParameters, QueryResult, createQueryEngine } from "./query-engine/index.js";
6
7
  export { AggregationDefinition, AnalyticsDashboardFeature, BasicQueryEngine, ColumnDefinition, CreateQueryContract, CreateQueryInputModel, CustomQueryDefinition, DimensionDefinition, ExecuteQueryContract, ExecuteQueryInputModel, FilterDefinition, IQueryCache, IQueryEngine, InMemoryQueryCache, MeasureDefinition, OrderByDefinition, QueryDefinition, QueryModel, QueryParameters, QueryResult, QueryResultModel, QueryTypeEnum, createQueryEngine };
@@ -1,5 +1,5 @@
1
- import * as _lssm_lib_contracts9 from "@lssm/lib.contracts";
2
1
  import * as _lssm_lib_schema281 from "@lssm/lib.schema";
2
+ import * as _lssm_lib_contracts9 from "@lssm/lib.contracts";
3
3
 
4
4
  //#region src/query/query.contracts.d.ts
5
5
  /**
@@ -1,12 +1,12 @@
1
- import { n, t } from "../libs/contracts/dist/spec.js";
2
1
  import { CreateQueryInputModel, ExecuteQueryInputModel, QueryModel, QueryResultModel } from "./query.schema.js";
2
+ import { defineCommand, defineQuery } from "@lssm/lib.contracts/spec";
3
3
 
4
4
  //#region src/query/query.contracts.ts
5
5
  const OWNERS = ["@example.analytics-dashboard"];
6
6
  /**
7
7
  * Create a data query.
8
8
  */
9
- const CreateQueryContract = t({
9
+ const CreateQueryContract = defineCommand({
10
10
  meta: {
11
11
  name: "analytics.query.create",
12
12
  version: 1,
@@ -39,7 +39,7 @@ const CreateQueryContract = t({
39
39
  /**
40
40
  * Execute a data query.
41
41
  */
42
- const ExecuteQueryContract = n({
42
+ const ExecuteQueryContract = defineQuery({
43
43
  meta: {
44
44
  name: "analytics.query.execute",
45
45
  version: 1,
@@ -1,9 +1,9 @@
1
- import * as _lssm_lib_schema0 from "@lssm/lib.schema";
1
+ import * as _lssm_lib_schema37 from "@lssm/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: _lssm_lib_schema0.EnumType<[string, string, string, string]>;
7
+ declare const QueryTypeEnum: _lssm_lib_schema37.EnumType<[string, string, string, string]>;
8
8
  //#endregion
9
9
  export { QueryTypeEnum };
@@ -1,11 +1,10 @@
1
- import { r } from "../libs/schema/dist/EnumType.js";
2
- import "../libs/schema/dist/index.js";
1
+ import { defineEnum } from "@lssm/lib.schema";
3
2
 
4
3
  //#region src/query/query.enum.ts
5
4
  /**
6
5
  * Query type enum.
7
6
  */
8
- const QueryTypeEnum = r("QueryType", [
7
+ const QueryTypeEnum = defineEnum("QueryType", [
9
8
  "SQL",
10
9
  "METRIC",
11
10
  "AGGREGATION",