OSS-first docs
These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.
Get a dashboard with widgets.
Goal
Load dashboard for viewing.
Context
Dashboard view.
Source Definition
import {
defineCommand,
defineQuery,
} from '@lssm-tech/lib.contracts-spec/operations';
import {
AddWidgetInputModel,
CreateDashboardInputModel,
DashboardModel,
GetDashboardInputModel,
ListDashboardsInputModel,
ListDashboardsOutputModel,
WidgetModel,
} from './dashboard.schema';
export const GetDashboardContract = defineQuery({
meta: {
key: 'analytics.dashboard.get',
version: '1.0.0',
stability: 'stable',
owners: ['@example.analytics-dashboard'],
tags: ['analytics', 'dashboard', 'get'],
description: 'Get a dashboard with widgets.',
goal: 'Load dashboard for viewing.',
context: 'Dashboard view.',
},
io: { input: GetDashboardInputModel, output: DashboardModel },
policy: { auth: 'anonymous' },
acceptance: {
scenarios: [
{
key: 'get-dashboard-happy-path',
given: ['Dashboard exists'],
when: ['User requests dashboard by ID'],
then: ['Dashboard with widgets is returned'],
},
],
examples: [
{
key: 'get-basic',
input: { dashboardId: 'dash-123' },
output: { id: 'dash-123', name: 'Revenue Dashboard', widgets: [] },
},
],
},
});