@lssm/example.analytics-dashboard 0.0.0-canary-20251222120211 → 0.0.0-canary-20251223012036

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 (203) hide show
  1. package/dist/dashboard/dashboard.enum.js +4 -4
  2. package/dist/dashboard/dashboard.enum.js.map +1 -1
  3. package/dist/dashboard/dashboard.operation.d.ts +1 -1
  4. package/dist/dashboard/dashboard.operation.js +1 -2
  5. package/dist/dashboard/dashboard.operation.js.map +1 -1
  6. package/dist/dashboard/dashboard.schema.js +42 -42
  7. package/dist/dashboard/dashboard.schema.js.map +1 -1
  8. package/dist/docs/analytics-dashboard.docblock.js +1 -2
  9. package/dist/docs/analytics-dashboard.docblock.js.map +1 -1
  10. package/dist/events.d.ts +1 -1
  11. package/dist/events.js +21 -22
  12. package/dist/events.js.map +1 -1
  13. package/dist/index.d.ts +1 -0
  14. package/dist/query/query.enum.js +2 -2
  15. package/dist/query/query.enum.js.map +1 -1
  16. package/dist/query/query.operation.d.ts +1 -1
  17. package/dist/query/query.operation.js +1 -2
  18. package/dist/query/query.operation.js.map +1 -1
  19. package/dist/query/query.schema.js +32 -32
  20. package/dist/query/query.schema.js.map +1 -1
  21. package/package.json +11 -11
  22. package/dist/libs/contracts/dist/_virtual/rolldown_runtime.js +0 -6
  23. package/dist/libs/contracts/dist/_virtual/rolldown_runtime.js.map +0 -1
  24. package/dist/libs/contracts/dist/capabilities/index.js +0 -1
  25. package/dist/libs/contracts/dist/capabilities/openbanking.js +0 -89
  26. package/dist/libs/contracts/dist/capabilities/openbanking.js.map +0 -1
  27. package/dist/libs/contracts/dist/client/index.js +0 -5
  28. package/dist/libs/contracts/dist/client/react/feature-render.js +0 -3
  29. package/dist/libs/contracts/dist/client/react/form-render.js +0 -5
  30. package/dist/libs/contracts/dist/client/react/index.js +0 -4
  31. package/dist/libs/contracts/dist/contract-registry/index.js +0 -1
  32. package/dist/libs/contracts/dist/contract-registry/schemas.js +0 -61
  33. package/dist/libs/contracts/dist/contract-registry/schemas.js.map +0 -1
  34. package/dist/libs/contracts/dist/data-views/data-views.js +0 -7
  35. package/dist/libs/contracts/dist/data-views/data-views.js.map +0 -1
  36. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -17
  37. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js.map +0 -1
  38. package/dist/libs/contracts/dist/docs/index.js +0 -25
  39. package/dist/libs/contracts/dist/docs/meta.docs.js +0 -30
  40. package/dist/libs/contracts/dist/docs/meta.docs.js.map +0 -1
  41. package/dist/libs/contracts/dist/docs/presentations.js +0 -72
  42. package/dist/libs/contracts/dist/docs/presentations.js.map +0 -1
  43. package/dist/libs/contracts/dist/docs/registry.js +0 -45
  44. package/dist/libs/contracts/dist/docs/registry.js.map +0 -1
  45. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +0 -81
  46. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js.map +0 -1
  47. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +0 -58
  48. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +0 -1
  49. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -17
  50. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js.map +0 -1
  51. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +0 -358
  52. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +0 -1
  53. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +0 -38
  54. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js.map +0 -1
  55. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +0 -17
  56. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js.map +0 -1
  57. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +0 -21
  58. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js.map +0 -1
  59. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +0 -49
  60. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js.map +0 -1
  61. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +0 -80
  62. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js.map +0 -1
  63. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +0 -85
  64. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js.map +0 -1
  65. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +0 -46
  66. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js.map +0 -1
  67. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +0 -68
  68. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js.map +0 -1
  69. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -41
  70. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js.map +0 -1
  71. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +0 -70
  72. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js.map +0 -1
  73. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +0 -48
  74. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js.map +0 -1
  75. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +0 -63
  76. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js.map +0 -1
  77. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +0 -156
  78. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js.map +0 -1
  79. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +0 -21
  80. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js.map +0 -1
  81. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +0 -102
  82. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js.map +0 -1
  83. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +0 -21
  84. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js.map +0 -1
  85. package/dist/libs/contracts/dist/docs/tech-contracts.docs.js +0 -97
  86. package/dist/libs/contracts/dist/docs/tech-contracts.docs.js.map +0 -1
  87. package/dist/libs/contracts/dist/events.js +0 -11
  88. package/dist/libs/contracts/dist/events.js.map +0 -1
  89. package/dist/libs/contracts/dist/experiments/evaluator.js +0 -1
  90. package/dist/libs/contracts/dist/features.js +0 -7
  91. package/dist/libs/contracts/dist/features.js.map +0 -1
  92. package/dist/libs/contracts/dist/forms/forms.js +0 -1
  93. package/dist/libs/contracts/dist/index.js +0 -88
  94. package/dist/libs/contracts/dist/index.js.map +0 -1
  95. package/dist/libs/contracts/dist/install.js +0 -2
  96. package/dist/libs/contracts/dist/integrations/index.js +0 -18
  97. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +0 -228
  98. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js.map +0 -1
  99. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +0 -159
  100. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js.map +0 -1
  101. package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +0 -3
  102. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +0 -210
  103. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js.map +0 -1
  104. package/dist/libs/contracts/dist/integrations/openbanking/models.js +0 -241
  105. package/dist/libs/contracts/dist/integrations/openbanking/models.js.map +0 -1
  106. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +0 -14
  107. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js.map +0 -1
  108. package/dist/libs/contracts/dist/integrations/operations.js +0 -377
  109. package/dist/libs/contracts/dist/integrations/operations.js.map +0 -1
  110. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +0 -53
  111. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js.map +0 -1
  112. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +0 -76
  113. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js.map +0 -1
  114. package/dist/libs/contracts/dist/integrations/providers/gmail.js +0 -88
  115. package/dist/libs/contracts/dist/integrations/providers/gmail.js.map +0 -1
  116. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +0 -67
  117. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js.map +0 -1
  118. package/dist/libs/contracts/dist/integrations/providers/index.js +0 -11
  119. package/dist/libs/contracts/dist/integrations/providers/mistral.js +0 -69
  120. package/dist/libs/contracts/dist/integrations/providers/mistral.js.map +0 -1
  121. package/dist/libs/contracts/dist/integrations/providers/postmark.js +0 -69
  122. package/dist/libs/contracts/dist/integrations/providers/postmark.js.map +0 -1
  123. package/dist/libs/contracts/dist/integrations/providers/powens.js +0 -117
  124. package/dist/libs/contracts/dist/integrations/providers/powens.js.map +0 -1
  125. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +0 -74
  126. package/dist/libs/contracts/dist/integrations/providers/qdrant.js.map +0 -1
  127. package/dist/libs/contracts/dist/integrations/providers/registry.js +0 -10
  128. package/dist/libs/contracts/dist/integrations/providers/stripe.js +0 -84
  129. package/dist/libs/contracts/dist/integrations/providers/stripe.js.map +0 -1
  130. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +0 -62
  131. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js.map +0 -1
  132. package/dist/libs/contracts/dist/jsonschema.js +0 -1
  133. package/dist/libs/contracts/dist/knowledge/index.js +0 -7
  134. package/dist/libs/contracts/dist/knowledge/operations.js +0 -306
  135. package/dist/libs/contracts/dist/knowledge/operations.js.map +0 -1
  136. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +0 -35
  137. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js.map +0 -1
  138. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +0 -35
  139. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js.map +0 -1
  140. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +0 -39
  141. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js.map +0 -1
  142. package/dist/libs/contracts/dist/knowledge/spaces/index.js +0 -6
  143. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +0 -35
  144. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js.map +0 -1
  145. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +0 -38
  146. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js.map +0 -1
  147. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +0 -35
  148. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js.map +0 -1
  149. package/dist/libs/contracts/dist/llm/exporters.js +0 -21
  150. package/dist/libs/contracts/dist/llm/exporters.js.map +0 -1
  151. package/dist/libs/contracts/dist/llm/index.js +0 -2
  152. package/dist/libs/contracts/dist/llm/prompts.js +0 -1
  153. package/dist/libs/contracts/dist/onboarding-base.js +0 -196
  154. package/dist/libs/contracts/dist/onboarding-base.js.map +0 -1
  155. package/dist/libs/contracts/dist/openapi.js +0 -1
  156. package/dist/libs/contracts/dist/operations/index.js +0 -2
  157. package/dist/libs/contracts/dist/operations/operation.js +0 -35
  158. package/dist/libs/contracts/dist/operations/operation.js.map +0 -1
  159. package/dist/libs/contracts/dist/operations/registry.js +0 -8
  160. package/dist/libs/contracts/dist/operations/registry.js.map +0 -1
  161. package/dist/libs/contracts/dist/ownership.js +0 -24
  162. package/dist/libs/contracts/dist/ownership.js.map +0 -1
  163. package/dist/libs/contracts/dist/presentations/index.js +0 -2
  164. package/dist/libs/contracts/dist/presentations/presentations.js +0 -8
  165. package/dist/libs/contracts/dist/presentations/presentations.js.map +0 -1
  166. package/dist/libs/contracts/dist/presentations/transform-engine.js +0 -12
  167. package/dist/libs/contracts/dist/presentations/transform-engine.js.map +0 -1
  168. package/dist/libs/contracts/dist/prompt.js +0 -1
  169. package/dist/libs/contracts/dist/promptRegistry.js +0 -1
  170. package/dist/libs/contracts/dist/regenerator/index.js +0 -1
  171. package/dist/libs/contracts/dist/regenerator/service.js +0 -7
  172. package/dist/libs/contracts/dist/regenerator/service.js.map +0 -1
  173. package/dist/libs/contracts/dist/registry-utils.js +0 -24
  174. package/dist/libs/contracts/dist/registry-utils.js.map +0 -1
  175. package/dist/libs/contracts/dist/resources.js +0 -1
  176. package/dist/libs/contracts/dist/schema/dist/index.js +0 -3873
  177. package/dist/libs/contracts/dist/schema/dist/index.js.map +0 -1
  178. package/dist/libs/contracts/dist/server/graphql-pothos.js +0 -6
  179. package/dist/libs/contracts/dist/server/index.js +0 -8
  180. package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +0 -4
  181. package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +0 -3
  182. package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +0 -1
  183. package/dist/libs/contracts/dist/server/mcp/registerResources.js +0 -2
  184. package/dist/libs/contracts/dist/server/mcp/registerTools.js +0 -1
  185. package/dist/libs/contracts/dist/server/provider-mcp.js +0 -1
  186. package/dist/libs/contracts/dist/server/rest-elysia.js +0 -1
  187. package/dist/libs/contracts/dist/server/rest-express.js +0 -1
  188. package/dist/libs/contracts/dist/server/rest-generic.js +0 -1
  189. package/dist/libs/contracts/dist/server/rest-next-app.js +0 -1
  190. package/dist/libs/contracts/dist/server/rest-next-pages.js +0 -1
  191. package/dist/libs/contracts/dist/telemetry/index.js +0 -1
  192. package/dist/libs/contracts/dist/telemetry/tracker.js +0 -1
  193. package/dist/libs/contracts/dist/tests/index.js +0 -1
  194. package/dist/libs/contracts/dist/tests/runner.js +0 -2
  195. package/dist/libs/contracts/dist/workflow/index.js +0 -2
  196. package/dist/libs/contracts/dist/workflow/runner.js +0 -1
  197. package/dist/libs/contracts/dist/workflow/spec.js +0 -7
  198. package/dist/libs/contracts/dist/workflow/spec.js.map +0 -1
  199. package/dist/libs/contracts/dist/workspace-config/contractsrc-schema.js +0 -164
  200. package/dist/libs/contracts/dist/workspace-config/contractsrc-schema.js.map +0 -1
  201. package/dist/libs/contracts/dist/workspace-config/index.js +0 -1
  202. package/dist/libs/schema/dist/index.js +0 -4717
  203. package/dist/libs/schema/dist/index.js.map +0 -1
@@ -1,10 +1,10 @@
1
- import { N5 } from "../libs/schema/dist/index.js";
1
+ import { defineEnum } from "@lssm/lib.schema";
2
2
 
3
3
  //#region src/dashboard/dashboard.enum.ts
4
4
  /**
5
5
  * Dashboard status enum.
6
6
  */
7
- const DashboardStatusEnum = N5("DashboardStatus", [
7
+ const DashboardStatusEnum = defineEnum("DashboardStatus", [
8
8
  "DRAFT",
9
9
  "PUBLISHED",
10
10
  "ARCHIVED"
@@ -12,7 +12,7 @@ const DashboardStatusEnum = N5("DashboardStatus", [
12
12
  /**
13
13
  * Widget type enum.
14
14
  */
15
- const WidgetTypeEnum = N5("WidgetType", [
15
+ const WidgetTypeEnum = defineEnum("WidgetType", [
16
16
  "LINE_CHART",
17
17
  "BAR_CHART",
18
18
  "PIE_CHART",
@@ -29,7 +29,7 @@ const WidgetTypeEnum = N5("WidgetType", [
29
29
  /**
30
30
  * Refresh interval enum.
31
31
  */
32
- const RefreshIntervalEnum = N5("RefreshInterval", [
32
+ const RefreshIntervalEnum = defineEnum("RefreshInterval", [
33
33
  "NONE",
34
34
  "MINUTE",
35
35
  "FIVE_MINUTES",
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard.enum.js","names":["defineEnum"],"sources":["../../src/dashboard/dashboard.enum.ts"],"sourcesContent":["import { defineEnum } from '@lssm/lib.schema';\n\n/**\n * Dashboard status enum.\n */\nexport const DashboardStatusEnum = defineEnum('DashboardStatus', [\n 'DRAFT',\n 'PUBLISHED',\n 'ARCHIVED',\n]);\n\n/**\n * Widget type enum.\n */\nexport const WidgetTypeEnum = defineEnum('WidgetType', [\n 'LINE_CHART',\n 'BAR_CHART',\n 'PIE_CHART',\n 'AREA_CHART',\n 'SCATTER_PLOT',\n 'METRIC',\n 'TABLE',\n 'HEATMAP',\n 'FUNNEL',\n 'MAP',\n 'TEXT',\n 'EMBED',\n]);\n\n/**\n * Refresh interval enum.\n */\nexport const RefreshIntervalEnum = defineEnum('RefreshInterval', [\n 'NONE',\n 'MINUTE',\n 'FIVE_MINUTES',\n 'FIFTEEN_MINUTES',\n 'HOUR',\n 'DAY',\n]);\n"],"mappings":";;;;;;AAKA,MAAa,sBAAsBA,GAAW,mBAAmB;CAC/D;CACA;CACA;CACD,CAAC;;;;AAKF,MAAa,iBAAiBA,GAAW,cAAc;CACrD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;AAKF,MAAa,sBAAsBA,GAAW,mBAAmB;CAC/D;CACA;CACA;CACA;CACA;CACA;CACD,CAAC"}
1
+ {"version":3,"file":"dashboard.enum.js","names":[],"sources":["../../src/dashboard/dashboard.enum.ts"],"sourcesContent":["import { defineEnum } from '@lssm/lib.schema';\n\n/**\n * Dashboard status enum.\n */\nexport const DashboardStatusEnum = defineEnum('DashboardStatus', [\n 'DRAFT',\n 'PUBLISHED',\n 'ARCHIVED',\n]);\n\n/**\n * Widget type enum.\n */\nexport const WidgetTypeEnum = defineEnum('WidgetType', [\n 'LINE_CHART',\n 'BAR_CHART',\n 'PIE_CHART',\n 'AREA_CHART',\n 'SCATTER_PLOT',\n 'METRIC',\n 'TABLE',\n 'HEATMAP',\n 'FUNNEL',\n 'MAP',\n 'TEXT',\n 'EMBED',\n]);\n\n/**\n * Refresh interval enum.\n */\nexport const RefreshIntervalEnum = defineEnum('RefreshInterval', [\n 'NONE',\n 'MINUTE',\n 'FIVE_MINUTES',\n 'FIFTEEN_MINUTES',\n 'HOUR',\n 'DAY',\n]);\n"],"mappings":";;;;;;AAKA,MAAa,sBAAsB,WAAW,mBAAmB;CAC/D;CACA;CACA;CACD,CAAC;;;;AAKF,MAAa,iBAAiB,WAAW,cAAc;CACrD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;AAKF,MAAa,sBAAsB,WAAW,mBAAmB;CAC/D;CACA;CACA;CACA;CACA;CACA;CACD,CAAC"}
@@ -1,5 +1,5 @@
1
- import * as _lssm_lib_contracts5 from "@lssm/lib.contracts";
2
1
  import * as _lssm_lib_schema40 from "@lssm/lib.schema";
2
+ import * as _lssm_lib_contracts5 from "@lssm/lib.contracts";
3
3
 
4
4
  //#region src/dashboard/dashboard.operation.d.ts
5
5
  /**
@@ -1,6 +1,5 @@
1
- import { defineCommand, defineQuery } from "../libs/contracts/dist/operations/operation.js";
2
- import "../libs/contracts/dist/operations/index.js";
3
1
  import { AddWidgetInputModel, CreateDashboardInputModel, DashboardModel, GetDashboardInputModel, ListDashboardsInputModel, ListDashboardsOutputModel, WidgetModel } from "./dashboard.schema.js";
2
+ import { defineCommand, defineQuery } from "@lssm/lib.contracts/operations";
4
3
 
5
4
  //#region src/dashboard/dashboard.operation.ts
6
5
  const OWNERS = ["@example.analytics-dashboard"];
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard.operation.js","names":[],"sources":["../../src/dashboard/dashboard.operation.ts"],"sourcesContent":["import { defineCommand, defineQuery } from '@lssm/lib.contracts/operations';\nimport {\n DashboardModel,\n WidgetModel,\n CreateDashboardInputModel,\n AddWidgetInputModel,\n ListDashboardsInputModel,\n ListDashboardsOutputModel,\n GetDashboardInputModel,\n} from './dashboard.schema';\n\nconst OWNERS = ['@example.analytics-dashboard'] as const;\n\n/**\n * Create a new analytics dashboard.\n */\nexport const CreateDashboardContract = defineCommand({\n meta: {\n name: 'analytics.dashboard.create',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['analytics', 'dashboard', 'create'],\n description: 'Create a new analytics dashboard.',\n goal: 'Allow users to create custom dashboards.',\n context: 'Dashboard management.',\n },\n io: { input: CreateDashboardInputModel, output: DashboardModel },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n name: 'analytics.dashboard.created',\n version: 1,\n when: 'Dashboard created',\n payload: DashboardModel,\n },\n ],\n audit: ['analytics.dashboard.created'],\n },\n});\n\n/**\n * Add a widget to a dashboard.\n */\nexport const AddWidgetContract = defineCommand({\n meta: {\n name: 'analytics.widget.add',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['analytics', 'widget', 'add'],\n description: 'Add a widget to a dashboard.',\n goal: 'Allow users to add visualizations.',\n context: 'Dashboard editor.',\n },\n io: { input: AddWidgetInputModel, output: WidgetModel },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n name: 'analytics.widget.added',\n version: 1,\n when: 'Widget added',\n payload: WidgetModel,\n },\n ],\n },\n});\n\n/**\n * List dashboards.\n */\nexport const ListDashboardsContract = defineQuery({\n meta: {\n name: 'analytics.dashboard.list',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['analytics', 'dashboard', 'list'],\n description: 'List dashboards.',\n goal: 'Browse available dashboards.',\n context: 'Dashboard listing.',\n },\n io: { input: ListDashboardsInputModel, output: ListDashboardsOutputModel },\n policy: { auth: 'user' },\n});\n\n/**\n * Get a dashboard with widgets.\n */\nexport const GetDashboardContract = defineQuery({\n meta: {\n name: 'analytics.dashboard.get',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['analytics', 'dashboard', 'get'],\n description: 'Get a dashboard with widgets.',\n goal: 'Load dashboard for viewing.',\n context: 'Dashboard view.',\n },\n io: { input: GetDashboardInputModel, output: DashboardModel },\n policy: { auth: 'anonymous' },\n});\n"],"mappings":";;;;;AAWA,MAAM,SAAS,CAAC,+BAA+B;;;;AAK/C,MAAa,0BAA0B,cAAc;CACnD,MAAM;EACJ,MAAM;EACN,S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"file":"dashboard.operation.js","names":[],"sources":["../../src/dashboard/dashboard.operation.ts"],"sourcesContent":["import { defineCommand, defineQuery } from '@lssm/lib.contracts/operations';\nimport {\n DashboardModel,\n WidgetModel,\n CreateDashboardInputModel,\n AddWidgetInputModel,\n ListDashboardsInputModel,\n ListDashboardsOutputModel,\n GetDashboardInputModel,\n} from './dashboard.schema';\n\nconst OWNERS = ['@example.analytics-dashboard'] as const;\n\n/**\n * Create a new analytics dashboard.\n */\nexport const CreateDashboardContract = defineCommand({\n meta: {\n name: 'analytics.dashboard.create',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['analytics', 'dashboard', 'create'],\n description: 'Create a new analytics dashboard.',\n goal: 'Allow users to create custom dashboards.',\n context: 'Dashboard management.',\n },\n io: { input: CreateDashboardInputModel, output: DashboardModel },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n name: 'analytics.dashboard.created',\n version: 1,\n when: 'Dashboard created',\n payload: DashboardModel,\n },\n ],\n audit: ['analytics.dashboard.created'],\n },\n});\n\n/**\n * Add a widget to a dashboard.\n */\nexport const AddWidgetContract = defineCommand({\n meta: {\n name: 'analytics.widget.add',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['analytics', 'widget', 'add'],\n description: 'Add a widget to a dashboard.',\n goal: 'Allow users to add visualizations.',\n context: 'Dashboard editor.',\n },\n io: { input: AddWidgetInputModel, output: WidgetModel },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n name: 'analytics.widget.added',\n version: 1,\n when: 'Widget added',\n payload: WidgetModel,\n },\n ],\n },\n});\n\n/**\n * List dashboards.\n */\nexport const ListDashboardsContract = defineQuery({\n meta: {\n name: 'analytics.dashboard.list',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['analytics', 'dashboard', 'list'],\n description: 'List dashboards.',\n goal: 'Browse available dashboards.',\n context: 'Dashboard listing.',\n },\n io: { input: ListDashboardsInputModel, output: ListDashboardsOutputModel },\n policy: { auth: 'user' },\n});\n\n/**\n * Get a dashboard with widgets.\n */\nexport const GetDashboardContract = defineQuery({\n meta: {\n name: 'analytics.dashboard.get',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['analytics', 'dashboard', 'get'],\n description: 'Get a dashboard with widgets.',\n goal: 'Load dashboard for viewing.',\n context: 'Dashboard view.',\n },\n io: { input: GetDashboardInputModel, output: DashboardModel },\n policy: { auth: 'anonymous' },\n});\n"],"mappings":";;;;AAWA,MAAM,SAAS,CAAC,+BAA+B;;;;AAK/C,MAAa,0BAA0B,cAAc;CACnD,MAAM;EACJ,MAAM;EACN,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAa;GAAa;GAAS;EAC1C,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAA2B,QAAQ;EAAgB;CAChE,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa;EACX,OAAO,CACL;GACE,MAAM;GACN,SAAS;GACT,MAAM;GACN,SAAS;GACV,CACF;EACD,OAAO,CAAC,8BAA8B;EACvC;CACF,CAAC;;;;AAKF,MAAa,oBAAoB,cAAc;CAC7C,MAAM;EACJ,MAAM;EACN,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAa;GAAU;GAAM;EACpC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAAqB,QAAQ;EAAa;CACvD,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa,EACX,OAAO,CACL;EACE,MAAM;EACN,SAAS;EACT,MAAM;EACN,SAAS;EACV,CACF,EACF;CACF,CAAC;;;;AAKF,MAAa,yBAAyB,YAAY;CAChD,MAAM;EACJ,MAAM;EACN,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAa;GAAa;GAAO;EACxC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAA0B,QAAQ;EAA2B;CAC1E,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC;;;;AAKF,MAAa,uBAAuB,YAAY;CAC9C,MAAM;EACJ,MAAM;EACN,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAa;GAAa;GAAM;EACvC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAAwB,QAAQ;EAAgB;CAC7D,QAAQ,EAAE,MAAM,aAAa;CAC9B,CAAC"}
@@ -1,23 +1,23 @@
1
- import { E5, K5 } from "../libs/schema/dist/index.js";
2
1
  import { DashboardStatusEnum, RefreshIntervalEnum, WidgetTypeEnum } from "./dashboard.enum.js";
2
+ import { ScalarTypeEnum, defineSchemaModel } from "@lssm/lib.schema";
3
3
 
4
4
  //#region src/dashboard/dashboard.schema.ts
5
5
  /**
6
6
  * A dashboard widget.
7
7
  */
8
- const WidgetModel = K5({
8
+ const WidgetModel = defineSchemaModel({
9
9
  name: "WidgetModel",
10
10
  fields: {
11
11
  id: {
12
- type: E5.String_unsecure(),
12
+ type: ScalarTypeEnum.String_unsecure(),
13
13
  isOptional: false
14
14
  },
15
15
  dashboardId: {
16
- type: E5.String_unsecure(),
16
+ type: ScalarTypeEnum.String_unsecure(),
17
17
  isOptional: false
18
18
  },
19
19
  name: {
20
- type: E5.String_unsecure(),
20
+ type: ScalarTypeEnum.String_unsecure(),
21
21
  isOptional: false
22
22
  },
23
23
  type: {
@@ -25,27 +25,27 @@ const WidgetModel = K5({
25
25
  isOptional: false
26
26
  },
27
27
  gridX: {
28
- type: E5.Int_unsecure(),
28
+ type: ScalarTypeEnum.Int_unsecure(),
29
29
  isOptional: false
30
30
  },
31
31
  gridY: {
32
- type: E5.Int_unsecure(),
32
+ type: ScalarTypeEnum.Int_unsecure(),
33
33
  isOptional: false
34
34
  },
35
35
  gridWidth: {
36
- type: E5.Int_unsecure(),
36
+ type: ScalarTypeEnum.Int_unsecure(),
37
37
  isOptional: false
38
38
  },
39
39
  gridHeight: {
40
- type: E5.Int_unsecure(),
40
+ type: ScalarTypeEnum.Int_unsecure(),
41
41
  isOptional: false
42
42
  },
43
43
  queryId: {
44
- type: E5.String_unsecure(),
44
+ type: ScalarTypeEnum.String_unsecure(),
45
45
  isOptional: true
46
46
  },
47
47
  config: {
48
- type: E5.JSON(),
48
+ type: ScalarTypeEnum.JSON(),
49
49
  isOptional: true
50
50
  }
51
51
  }
@@ -53,23 +53,23 @@ const WidgetModel = K5({
53
53
  /**
54
54
  * An analytics dashboard.
55
55
  */
56
- const DashboardModel = K5({
56
+ const DashboardModel = defineSchemaModel({
57
57
  name: "DashboardModel",
58
58
  fields: {
59
59
  id: {
60
- type: E5.String_unsecure(),
60
+ type: ScalarTypeEnum.String_unsecure(),
61
61
  isOptional: false
62
62
  },
63
63
  name: {
64
- type: E5.String_unsecure(),
64
+ type: ScalarTypeEnum.String_unsecure(),
65
65
  isOptional: false
66
66
  },
67
67
  slug: {
68
- type: E5.String_unsecure(),
68
+ type: ScalarTypeEnum.String_unsecure(),
69
69
  isOptional: false
70
70
  },
71
71
  description: {
72
- type: E5.String_unsecure(),
72
+ type: ScalarTypeEnum.String_unsecure(),
73
73
  isOptional: true
74
74
  },
75
75
  status: {
@@ -81,7 +81,7 @@ const DashboardModel = K5({
81
81
  isOptional: false
82
82
  },
83
83
  isPublic: {
84
- type: E5.Boolean(),
84
+ type: ScalarTypeEnum.Boolean(),
85
85
  isOptional: false
86
86
  },
87
87
  widgets: {
@@ -90,7 +90,7 @@ const DashboardModel = K5({
90
90
  isOptional: true
91
91
  },
92
92
  createdAt: {
93
- type: E5.DateTime(),
93
+ type: ScalarTypeEnum.DateTime(),
94
94
  isOptional: false
95
95
  }
96
96
  }
@@ -98,19 +98,19 @@ const DashboardModel = K5({
98
98
  /**
99
99
  * Input for creating a dashboard.
100
100
  */
101
- const CreateDashboardInputModel = K5({
101
+ const CreateDashboardInputModel = defineSchemaModel({
102
102
  name: "CreateDashboardInput",
103
103
  fields: {
104
104
  name: {
105
- type: E5.NonEmptyString(),
105
+ type: ScalarTypeEnum.NonEmptyString(),
106
106
  isOptional: false
107
107
  },
108
108
  slug: {
109
- type: E5.NonEmptyString(),
109
+ type: ScalarTypeEnum.NonEmptyString(),
110
110
  isOptional: false
111
111
  },
112
112
  description: {
113
- type: E5.String_unsecure(),
113
+ type: ScalarTypeEnum.String_unsecure(),
114
114
  isOptional: true
115
115
  },
116
116
  refreshInterval: {
@@ -118,7 +118,7 @@ const CreateDashboardInputModel = K5({
118
118
  isOptional: true
119
119
  },
120
120
  dateRange: {
121
- type: E5.JSON(),
121
+ type: ScalarTypeEnum.JSON(),
122
122
  isOptional: true
123
123
  }
124
124
  }
@@ -126,15 +126,15 @@ const CreateDashboardInputModel = K5({
126
126
  /**
127
127
  * Input for adding a widget.
128
128
  */
129
- const AddWidgetInputModel = K5({
129
+ const AddWidgetInputModel = defineSchemaModel({
130
130
  name: "AddWidgetInput",
131
131
  fields: {
132
132
  dashboardId: {
133
- type: E5.String_unsecure(),
133
+ type: ScalarTypeEnum.String_unsecure(),
134
134
  isOptional: false
135
135
  },
136
136
  name: {
137
- type: E5.NonEmptyString(),
137
+ type: ScalarTypeEnum.NonEmptyString(),
138
138
  isOptional: false
139
139
  },
140
140
  type: {
@@ -142,27 +142,27 @@ const AddWidgetInputModel = K5({
142
142
  isOptional: false
143
143
  },
144
144
  gridX: {
145
- type: E5.Int_unsecure(),
145
+ type: ScalarTypeEnum.Int_unsecure(),
146
146
  isOptional: true
147
147
  },
148
148
  gridY: {
149
- type: E5.Int_unsecure(),
149
+ type: ScalarTypeEnum.Int_unsecure(),
150
150
  isOptional: true
151
151
  },
152
152
  gridWidth: {
153
- type: E5.Int_unsecure(),
153
+ type: ScalarTypeEnum.Int_unsecure(),
154
154
  isOptional: true
155
155
  },
156
156
  gridHeight: {
157
- type: E5.Int_unsecure(),
157
+ type: ScalarTypeEnum.Int_unsecure(),
158
158
  isOptional: true
159
159
  },
160
160
  queryId: {
161
- type: E5.String_unsecure(),
161
+ type: ScalarTypeEnum.String_unsecure(),
162
162
  isOptional: true
163
163
  },
164
164
  config: {
165
- type: E5.JSON(),
165
+ type: ScalarTypeEnum.JSON(),
166
166
  isOptional: true
167
167
  }
168
168
  }
@@ -170,7 +170,7 @@ const AddWidgetInputModel = K5({
170
170
  /**
171
171
  * Input for listing dashboards.
172
172
  */
173
- const ListDashboardsInputModel = K5({
173
+ const ListDashboardsInputModel = defineSchemaModel({
174
174
  name: "ListDashboardsInput",
175
175
  fields: {
176
176
  status: {
@@ -178,16 +178,16 @@ const ListDashboardsInputModel = K5({
178
178
  isOptional: true
179
179
  },
180
180
  search: {
181
- type: E5.String_unsecure(),
181
+ type: ScalarTypeEnum.String_unsecure(),
182
182
  isOptional: true
183
183
  },
184
184
  limit: {
185
- type: E5.Int_unsecure(),
185
+ type: ScalarTypeEnum.Int_unsecure(),
186
186
  isOptional: true,
187
187
  defaultValue: 20
188
188
  },
189
189
  offset: {
190
- type: E5.Int_unsecure(),
190
+ type: ScalarTypeEnum.Int_unsecure(),
191
191
  isOptional: true,
192
192
  defaultValue: 0
193
193
  }
@@ -196,7 +196,7 @@ const ListDashboardsInputModel = K5({
196
196
  /**
197
197
  * Output for listing dashboards.
198
198
  */
199
- const ListDashboardsOutputModel = K5({
199
+ const ListDashboardsOutputModel = defineSchemaModel({
200
200
  name: "ListDashboardsOutput",
201
201
  fields: {
202
202
  dashboards: {
@@ -205,7 +205,7 @@ const ListDashboardsOutputModel = K5({
205
205
  isOptional: false
206
206
  },
207
207
  total: {
208
- type: E5.Int_unsecure(),
208
+ type: ScalarTypeEnum.Int_unsecure(),
209
209
  isOptional: false
210
210
  }
211
211
  }
@@ -213,19 +213,19 @@ const ListDashboardsOutputModel = K5({
213
213
  /**
214
214
  * Input for getting a dashboard.
215
215
  */
216
- const GetDashboardInputModel = K5({
216
+ const GetDashboardInputModel = defineSchemaModel({
217
217
  name: "GetDashboardInput",
218
218
  fields: {
219
219
  dashboardId: {
220
- type: E5.String_unsecure(),
220
+ type: ScalarTypeEnum.String_unsecure(),
221
221
  isOptional: true
222
222
  },
223
223
  slug: {
224
- type: E5.String_unsecure(),
224
+ type: ScalarTypeEnum.String_unsecure(),
225
225
  isOptional: true
226
226
  },
227
227
  shareToken: {
228
- type: E5.String_unsecure(),
228
+ type: ScalarTypeEnum.String_unsecure(),
229
229
  isOptional: true
230
230
  }
231
231
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard.schema.js","names":["defineSchemaModel","ScalarTypeEnum"],"sources":["../../src/dashboard/dashboard.schema.ts"],"sourcesContent":["import { defineSchemaModel, ScalarTypeEnum } from '@lssm/lib.schema';\nimport {\n DashboardStatusEnum,\n WidgetTypeEnum,\n RefreshIntervalEnum,\n} from './dashboard.enum';\n\n/**\n * A dashboard widget.\n */\nexport const WidgetModel = defineSchemaModel({\n name: 'WidgetModel',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n dashboardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n type: { type: WidgetTypeEnum, isOptional: false },\n gridX: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n gridY: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n gridWidth: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n gridHeight: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n queryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n config: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n\n/**\n * An analytics dashboard.\n */\nexport const DashboardModel = defineSchemaModel({\n name: 'DashboardModel',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n status: { type: DashboardStatusEnum, isOptional: false },\n refreshInterval: { type: RefreshIntervalEnum, isOptional: false },\n isPublic: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n widgets: { type: WidgetModel, isArray: true, isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Input for creating a dashboard.\n */\nexport const CreateDashboardInputModel = defineSchemaModel({\n name: 'CreateDashboardInput',\n fields: {\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n slug: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n refreshInterval: { type: RefreshIntervalEnum, isOptional: true },\n dateRange: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n\n/**\n * Input for adding a widget.\n */\nexport const AddWidgetInputModel = defineSchemaModel({\n name: 'AddWidgetInput',\n fields: {\n dashboardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n type: { type: WidgetTypeEnum, isOptional: false },\n gridX: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n gridY: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n gridWidth: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n gridHeight: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n queryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n config: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n\n/**\n * Input for listing dashboards.\n */\nexport const ListDashboardsInputModel = defineSchemaModel({\n name: 'ListDashboardsInput',\n fields: {\n status: { type: DashboardStatusEnum, isOptional: true },\n search: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n limit: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 20,\n },\n offset: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 0,\n },\n },\n});\n\n/**\n * Output for listing dashboards.\n */\nexport const ListDashboardsOutputModel = defineSchemaModel({\n name: 'ListDashboardsOutput',\n fields: {\n dashboards: { type: DashboardModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n});\n\n/**\n * Input for getting a dashboard.\n */\nexport const GetDashboardInputModel = defineSchemaModel({\n name: 'GetDashboardInput',\n fields: {\n dashboardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n shareToken: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n"],"mappings":";;;;;;;AAUA,MAAa,cAAcA,GAAkB;CAC3C,MAAM;CACN,QAAQ;EACN,IAAI;GAAE,MAAMC,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,aAAa;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EAC1E,MAAM;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,MAAM;GAAE,MAAM;GAAgB,YAAY;GAAO;EACjD,OAAO;GAAE,MAAMA,GAAe,cAAc;GAAE,YAAY;GAAO;EACjE,OAAO;GAAE,MAAMA,GAAe,cAAc;GAAE,YAAY;GAAO;EACjE,WAAW;GAAE,MAAMA,GAAe,cAAc;GAAE,YAAY;GAAO;EACrE,YAAY;GAAE,MAAMA,GAAe,cAAc;GAAE,YAAY;GAAO;EACtE,SAAS;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAM;EACrE,QAAQ;GAAE,MAAMA,GAAe,MAAM;GAAE,YAAY;GAAM;EAC1D;CACF,CAAC;;;;AAKF,MAAa,iBAAiBD,GAAkB;CAC9C,MAAM;CACN,QAAQ;EACN,IAAI;GAAE,MAAMC,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,MAAM;GAAE,MAAMA,GAAe,iBAAiB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;GAAE,YAAY;GAAM;EACrE,QAAQ;GAAE,MAAMA,GAAe,MAAM;GAAE,YAAY;GAAM;EAC1D;CACF,CAAC;;;;AAKF,MAAa,2BAA2BD,GAAkB;CACxD,MAAM;CACN,QAAQ;EACN,QAAQ;GAAE,MAAM;GAAqB,YAAY;GAAM;EACvD,QAAQ;GAAE,MAAMC,GAAe,iBAAiB;GAAE,YAAY;GAAM;EACpE,OAAO;GACL,MAAMA,GAAe,cAAc;GACnC,YAAY;GACZ,cAAc;GACf;EACD,QAAQ;GACN,MAAMA,GAAe,cAAc;GACnC,YAAY;GACZ,cAAc;GACf;EACF;CACF,CAAC;;;;AAKF,MAAa,4BAA4BD,GAAkB;CACzD,MAAM;CACN,QAAQ;EACN,YAAY;GAAE,MAAM;GAAgB,SAAS;GAAM,YAAY;GAAO;EACtE,OAAO;GAAE,MAAMC,GAAe,cAAc;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAa,yBAAyBD,GAAkB;CACtD,MAAM;CACN,QAAQ;EACN,aAAa;GAAE,MAAMC,GAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE,MAAM;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAM;EAClE,YAAY;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE;CACF,CAAC"}
1
+ {"version":3,"file":"dashboard.schema.js","names":[],"sources":["../../src/dashboard/dashboard.schema.ts"],"sourcesContent":["import { defineSchemaModel, ScalarTypeEnum } from '@lssm/lib.schema';\nimport {\n DashboardStatusEnum,\n WidgetTypeEnum,\n RefreshIntervalEnum,\n} from './dashboard.enum';\n\n/**\n * A dashboard widget.\n */\nexport const WidgetModel = defineSchemaModel({\n name: 'WidgetModel',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n dashboardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n type: { type: WidgetTypeEnum, isOptional: false },\n gridX: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n gridY: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n gridWidth: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n gridHeight: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n queryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n config: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n\n/**\n * An analytics dashboard.\n */\nexport const DashboardModel = defineSchemaModel({\n name: 'DashboardModel',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n status: { type: DashboardStatusEnum, isOptional: false },\n refreshInterval: { type: RefreshIntervalEnum, isOptional: false },\n isPublic: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n widgets: { type: WidgetModel, isArray: true, isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Input for creating a dashboard.\n */\nexport const CreateDashboardInputModel = defineSchemaModel({\n name: 'CreateDashboardInput',\n fields: {\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n slug: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n refreshInterval: { type: RefreshIntervalEnum, isOptional: true },\n dateRange: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n\n/**\n * Input for adding a widget.\n */\nexport const AddWidgetInputModel = defineSchemaModel({\n name: 'AddWidgetInput',\n fields: {\n dashboardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n type: { type: WidgetTypeEnum, isOptional: false },\n gridX: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n gridY: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n gridWidth: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n gridHeight: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n queryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n config: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n\n/**\n * Input for listing dashboards.\n */\nexport const ListDashboardsInputModel = defineSchemaModel({\n name: 'ListDashboardsInput',\n fields: {\n status: { type: DashboardStatusEnum, isOptional: true },\n search: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n limit: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 20,\n },\n offset: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 0,\n },\n },\n});\n\n/**\n * Output for listing dashboards.\n */\nexport const ListDashboardsOutputModel = defineSchemaModel({\n name: 'ListDashboardsOutput',\n fields: {\n dashboards: { type: DashboardModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n});\n\n/**\n * Input for getting a dashboard.\n */\nexport const GetDashboardInputModel = defineSchemaModel({\n name: 'GetDashboardInput',\n fields: {\n dashboardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n shareToken: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n"],"mappings":";;;;;;;AAUA,MAAa,cAAc,kBAAkB;CAC3C,MAAM;CACN,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC1E,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,MAAM;GAAE,MAAM;GAAgB,YAAY;GAAO;EACjD,OAAO;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GA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E;CACF,CAAC"}
@@ -1,5 +1,4 @@
1
- import { registerDocBlocks } 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
4
  registerDocBlocks([
@@ -1 +1 @@
1
- {"version":3,"file":"analytics-dashboard.docblock.js","names":[],"sources":["../../src/docs/analytics-dashboard.docblock.ts"],"sourcesContent":["import type { DocBlock } from '@lssm/lib.contracts/docs';\nimport { registerDocBlocks } from '@lssm/lib.contracts/docs';\n\nconst analyticsDashboardDocBlocks: DocBlock[] = [\n {\n id: 'docs.examples.analytics-dashboard',\n title: 'Analytics Dashboard',\n summary:\n 'Multi-tenant analytics with dashboards, widgets, query builder, and scheduled reports built on the Event Bus.',\n kind: 'reference',\n visibility: 'public',\n route: '/docs/examples/analytics-dashboard',\n tags: ['analytics', 'dashboards', 'bi', 'queries'],\n body: `## Entities\n\n- Dashboard, Widget, Query, Report.\n- Widget/query configs stay declarative for regeneration.\n\n## Contracts\n\n- \\`analytics.dashboard.create\\`, \\`analytics.widget.add\\`, \\`analytics.query.execute\\`, \\`analytics.dashboard.get\\`.\n- Metrics can source from Event Bus schemas and Usage/Metering module.\n\n## Events\n\n- dashboard.created/updated, widget.added, report.scheduled/sent.\n- Emitted for audit + notification hooks.\n\n## UI / Presentations\n\n- Dashboard list, dashboard view, query builder, widget gallery.\n- Registered under \\`analytics-dashboard\\` template in Template Registry.\n\n## Notes\n\n- Enforce org scoping for multi-tenant isolation.\n- Use Feature Flags for beta widgets; Metering to track query volume.\n`,\n },\n {\n id: 'docs.examples.analytics-dashboard.goal',\n title: 'Analytics Dashboard — Goal',\n summary: 'Why this template matters and what success looks like.',\n kind: 'goal',\n visibility: 'public',\n route: '/docs/examples/analytics-dashboard/goal',\n tags: ['analytics', 'goal'],\n body: `## Why it matters\n- Give teams a regenerable analytics workspace that stays in sync with Event Bus, Usage/Metering, and presentations.\n- Avoid dashboard drift by keeping schema-first widgets/queries.\n\n## Business/Product goal\n- Deliver tenant-scoped dashboards, governed queries, and scheduled reports with clear ownership and auditability.\n- Enable feature-flagged rollout of new widgets and sampling for cost control.\n\n## Success criteria\n- Dashboards can be regenerated safely from spec changes.\n- Queries/widgets have enforced validation; PII is redacted per policy.`,\n },\n {\n id: 'docs.examples.analytics-dashboard.usage',\n title: 'Analytics Dashboard — Usage',\n summary: 'How to seed, extend, and safely regenerate dashboards.',\n kind: 'usage',\n visibility: 'public',\n route: '/docs/examples/analytics-dashboard/usage',\n tags: ['analytics', 'usage'],\n body: `## Setup\n1) Seed dashboards/widgets (via template registry) to preload sample queries.\n2) Configure org/tenant scope and attach Usage/Metering for cost/sampling controls.\n\n## Extend & regenerate\n1) Add or modify widget/query schemas in the spec (inputs, validation, PII paths).\n2) Regenerate to update UI + API + events; review presentations for redaction.\n3) Use Feature Flags to roll out new widgets or sampling knobs gradually.\n\n## Guardrails\n- Keep all query inputs validated; mark PII paths in policy.\n- Use Audit Trail for report deliveries; Notifications for scheduled sends.`,\n },\n {\n id: 'docs.examples.analytics-dashboard.constraints',\n title: 'Analytics Dashboard — Constraints & Safety',\n summary: 'Internal guardrails for queries, widgets, and regeneration.',\n kind: 'reference',\n visibility: 'internal',\n route: '/docs/examples/analytics-dashboard/constraints',\n tags: ['analytics', 'constraints', 'internal'],\n body: `## Constraints\n- Queries and widgets must declare inputs/validation in spec; no ad-hoc query strings.\n- Regeneration must preserve sampling/windowing semantics; document changes explicitly.\n- Events/usage metrics should remain consistent with Metering/Audit wiring.\n\n## PII & Data\n- Mark PII paths (user ids, emails) in presentations for redaction.\n- Avoid exposing raw query payloads in MCP/web without policy checks.\n\n## Verification\n- Add fixtures for widget/query schema changes and scheduled reports.\n- Run regeneration diff when adjusting query builders; ensure UI/markdown targets updated.\n- Confirm feature-flagged widgets default to safe/off for new tenants.`,\n },\n];\n\nregisterDocBlocks(analyticsDashboardDocBlocks);\n"],"mappings":";;;;AAwGA,kBArGgD;CAC9C;EACE,IAAI;EACJ,OAAO;EACP,SACE;EACF,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GAAC;GAAa;GAAc;GAAM;GAAU;EAClD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;EAyBP;CACD;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM,CAAC,aAAa,OAAO;EAC3B,MAAM;;;;;;;;;;;EAWP;CACD;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM,CAAC,aAAa,QAAQ;EAC5B,MAAM;;;;;;;;;;;;EAYP;CACD;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GAAC;GAAa;GAAe;GAAW;EAC9C,MAAM;;;;;;;;;;;;;EAaP;CACF,CAE6C"}
1
+ {"version":3,"file":"analytics-dashboard.docblock.js","names":[],"sources":["../../src/docs/analytics-dashboard.docblock.ts"],"sourcesContent":["import type { DocBlock } from '@lssm/lib.contracts/docs';\nimport { registerDocBlocks } from '@lssm/lib.contracts/docs';\n\nconst analyticsDashboardDocBlocks: DocBlock[] = [\n {\n id: 'docs.examples.analytics-dashboard',\n title: 'Analytics Dashboard',\n summary:\n 'Multi-tenant analytics with dashboards, widgets, query builder, and scheduled reports built on the Event Bus.',\n kind: 'reference',\n visibility: 'public',\n route: '/docs/examples/analytics-dashboard',\n tags: ['analytics', 'dashboards', 'bi', 'queries'],\n body: `## Entities\n\n- Dashboard, Widget, Query, Report.\n- Widget/query configs stay declarative for regeneration.\n\n## Contracts\n\n- \\`analytics.dashboard.create\\`, \\`analytics.widget.add\\`, \\`analytics.query.execute\\`, \\`analytics.dashboard.get\\`.\n- Metrics can source from Event Bus schemas and Usage/Metering module.\n\n## Events\n\n- dashboard.created/updated, widget.added, report.scheduled/sent.\n- Emitted for audit + notification hooks.\n\n## UI / Presentations\n\n- Dashboard list, dashboard view, query builder, widget gallery.\n- Registered under \\`analytics-dashboard\\` template in Template Registry.\n\n## Notes\n\n- Enforce org scoping for multi-tenant isolation.\n- Use Feature Flags for beta widgets; Metering to track query volume.\n`,\n },\n {\n id: 'docs.examples.analytics-dashboard.goal',\n title: 'Analytics Dashboard — Goal',\n summary: 'Why this template matters and what success looks like.',\n kind: 'goal',\n visibility: 'public',\n route: '/docs/examples/analytics-dashboard/goal',\n tags: ['analytics', 'goal'],\n body: `## Why it matters\n- Give teams a regenerable analytics workspace that stays in sync with Event Bus, Usage/Metering, and presentations.\n- Avoid dashboard drift by keeping schema-first widgets/queries.\n\n## Business/Product goal\n- Deliver tenant-scoped dashboards, governed queries, and scheduled reports with clear ownership and auditability.\n- Enable feature-flagged rollout of new widgets and sampling for cost control.\n\n## Success criteria\n- Dashboards can be regenerated safely from spec changes.\n- Queries/widgets have enforced validation; PII is redacted per policy.`,\n },\n {\n id: 'docs.examples.analytics-dashboard.usage',\n title: 'Analytics Dashboard — Usage',\n summary: 'How to seed, extend, and safely regenerate dashboards.',\n kind: 'usage',\n visibility: 'public',\n route: '/docs/examples/analytics-dashboard/usage',\n tags: ['analytics', 'usage'],\n body: `## Setup\n1) Seed dashboards/widgets (via template registry) to preload sample queries.\n2) Configure org/tenant scope and attach Usage/Metering for cost/sampling controls.\n\n## Extend & regenerate\n1) Add or modify widget/query schemas in the spec (inputs, validation, PII paths).\n2) Regenerate to update UI + API + events; review presentations for redaction.\n3) Use Feature Flags to roll out new widgets or sampling knobs gradually.\n\n## Guardrails\n- Keep all query inputs validated; mark PII paths in policy.\n- Use Audit Trail for report deliveries; Notifications for scheduled sends.`,\n },\n {\n id: 'docs.examples.analytics-dashboard.constraints',\n title: 'Analytics Dashboard — Constraints & Safety',\n summary: 'Internal guardrails for queries, widgets, and regeneration.',\n kind: 'reference',\n visibility: 'internal',\n route: '/docs/examples/analytics-dashboard/constraints',\n tags: ['analytics', 'constraints', 'internal'],\n body: `## Constraints\n- Queries and widgets must declare inputs/validation in spec; no ad-hoc query strings.\n- Regeneration must preserve sampling/windowing semantics; document changes explicitly.\n- Events/usage metrics should remain consistent with Metering/Audit wiring.\n\n## PII & Data\n- Mark PII paths (user ids, emails) in presentations for redaction.\n- Avoid exposing raw query payloads in MCP/web without policy checks.\n\n## Verification\n- Add fixtures for widget/query schema changes and scheduled reports.\n- Run regeneration diff when adjusting query builders; ensure UI/markdown targets updated.\n- Confirm feature-flagged widgets default to safe/off for new tenants.`,\n },\n];\n\nregisterDocBlocks(analyticsDashboardDocBlocks);\n"],"mappings":";;;AAwGA,kBArGgD;CAC9C;EACE,IAAI;EACJ,OAAO;EACP,SACE;EACF,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GAAC;GAAa;GAAc;GAAM;GAAU;EAClD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;EAyBP;CACD;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM,CAAC,aAAa,OAAO;EAC3B,MAAM;;;;;;;;;;;EAWP;CACD;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM,CAAC,aAAa,QAAQ;EAC5B,MAAM;;;;;;;;;;;;EAYP;CACD;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GAAC;GAAa;GAAe;GAAW;EAC9C,MAAM;;;;;;;;;;;;;EAaP;CACF,CAE6C"}
package/dist/events.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import * as _lssm_lib_contracts0 from "@lssm/lib.contracts";
2
1
  import * as _lssm_lib_schema0 from "@lssm/lib.schema";
2
+ import * as _lssm_lib_contracts0 from "@lssm/lib.contracts";
3
3
 
4
4
  //#region src/events.d.ts
5
5
  declare const DashboardCreatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
package/dist/events.js CHANGED
@@ -1,86 +1,85 @@
1
- import { E5, K5 } from "./libs/schema/dist/index.js";
2
- import { defineEvent } from "./libs/contracts/dist/events.js";
3
- import "./libs/contracts/dist/index.js";
1
+ import { ScalarTypeEnum, defineSchemaModel } from "@lssm/lib.schema";
2
+ import { defineEvent } from "@lssm/lib.contracts";
4
3
 
5
4
  //#region src/events.ts
6
- const DashboardEventPayload = K5({
5
+ const DashboardEventPayload = defineSchemaModel({
7
6
  name: "DashboardEventPayload",
8
7
  description: "Payload for dashboard events",
9
8
  fields: {
10
9
  dashboardId: {
11
- type: E5.String_unsecure(),
10
+ type: ScalarTypeEnum.String_unsecure(),
12
11
  isOptional: false
13
12
  },
14
13
  title: {
15
- type: E5.String_unsecure(),
14
+ type: ScalarTypeEnum.String_unsecure(),
16
15
  isOptional: false
17
16
  },
18
17
  orgId: {
19
- type: E5.String_unsecure(),
18
+ type: ScalarTypeEnum.String_unsecure(),
20
19
  isOptional: false
21
20
  },
22
21
  createdBy: {
23
- type: E5.String_unsecure(),
22
+ type: ScalarTypeEnum.String_unsecure(),
24
23
  isOptional: false
25
24
  },
26
25
  timestamp: {
27
- type: E5.DateTime(),
26
+ type: ScalarTypeEnum.DateTime(),
28
27
  isOptional: false
29
28
  }
30
29
  }
31
30
  });
32
- const WidgetEventPayload = K5({
31
+ const WidgetEventPayload = defineSchemaModel({
33
32
  name: "WidgetEventPayload",
34
33
  description: "Payload for widget events",
35
34
  fields: {
36
35
  widgetId: {
37
- type: E5.String_unsecure(),
36
+ type: ScalarTypeEnum.String_unsecure(),
38
37
  isOptional: false
39
38
  },
40
39
  dashboardId: {
41
- type: E5.String_unsecure(),
40
+ type: ScalarTypeEnum.String_unsecure(),
42
41
  isOptional: false
43
42
  },
44
43
  widgetType: {
45
- type: E5.String_unsecure(),
44
+ type: ScalarTypeEnum.String_unsecure(),
46
45
  isOptional: false
47
46
  },
48
47
  orgId: {
49
- type: E5.String_unsecure(),
48
+ type: ScalarTypeEnum.String_unsecure(),
50
49
  isOptional: false
51
50
  },
52
51
  timestamp: {
53
- type: E5.DateTime(),
52
+ type: ScalarTypeEnum.DateTime(),
54
53
  isOptional: false
55
54
  }
56
55
  }
57
56
  });
58
- const QueryEventPayload = K5({
57
+ const QueryEventPayload = defineSchemaModel({
59
58
  name: "QueryEventPayload",
60
59
  description: "Payload for query events",
61
60
  fields: {
62
61
  queryId: {
63
- type: E5.String_unsecure(),
62
+ type: ScalarTypeEnum.String_unsecure(),
64
63
  isOptional: false
65
64
  },
66
65
  name: {
67
- type: E5.String_unsecure(),
66
+ type: ScalarTypeEnum.String_unsecure(),
68
67
  isOptional: false
69
68
  },
70
69
  queryType: {
71
- type: E5.String_unsecure(),
70
+ type: ScalarTypeEnum.String_unsecure(),
72
71
  isOptional: false
73
72
  },
74
73
  orgId: {
75
- type: E5.String_unsecure(),
74
+ type: ScalarTypeEnum.String_unsecure(),
76
75
  isOptional: false
77
76
  },
78
77
  createdBy: {
79
- type: E5.String_unsecure(),
78
+ type: ScalarTypeEnum.String_unsecure(),
80
79
  isOptional: false
81
80
  },
82
81
  timestamp: {
83
- type: E5.DateTime(),
82
+ type: ScalarTypeEnum.DateTime(),
84
83
  isOptional: false
85
84
  }
86
85
  }
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","names":["defineSchemaModel","ScalarTypeEnum"],"sources":["../src/events.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@lssm/lib.schema';\nimport { defineEvent } from '@lssm/lib.contracts';\n\nconst DashboardEventPayload = defineSchemaModel({\n name: 'DashboardEventPayload',\n description: 'Payload for dashboard events',\n fields: {\n dashboardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst WidgetEventPayload = defineSchemaModel({\n name: 'WidgetEventPayload',\n description: 'Payload for widget events',\n fields: {\n widgetId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n dashboardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n widgetType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst QueryEventPayload = defineSchemaModel({\n name: 'QueryEventPayload',\n description: 'Payload for query events',\n fields: {\n queryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n queryType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const DashboardCreatedEvent = defineEvent({\n name: 'analytics.dashboard.created',\n version: 1,\n description: 'A dashboard was created.',\n payload: DashboardEventPayload,\n});\n\nexport const WidgetAddedEvent = defineEvent({\n name: 'analytics.widget.added',\n version: 1,\n description: 'A widget was added to a dashboard.',\n payload: WidgetEventPayload,\n});\n\nexport const QueryCreatedEvent = defineEvent({\n name: 'analytics.query.created',\n version: 1,\n description: 'A query was created.',\n payload: QueryEventPayload,\n});\n\nexport const AnalyticsDashboardEvents = {\n DashboardCreatedEvent,\n WidgetAddedEvent,\n QueryCreatedEvent,\n};\n"],"mappings":";;;;;AAGA,MAAM,wBAAwBA,GAAkB;CAC9C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,aAAa;GAAE,MAAMC,GAAe,iBAAiB;GAAE,YAAY;GAAO;EAC1E,OAAO;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,OAAO;GAAE,MAAMA,GAAe,iB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CACD"}
1
+ {"version":3,"file":"events.js","names":[],"sources":["../src/events.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@lssm/lib.schema';\nimport { defineEvent } from '@lssm/lib.contracts';\n\nconst DashboardEventPayload = defineSchemaModel({\n name: 'DashboardEventPayload',\n description: 'Payload for dashboard events',\n fields: {\n dashboardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst WidgetEventPayload = defineSchemaModel({\n name: 'WidgetEventPayload',\n description: 'Payload for widget events',\n fields: {\n widgetId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n dashboardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n widgetType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst QueryEventPayload = defineSchemaModel({\n name: 'QueryEventPayload',\n description: 'Payload for query events',\n fields: {\n queryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n queryType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const DashboardCreatedEvent = defineEvent({\n name: 'analytics.dashboard.created',\n version: 1,\n description: 'A dashboard was created.',\n payload: DashboardEventPayload,\n});\n\nexport const WidgetAddedEvent = defineEvent({\n name: 'analytics.widget.added',\n version: 1,\n description: 'A widget was added to a dashboard.',\n payload: WidgetEventPayload,\n});\n\nexport const QueryCreatedEvent = defineEvent({\n name: 'analytics.query.created',\n version: 1,\n description: 'A query was created.',\n payload: QueryEventPayload,\n});\n\nexport const AnalyticsDashboardEvents = {\n DashboardCreatedEvent,\n WidgetAddedEvent,\n QueryCreatedEvent,\n};\n"],"mappings":";;;;AAGA,MAAM,wBAAwB,kBAAkB;CAC9C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC1E,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAM,qBAAqB,kBAAkB;CAC3C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC1E,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACzE,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAM,oBAAoB,kBAAkB;CAC1C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAa,wBAAwB,YAAY;CAC/C,MAAM;CACN,SAAS;CACT,aAAa;CACb,SAAS;CACV,CAAC;AAEF,MAAa,mBAAmB,YAAY;CAC1C,MAAM;CACN,SAAS;CACT,aAAa;CACb,SAAS;CACV,CAAC;AAEF,MAAa,oBAAoB,YAAY;CAC3C,MAAM;CACN,SAAS;CACT,aAAa;CACb,SAAS;CACV,CAAC;AAEF,MAAa,2BAA2B;CACtC;CACA;CACA;CACD"}
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.operation.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,10 +1,10 @@
1
- import { N5 } from "../libs/schema/dist/index.js";
1
+ import { defineEnum } from "@lssm/lib.schema";
2
2
 
3
3
  //#region src/query/query.enum.ts
4
4
  /**
5
5
  * Query type enum.
6
6
  */
7
- const QueryTypeEnum = N5("QueryType", [
7
+ const QueryTypeEnum = defineEnum("QueryType", [
8
8
  "SQL",
9
9
  "METRIC",
10
10
  "AGGREGATION",
@@ -1 +1 @@
1
- {"version":3,"file":"query.enum.js","names":["defineEnum"],"sources":["../../src/query/query.enum.ts"],"sourcesContent":["import { defineEnum } from '@lssm/lib.schema';\n\n/**\n * Query type enum.\n */\nexport const QueryTypeEnum = defineEnum('QueryType', [\n 'SQL',\n 'METRIC',\n 'AGGREGATION',\n 'CUSTOM',\n]);\n"],"mappings":";;;;;;AAKA,MAAa,gBAAgBA,GAAW,aAAa;CACnD;CACA;CACA;CACA;CACD,CAAC"}
1
+ {"version":3,"file":"query.enum.js","names":[],"sources":["../../src/query/query.enum.ts"],"sourcesContent":["import { defineEnum } from '@lssm/lib.schema';\n\n/**\n * Query type enum.\n */\nexport const QueryTypeEnum = defineEnum('QueryType', [\n 'SQL',\n 'METRIC',\n 'AGGREGATION',\n 'CUSTOM',\n]);\n"],"mappings":";;;;;;AAKA,MAAa,gBAAgB,WAAW,aAAa;CACnD;CACA;CACA;CACA;CACD,CAAC"}
@@ -1,5 +1,5 @@
1
- import * as _lssm_lib_contracts9 from "@lssm/lib.contracts";
2
1
  import * as _lssm_lib_schema248 from "@lssm/lib.schema";
2
+ import * as _lssm_lib_contracts9 from "@lssm/lib.contracts";
3
3
 
4
4
  //#region src/query/query.operation.d.ts
5
5
  /**
@@ -1,6 +1,5 @@
1
- import { defineCommand, defineQuery } from "../libs/contracts/dist/operations/operation.js";
2
- import "../libs/contracts/dist/operations/index.js";
3
1
  import { CreateQueryInputModel, ExecuteQueryInputModel, QueryModel, QueryResultModel } from "./query.schema.js";
2
+ import { defineCommand, defineQuery } from "@lssm/lib.contracts/operations";
4
3
 
5
4
  //#region src/query/query.operation.ts
6
5
  const OWNERS = ["@example.analytics-dashboard"];
@@ -1 +1 @@
1
- {"version":3,"file":"query.operation.js","names":[],"sources":["../../src/query/query.operation.ts"],"sourcesContent":["import { defineCommand, defineQuery } from '@lssm/lib.contracts/operations';\nimport {\n QueryModel,\n QueryResultModel,\n CreateQueryInputModel,\n ExecuteQueryInputModel,\n} from './query.schema';\n\nconst OWNERS = ['@example.analytics-dashboard'] as const;\n\n/**\n * Create a data query.\n */\nexport const CreateQueryContract = defineCommand({\n meta: {\n name: 'analytics.query.create',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['analytics', 'query', 'create'],\n description: 'Create a data query.',\n goal: 'Define reusable data queries.',\n context: 'Query builder.',\n },\n io: { input: CreateQueryInputModel, output: QueryModel },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n name: 'analytics.query.created',\n version: 1,\n when: 'Query created',\n payload: QueryModel,\n },\n ],\n audit: ['analytics.query.created'],\n },\n});\n\n/**\n * Execute a data query.\n */\nexport const ExecuteQueryContract = defineQuery({\n meta: {\n name: 'analytics.query.execute',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['analytics', 'query', 'execute'],\n description: 'Execute a data query.',\n goal: 'Fetch data for visualizations.',\n context: 'Dashboard rendering.',\n },\n io: { input: ExecuteQueryInputModel, output: QueryResultModel },\n policy: { auth: 'user' },\n});\n"],"mappings":";;;;;AAQA,MAAM,SAAS,CAAC,+BAA+B;;;;AAK/C,MAAa,sBAAsB,cAAc;CAC/C,MAAM;EACJ,MAAM;EACN,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAa;GAAS;GAAS;EACtC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAAuB,QAAQ;EAAY;CACxD,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa;EACX,OAAO,CACL;GACE,MAAM;GACN,SAAS;GACT,MAAM;GACN,SAAS;GACV,CACF;EACD,OAAO,CAAC,0BAA0B;EACnC;CACF,CAAC;;;;AAKF,MAAa,uBAAuB,YAAY;CAC9C,MAAM;EACJ,MAAM;EACN,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAa;GAAS;GAAU;EACvC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAAwB,QAAQ;EAAkB;CAC/D,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC"}
1
+ {"version":3,"file":"query.operation.js","names":[],"sources":["../../src/query/query.operation.ts"],"sourcesContent":["import { defineCommand, defineQuery } from '@lssm/lib.contracts/operations';\nimport {\n QueryModel,\n QueryResultModel,\n CreateQueryInputModel,\n ExecuteQueryInputModel,\n} from './query.schema';\n\nconst OWNERS = ['@example.analytics-dashboard'] as const;\n\n/**\n * Create a data query.\n */\nexport const CreateQueryContract = defineCommand({\n meta: {\n name: 'analytics.query.create',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['analytics', 'query', 'create'],\n description: 'Create a data query.',\n goal: 'Define reusable data queries.',\n context: 'Query builder.',\n },\n io: { input: CreateQueryInputModel, output: QueryModel },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n name: 'analytics.query.created',\n version: 1,\n when: 'Query created',\n payload: QueryModel,\n },\n ],\n audit: ['analytics.query.created'],\n },\n});\n\n/**\n * Execute a data query.\n */\nexport const ExecuteQueryContract = defineQuery({\n meta: {\n name: 'analytics.query.execute',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['analytics', 'query', 'execute'],\n description: 'Execute a data query.',\n goal: 'Fetch data for visualizations.',\n context: 'Dashboard rendering.',\n },\n io: { input: ExecuteQueryInputModel, output: QueryResultModel },\n policy: { auth: 'user' },\n});\n"],"mappings":";;;;AAQA,MAAM,SAAS,CAAC,+BAA+B;;;;AAK/C,MAAa,sBAAsB,cAAc;CAC/C,MAAM;EACJ,MAAM;EACN,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAa;GAAS;GAAS;EACtC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAAuB,QAAQ;EAAY;CACxD,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa;EACX,OAAO,CACL;GACE,MAAM;GACN,SAAS;GACT,MAAM;GACN,SAAS;GACV,CACF;EACD,OAAO,CAAC,0BAA0B;EACnC;CACF,CAAC;;;;AAKF,MAAa,uBAAuB,YAAY;CAC9C,MAAM;EACJ,MAAM;EACN,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAa;GAAS;GAAU;EACvC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAAwB,QAAQ;EAAkB;CAC/D,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC"}