@contractspec/example.crm-pipeline 1.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build$colon$bundle.log +97 -0
- package/.turbo/turbo-build.log +98 -0
- package/CHANGELOG.md +246 -0
- package/LICENSE +21 -0
- package/README.md +139 -0
- package/dist/crm-pipeline.feature.d.ts +12 -0
- package/dist/crm-pipeline.feature.d.ts.map +1 -0
- package/dist/crm-pipeline.feature.js +159 -0
- package/dist/crm-pipeline.feature.js.map +1 -0
- package/dist/deal/deal.enum.d.ts +14 -0
- package/dist/deal/deal.enum.d.ts.map +1 -0
- package/dist/deal/deal.enum.js +25 -0
- package/dist/deal/deal.enum.js.map +1 -0
- package/dist/deal/deal.operation.d.ts +513 -0
- package/dist/deal/deal.operation.d.ts.map +1 -0
- package/dist/deal/deal.operation.js +270 -0
- package/dist/deal/deal.operation.js.map +1 -0
- package/dist/deal/deal.schema.d.ts +300 -0
- package/dist/deal/deal.schema.d.ts.map +1 -0
- package/dist/deal/deal.schema.js +286 -0
- package/dist/deal/deal.schema.js.map +1 -0
- package/dist/deal/index.d.ts +4 -0
- package/dist/deal/index.js +5 -0
- package/dist/docs/crm-pipeline.docblock.d.ts +1 -0
- package/dist/docs/crm-pipeline.docblock.js +100 -0
- package/dist/docs/crm-pipeline.docblock.js.map +1 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -0
- package/dist/entities/company.entity.d.ts +40 -0
- package/dist/entities/company.entity.d.ts.map +1 -0
- package/dist/entities/company.entity.js +63 -0
- package/dist/entities/company.entity.js.map +1 -0
- package/dist/entities/contact.entity.d.ts +44 -0
- package/dist/entities/contact.entity.d.ts.map +1 -0
- package/dist/entities/contact.entity.js +78 -0
- package/dist/entities/contact.entity.js.map +1 -0
- package/dist/entities/deal.entity.d.ts +73 -0
- package/dist/entities/deal.entity.d.ts.map +1 -0
- package/dist/entities/deal.entity.js +120 -0
- package/dist/entities/deal.entity.js.map +1 -0
- package/dist/entities/index.d.ts +15 -0
- package/dist/entities/index.d.ts.map +1 -0
- package/dist/entities/index.js +33 -0
- package/dist/entities/index.js.map +1 -0
- package/dist/entities/task.entity.d.ts +65 -0
- package/dist/entities/task.entity.d.ts.map +1 -0
- package/dist/entities/task.entity.js +129 -0
- package/dist/entities/task.entity.js.map +1 -0
- package/dist/events/contact.event.d.ts +29 -0
- package/dist/events/contact.event.d.ts.map +1 -0
- package/dist/events/contact.event.js +45 -0
- package/dist/events/contact.event.js.map +1 -0
- package/dist/events/deal.event.d.ts +111 -0
- package/dist/events/deal.event.d.ts.map +1 -0
- package/dist/events/deal.event.js +172 -0
- package/dist/events/deal.event.js.map +1 -0
- package/dist/events/index.d.ts +4 -0
- package/dist/events/index.js +5 -0
- package/dist/events/task.event.d.ts +29 -0
- package/dist/events/task.event.d.ts.map +1 -0
- package/dist/events/task.event.js +45 -0
- package/dist/events/task.event.js.map +1 -0
- package/dist/example.d.ts +37 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +46 -0
- package/dist/example.js.map +1 -0
- package/dist/handlers/deal.handlers.d.ts +94 -0
- package/dist/handlers/deal.handlers.d.ts.map +1 -0
- package/dist/handlers/deal.handlers.js +120 -0
- package/dist/handlers/deal.handlers.js.map +1 -0
- package/dist/handlers/index.d.ts +3 -0
- package/dist/handlers/index.js +4 -0
- package/dist/handlers/mock-data.d.ts +49 -0
- package/dist/handlers/mock-data.d.ts.map +1 -0
- package/dist/handlers/mock-data.js +188 -0
- package/dist/handlers/mock-data.js.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/operations/index.d.ts +5 -0
- package/dist/operations/index.js +6 -0
- package/dist/presentations/dashboard.presentation.d.ts +15 -0
- package/dist/presentations/dashboard.presentation.d.ts.map +1 -0
- package/dist/presentations/dashboard.presentation.js +59 -0
- package/dist/presentations/dashboard.presentation.js.map +1 -0
- package/dist/presentations/index.d.ts +3 -0
- package/dist/presentations/index.js +4 -0
- package/dist/presentations/pipeline.presentation.d.ts +23 -0
- package/dist/presentations/pipeline.presentation.d.ts.map +1 -0
- package/dist/presentations/pipeline.presentation.js +119 -0
- package/dist/presentations/pipeline.presentation.js.map +1 -0
- package/example.ts +1 -0
- package/package.json +105 -0
- package/src/crm-pipeline.feature.ts +96 -0
- package/src/deal/deal.enum.ts +21 -0
- package/src/deal/deal.operation.ts +291 -0
- package/src/deal/deal.schema.ts +154 -0
- package/src/deal/index.ts +26 -0
- package/src/docs/crm-pipeline.docblock.ts +98 -0
- package/src/docs/index.ts +1 -0
- package/src/entities/company.entity.ts +77 -0
- package/src/entities/contact.entity.ts +93 -0
- package/src/entities/deal.entity.ts +160 -0
- package/src/entities/index.ts +45 -0
- package/src/entities/task.entity.ts +137 -0
- package/src/events/contact.event.ts +31 -0
- package/src/events/deal.event.ts +104 -0
- package/src/events/index.ts +3 -0
- package/src/events/task.event.ts +28 -0
- package/src/example.ts +30 -0
- package/src/handlers/deal.handlers.ts +253 -0
- package/src/handlers/index.ts +27 -0
- package/src/handlers/mock-data.ts +198 -0
- package/src/index.ts +31 -0
- package/src/operations/index.ts +20 -0
- package/src/presentations/dashboard.presentation.ts +60 -0
- package/src/presentations/index.ts +2 -0
- package/src/presentations/pipeline.presentation.ts +118 -0
- package/tsconfig.json +10 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/tsdown.config.js +7 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mock data for crm-pipeline handlers
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// ============ Types for Mock Data ============
|
|
6
|
+
|
|
7
|
+
export interface MockDeal {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
value: number;
|
|
11
|
+
currency: string;
|
|
12
|
+
pipelineId: string;
|
|
13
|
+
stageId: string;
|
|
14
|
+
status: 'OPEN' | 'WON' | 'LOST' | 'STALE';
|
|
15
|
+
contactId?: string;
|
|
16
|
+
companyId?: string;
|
|
17
|
+
ownerId: string;
|
|
18
|
+
expectedCloseDate?: Date;
|
|
19
|
+
createdAt: Date;
|
|
20
|
+
updatedAt: Date;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface MockStage {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
position: number;
|
|
27
|
+
pipelineId: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// ============ Pipeline Stages Mock Data ============
|
|
31
|
+
|
|
32
|
+
export const MOCK_STAGES: MockStage[] = [
|
|
33
|
+
{ id: 'stage-1', name: 'Lead', position: 1, pipelineId: 'pipeline-1' },
|
|
34
|
+
{ id: 'stage-2', name: 'Qualified', position: 2, pipelineId: 'pipeline-1' },
|
|
35
|
+
{ id: 'stage-3', name: 'Proposal', position: 3, pipelineId: 'pipeline-1' },
|
|
36
|
+
{ id: 'stage-4', name: 'Negotiation', position: 4, pipelineId: 'pipeline-1' },
|
|
37
|
+
{ id: 'stage-5', name: 'Closed', position: 5, pipelineId: 'pipeline-1' },
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
// ============ Deal Mock Data ============
|
|
41
|
+
|
|
42
|
+
export const MOCK_DEALS: MockDeal[] = [
|
|
43
|
+
{
|
|
44
|
+
id: 'deal-1',
|
|
45
|
+
name: 'Enterprise License - Acme Corp',
|
|
46
|
+
value: 75000,
|
|
47
|
+
currency: 'USD',
|
|
48
|
+
pipelineId: 'pipeline-1',
|
|
49
|
+
stageId: 'stage-3',
|
|
50
|
+
status: 'OPEN',
|
|
51
|
+
contactId: 'contact-1',
|
|
52
|
+
companyId: 'company-1',
|
|
53
|
+
ownerId: 'user-1',
|
|
54
|
+
expectedCloseDate: new Date('2024-05-15T00:00:00Z'),
|
|
55
|
+
createdAt: new Date('2024-02-01T10:00:00Z'),
|
|
56
|
+
updatedAt: new Date('2024-04-10T14:30:00Z'),
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: 'deal-2',
|
|
60
|
+
name: 'Startup Plan - TechStart Inc',
|
|
61
|
+
value: 12000,
|
|
62
|
+
currency: 'USD',
|
|
63
|
+
pipelineId: 'pipeline-1',
|
|
64
|
+
stageId: 'stage-2',
|
|
65
|
+
status: 'OPEN',
|
|
66
|
+
contactId: 'contact-2',
|
|
67
|
+
companyId: 'company-2',
|
|
68
|
+
ownerId: 'user-2',
|
|
69
|
+
expectedCloseDate: new Date('2024-04-30T00:00:00Z'),
|
|
70
|
+
createdAt: new Date('2024-03-15T09:00:00Z'),
|
|
71
|
+
updatedAt: new Date('2024-04-08T11:15:00Z'),
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: 'deal-3',
|
|
75
|
+
name: 'Professional Services - Global Ltd',
|
|
76
|
+
value: 45000,
|
|
77
|
+
currency: 'USD',
|
|
78
|
+
pipelineId: 'pipeline-1',
|
|
79
|
+
stageId: 'stage-4',
|
|
80
|
+
status: 'OPEN',
|
|
81
|
+
contactId: 'contact-3',
|
|
82
|
+
companyId: 'company-3',
|
|
83
|
+
ownerId: 'user-1',
|
|
84
|
+
expectedCloseDate: new Date('2024-04-20T00:00:00Z'),
|
|
85
|
+
createdAt: new Date('2024-01-20T08:00:00Z'),
|
|
86
|
+
updatedAt: new Date('2024-04-12T16:45:00Z'),
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: 'deal-4',
|
|
90
|
+
name: 'Annual Contract - SmallBiz Co',
|
|
91
|
+
value: 8500,
|
|
92
|
+
currency: 'USD',
|
|
93
|
+
pipelineId: 'pipeline-1',
|
|
94
|
+
stageId: 'stage-1',
|
|
95
|
+
status: 'OPEN',
|
|
96
|
+
contactId: 'contact-4',
|
|
97
|
+
companyId: 'company-4',
|
|
98
|
+
ownerId: 'user-3',
|
|
99
|
+
createdAt: new Date('2024-04-05T12:00:00Z'),
|
|
100
|
+
updatedAt: new Date('2024-04-05T12:00:00Z'),
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: 'deal-5',
|
|
104
|
+
name: 'Custom Integration - MegaCorp',
|
|
105
|
+
value: 125000,
|
|
106
|
+
currency: 'USD',
|
|
107
|
+
pipelineId: 'pipeline-1',
|
|
108
|
+
stageId: 'stage-5',
|
|
109
|
+
status: 'WON',
|
|
110
|
+
contactId: 'contact-5',
|
|
111
|
+
companyId: 'company-5',
|
|
112
|
+
ownerId: 'user-1',
|
|
113
|
+
expectedCloseDate: new Date('2024-03-31T00:00:00Z'),
|
|
114
|
+
createdAt: new Date('2023-11-10T10:00:00Z'),
|
|
115
|
+
updatedAt: new Date('2024-03-28T09:00:00Z'),
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: 'deal-6',
|
|
119
|
+
name: 'Pilot Project - NewCo',
|
|
120
|
+
value: 5000,
|
|
121
|
+
currency: 'USD',
|
|
122
|
+
pipelineId: 'pipeline-1',
|
|
123
|
+
stageId: 'stage-2',
|
|
124
|
+
status: 'LOST',
|
|
125
|
+
contactId: 'contact-6',
|
|
126
|
+
companyId: 'company-6',
|
|
127
|
+
ownerId: 'user-2',
|
|
128
|
+
createdAt: new Date('2024-01-15T14:00:00Z'),
|
|
129
|
+
updatedAt: new Date('2024-02-28T10:30:00Z'),
|
|
130
|
+
},
|
|
131
|
+
];
|
|
132
|
+
|
|
133
|
+
// ============ Company Mock Data ============
|
|
134
|
+
|
|
135
|
+
export const MOCK_COMPANIES = [
|
|
136
|
+
{
|
|
137
|
+
id: 'company-1',
|
|
138
|
+
name: 'Acme Corporation',
|
|
139
|
+
domain: 'acme.com',
|
|
140
|
+
industry: 'Technology',
|
|
141
|
+
size: '1000-5000',
|
|
142
|
+
website: 'https://acme.com',
|
|
143
|
+
createdAt: new Date('2024-01-01T00:00:00Z'),
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: 'company-2',
|
|
147
|
+
name: 'TechStart Inc',
|
|
148
|
+
domain: 'techstart.io',
|
|
149
|
+
industry: 'Software',
|
|
150
|
+
size: '10-50',
|
|
151
|
+
website: 'https://techstart.io',
|
|
152
|
+
createdAt: new Date('2024-02-15T00:00:00Z'),
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
id: 'company-3',
|
|
156
|
+
name: 'Global Ltd',
|
|
157
|
+
domain: 'global.com',
|
|
158
|
+
industry: 'Consulting',
|
|
159
|
+
size: '500-1000',
|
|
160
|
+
website: 'https://global.com',
|
|
161
|
+
createdAt: new Date('2023-12-01T00:00:00Z'),
|
|
162
|
+
},
|
|
163
|
+
];
|
|
164
|
+
|
|
165
|
+
// ============ Contact Mock Data ============
|
|
166
|
+
|
|
167
|
+
export const MOCK_CONTACTS = [
|
|
168
|
+
{
|
|
169
|
+
id: 'contact-1',
|
|
170
|
+
firstName: 'John',
|
|
171
|
+
lastName: 'Smith',
|
|
172
|
+
email: 'john.smith@acme.com',
|
|
173
|
+
phone: '+1-555-0101',
|
|
174
|
+
title: 'VP of Engineering',
|
|
175
|
+
companyId: 'company-1',
|
|
176
|
+
createdAt: new Date('2024-01-05T00:00:00Z'),
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: 'contact-2',
|
|
180
|
+
firstName: 'Sarah',
|
|
181
|
+
lastName: 'Johnson',
|
|
182
|
+
email: 'sarah@techstart.io',
|
|
183
|
+
phone: '+1-555-0102',
|
|
184
|
+
title: 'CEO',
|
|
185
|
+
companyId: 'company-2',
|
|
186
|
+
createdAt: new Date('2024-02-20T00:00:00Z'),
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
id: 'contact-3',
|
|
190
|
+
firstName: 'Michael',
|
|
191
|
+
lastName: 'Brown',
|
|
192
|
+
email: 'michael.brown@global.com',
|
|
193
|
+
phone: '+1-555-0103',
|
|
194
|
+
title: 'CTO',
|
|
195
|
+
companyId: 'company-3',
|
|
196
|
+
createdAt: new Date('2023-12-10T00:00:00Z'),
|
|
197
|
+
},
|
|
198
|
+
];
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// CRM Pipeline Example
|
|
2
|
+
// Demonstrates ContractSpec principles for a CRM application
|
|
3
|
+
|
|
4
|
+
export * from './entities';
|
|
5
|
+
export * from './operations';
|
|
6
|
+
export * from './events';
|
|
7
|
+
export * from './handlers';
|
|
8
|
+
export * from './presentations';
|
|
9
|
+
export * from './crm-pipeline.feature';
|
|
10
|
+
export { default as example } from './example';
|
|
11
|
+
import './docs';
|
|
12
|
+
|
|
13
|
+
// Schema composition configuration
|
|
14
|
+
import { identityRbacSchemaContribution } from '@contractspec/lib.identity-rbac';
|
|
15
|
+
import { auditTrailSchemaContribution } from '@contractspec/module.audit-trail';
|
|
16
|
+
import { notificationsSchemaContribution } from '@contractspec/module.notifications';
|
|
17
|
+
import { crmPipelineSchemaContribution } from './entities';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Complete schema composition for CRM Pipeline.
|
|
21
|
+
*/
|
|
22
|
+
export const schemaComposition = {
|
|
23
|
+
modules: [
|
|
24
|
+
identityRbacSchemaContribution,
|
|
25
|
+
auditTrailSchemaContribution,
|
|
26
|
+
notificationsSchemaContribution,
|
|
27
|
+
crmPipelineSchemaContribution,
|
|
28
|
+
],
|
|
29
|
+
provider: 'postgresql' as const,
|
|
30
|
+
outputPath: './prisma/schema/generated.prisma',
|
|
31
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Deal contracts and models - re-exports from deal domain
|
|
2
|
+
// Note: DealStatusEnum is exported from entities, not here (to avoid conflict)
|
|
3
|
+
export {
|
|
4
|
+
DealStatusFilterEnum,
|
|
5
|
+
DealModel,
|
|
6
|
+
CreateDealInputModel,
|
|
7
|
+
MoveDealInputModel,
|
|
8
|
+
DealMovedPayloadModel,
|
|
9
|
+
WinDealInputModel,
|
|
10
|
+
DealWonPayloadModel,
|
|
11
|
+
LoseDealInputModel,
|
|
12
|
+
DealLostPayloadModel,
|
|
13
|
+
ListDealsInputModel,
|
|
14
|
+
ListDealsOutputModel,
|
|
15
|
+
CreateDealContract,
|
|
16
|
+
MoveDealContract,
|
|
17
|
+
WinDealContract,
|
|
18
|
+
LoseDealContract,
|
|
19
|
+
ListDealsContract,
|
|
20
|
+
} from '../deal';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CRM Dashboard Presentation Descriptor
|
|
3
|
+
*/
|
|
4
|
+
import type { PresentationSpec } from '@contractspec/lib.contracts';
|
|
5
|
+
import { StabilityEnum } from '@contractspec/lib.contracts';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Main CRM dashboard presentation.
|
|
9
|
+
*/
|
|
10
|
+
export const CrmDashboardPresentation: PresentationSpec = {
|
|
11
|
+
meta: {
|
|
12
|
+
key: 'crm.dashboard',
|
|
13
|
+
version: 1,
|
|
14
|
+
title: 'CRM Dashboard',
|
|
15
|
+
description:
|
|
16
|
+
'Main CRM dashboard with pipeline overview, deal stats, and activities',
|
|
17
|
+
domain: 'crm-pipeline',
|
|
18
|
+
owners: ['@crm-team'],
|
|
19
|
+
tags: ['dashboard', 'overview'],
|
|
20
|
+
stability: StabilityEnum.Experimental,
|
|
21
|
+
goal: 'Provide a high-level overview of CRM performance and active deals.',
|
|
22
|
+
context: 'The landing page for CRM users.',
|
|
23
|
+
},
|
|
24
|
+
source: {
|
|
25
|
+
type: 'component',
|
|
26
|
+
framework: 'react',
|
|
27
|
+
componentKey: 'CrmDashboard',
|
|
28
|
+
},
|
|
29
|
+
targets: ['react', 'markdown'],
|
|
30
|
+
policy: {
|
|
31
|
+
flags: ['crm.enabled'],
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Pipeline metrics presentation.
|
|
37
|
+
*/
|
|
38
|
+
export const PipelineMetricsPresentation: PresentationSpec = {
|
|
39
|
+
meta: {
|
|
40
|
+
key: 'crm.pipeline.metrics',
|
|
41
|
+
version: 1,
|
|
42
|
+
title: 'Pipeline Metrics',
|
|
43
|
+
description: 'Pipeline metrics and forecasting view',
|
|
44
|
+
domain: 'crm-pipeline',
|
|
45
|
+
owners: ['@crm-team'],
|
|
46
|
+
tags: ['pipeline', 'metrics', 'forecast'],
|
|
47
|
+
stability: StabilityEnum.Experimental,
|
|
48
|
+
goal: 'Track pipeline health and sales forecasts.',
|
|
49
|
+
context: 'Data-intensive widget for sales managers.',
|
|
50
|
+
},
|
|
51
|
+
source: {
|
|
52
|
+
type: 'component',
|
|
53
|
+
framework: 'react',
|
|
54
|
+
componentKey: 'PipelineMetricsView',
|
|
55
|
+
},
|
|
56
|
+
targets: ['react', 'markdown'],
|
|
57
|
+
policy: {
|
|
58
|
+
flags: ['crm.metrics.enabled'],
|
|
59
|
+
},
|
|
60
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pipeline Presentation Descriptors
|
|
3
|
+
*/
|
|
4
|
+
import type { PresentationSpec } from '@contractspec/lib.contracts';
|
|
5
|
+
import { StabilityEnum } from '@contractspec/lib.contracts';
|
|
6
|
+
import { DealModel } from '../deal/deal.schema';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Kanban board presentation for the sales pipeline.
|
|
10
|
+
*/
|
|
11
|
+
export const PipelineKanbanPresentation: PresentationSpec = {
|
|
12
|
+
meta: {
|
|
13
|
+
key: 'crm.pipeline.kanban',
|
|
14
|
+
version: 1,
|
|
15
|
+
title: 'Pipeline Kanban',
|
|
16
|
+
description: 'Kanban board view of deals organized by stage',
|
|
17
|
+
domain: 'crm-pipeline',
|
|
18
|
+
owners: ['@crm-team'],
|
|
19
|
+
tags: ['pipeline', 'kanban', 'deals'],
|
|
20
|
+
stability: StabilityEnum.Experimental,
|
|
21
|
+
goal: 'Visualize the sales pipeline status and deal distribution across stages.',
|
|
22
|
+
context: 'Used in the sales dashboard and management reports.',
|
|
23
|
+
},
|
|
24
|
+
source: {
|
|
25
|
+
type: 'component',
|
|
26
|
+
framework: 'react',
|
|
27
|
+
componentKey: 'PipelineKanbanView',
|
|
28
|
+
props: DealModel,
|
|
29
|
+
},
|
|
30
|
+
targets: ['react', 'markdown'],
|
|
31
|
+
policy: {
|
|
32
|
+
flags: ['crm.pipeline.enabled'],
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* List view of deals with filtering.
|
|
38
|
+
*/
|
|
39
|
+
export const DealListPresentation: PresentationSpec = {
|
|
40
|
+
meta: {
|
|
41
|
+
key: 'crm.deal.list',
|
|
42
|
+
version: 1,
|
|
43
|
+
title: 'Deal List',
|
|
44
|
+
description: 'List view of deals with value, status, and owner info',
|
|
45
|
+
domain: 'crm-pipeline',
|
|
46
|
+
owners: ['@crm-team'],
|
|
47
|
+
tags: ['deal', 'list'],
|
|
48
|
+
stability: StabilityEnum.Experimental,
|
|
49
|
+
goal: 'Search, filter, and review deal lists.',
|
|
50
|
+
context: 'Standard view for deal management and bulk actions.',
|
|
51
|
+
},
|
|
52
|
+
source: {
|
|
53
|
+
type: 'component',
|
|
54
|
+
framework: 'react',
|
|
55
|
+
componentKey: 'DealListView',
|
|
56
|
+
props: DealModel,
|
|
57
|
+
},
|
|
58
|
+
targets: ['react', 'markdown', 'application/json'],
|
|
59
|
+
policy: {
|
|
60
|
+
flags: ['crm.deals.enabled'],
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Deal detail presentation.
|
|
66
|
+
*/
|
|
67
|
+
export const DealDetailPresentation: PresentationSpec = {
|
|
68
|
+
meta: {
|
|
69
|
+
key: 'crm.deal.detail',
|
|
70
|
+
version: 1,
|
|
71
|
+
title: 'Deal Details',
|
|
72
|
+
description:
|
|
73
|
+
'Detailed view of a deal with activities, contacts, and history',
|
|
74
|
+
domain: 'crm-pipeline',
|
|
75
|
+
owners: ['@crm-team'],
|
|
76
|
+
tags: ['deal', 'detail'],
|
|
77
|
+
stability: StabilityEnum.Experimental,
|
|
78
|
+
goal: 'Deep dive into deal details and historical activities.',
|
|
79
|
+
context: 'The main workspace for managing a single deal execution.',
|
|
80
|
+
},
|
|
81
|
+
source: {
|
|
82
|
+
type: 'component',
|
|
83
|
+
framework: 'react',
|
|
84
|
+
componentKey: 'DealDetailView',
|
|
85
|
+
},
|
|
86
|
+
targets: ['react', 'markdown'],
|
|
87
|
+
policy: {
|
|
88
|
+
flags: ['crm.deals.enabled'],
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Deal card for kanban board.
|
|
94
|
+
*/
|
|
95
|
+
export const DealCardPresentation: PresentationSpec = {
|
|
96
|
+
meta: {
|
|
97
|
+
key: 'crm.deal.card',
|
|
98
|
+
version: 1,
|
|
99
|
+
title: 'Deal Card',
|
|
100
|
+
description: 'Compact deal card for kanban board display',
|
|
101
|
+
domain: 'crm-pipeline',
|
|
102
|
+
owners: ['@crm-team'],
|
|
103
|
+
tags: ['deal', 'card', 'kanban'],
|
|
104
|
+
stability: StabilityEnum.Experimental,
|
|
105
|
+
goal: 'Provide a quick overview of deal status in the pipeline view.',
|
|
106
|
+
context: 'Condensed representation used within the Pipeline Kanban board.',
|
|
107
|
+
},
|
|
108
|
+
source: {
|
|
109
|
+
type: 'component',
|
|
110
|
+
framework: 'react',
|
|
111
|
+
componentKey: 'DealCard',
|
|
112
|
+
props: DealModel,
|
|
113
|
+
},
|
|
114
|
+
targets: ['react'],
|
|
115
|
+
policy: {
|
|
116
|
+
flags: ['crm.deals.enabled'],
|
|
117
|
+
},
|
|
118
|
+
};
|