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.
List deals with filters.
Goal
Show pipeline, deal lists, dashboards.
Context
Pipeline view, deal list.
Source Definition
import {
defineCommand,
defineQuery,
} from '@lssm-tech/lib.contracts-spec/operations';
import {
CreateDealInputModel,
DealLostPayloadModel,
DealModel,
DealMovedPayloadModel,
DealWonPayloadModel,
ListDealsInputModel,
ListDealsOutputModel,
LoseDealInputModel,
MoveDealInputModel,
WinDealInputModel,
} from './deal.schema';
export const ListDealsContract = defineQuery({
meta: {
key: 'crm.deal.list',
version: '1.0.0',
stability: 'stable',
owners: ['@example.crm-pipeline'],
tags: ['crm', 'deal', 'list'],
description: 'List deals with filters.',
goal: 'Show pipeline, deal lists, dashboards.',
context: 'Pipeline view, deal list.',
},
io: {
input: ListDealsInputModel,
output: ListDealsOutputModel,
},
policy: {
auth: 'user',
},
acceptance: {
scenarios: [
{
key: 'list-deals-happy-path',
given: ['User has access to deals'],
when: ['User lists deals'],
then: ['List of deals is returned'],
},
],
examples: [
{
key: 'list-filter-stage',
input: { stageId: 'stage-lead', limit: 20 },
output: { items: [], total: 5, hasMore: false },
},
],
},
});