@contractspec/example.crm-pipeline 3.7.6 → 3.7.10

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 (130) hide show
  1. package/.turbo/turbo-build.log +45 -42
  2. package/AGENTS.md +51 -33
  3. package/CHANGELOG.md +36 -0
  4. package/README.md +67 -148
  5. package/dist/browser/docs/crm-pipeline.docblock.js +1 -1
  6. package/dist/browser/docs/index.js +1 -1
  7. package/dist/browser/events/contact.event.js +1 -1
  8. package/dist/browser/events/deal.event.js +1 -1
  9. package/dist/browser/events/index.js +3 -3
  10. package/dist/browser/events/task.event.js +1 -1
  11. package/dist/browser/handlers/crm.handlers.js +13 -2
  12. package/dist/browser/handlers/index.js +13 -2
  13. package/dist/browser/index.js +680 -447
  14. package/dist/browser/ui/CrmDashboard.js +574 -352
  15. package/dist/browser/ui/CrmDealCard.js +5 -5
  16. package/dist/browser/ui/CrmPipelineBoard.js +13 -13
  17. package/dist/browser/ui/hooks/index.js +21 -10
  18. package/dist/browser/ui/hooks/useDealList.js +20 -9
  19. package/dist/browser/ui/hooks/useDealMutations.js +1 -1
  20. package/dist/browser/ui/index.js +683 -450
  21. package/dist/browser/ui/modals/CreateDealModal.js +12 -12
  22. package/dist/browser/ui/modals/DealActionsModal.js +21 -21
  23. package/dist/browser/ui/modals/index.js +33 -33
  24. package/dist/browser/ui/renderers/index.js +140 -118
  25. package/dist/browser/ui/renderers/pipeline.markdown.js +13 -2
  26. package/dist/browser/ui/renderers/pipeline.renderer.js +108 -97
  27. package/dist/browser/ui/tables/DealListTab.js +390 -0
  28. package/dist/deal/index.d.ts +2 -2
  29. package/dist/docs/crm-pipeline.docblock.js +1 -1
  30. package/dist/docs/index.js +1 -1
  31. package/dist/events/contact.event.js +1 -1
  32. package/dist/events/deal.event.js +1 -1
  33. package/dist/events/index.js +3 -3
  34. package/dist/events/task.event.js +1 -1
  35. package/dist/handlers/crm.handlers.d.ts +2 -0
  36. package/dist/handlers/crm.handlers.js +13 -2
  37. package/dist/handlers/index.d.ts +2 -2
  38. package/dist/handlers/index.js +13 -2
  39. package/dist/index.d.ts +3 -3
  40. package/dist/index.js +680 -447
  41. package/dist/node/docs/crm-pipeline.docblock.js +1 -1
  42. package/dist/node/docs/index.js +1 -1
  43. package/dist/node/events/contact.event.js +1 -1
  44. package/dist/node/events/deal.event.js +1 -1
  45. package/dist/node/events/index.js +3 -3
  46. package/dist/node/events/task.event.js +1 -1
  47. package/dist/node/handlers/crm.handlers.js +13 -2
  48. package/dist/node/handlers/index.js +13 -2
  49. package/dist/node/index.js +680 -447
  50. package/dist/node/ui/CrmDashboard.js +574 -352
  51. package/dist/node/ui/CrmDealCard.js +5 -5
  52. package/dist/node/ui/CrmPipelineBoard.js +13 -13
  53. package/dist/node/ui/hooks/index.js +21 -10
  54. package/dist/node/ui/hooks/useDealList.js +20 -9
  55. package/dist/node/ui/hooks/useDealMutations.js +1 -1
  56. package/dist/node/ui/index.js +683 -450
  57. package/dist/node/ui/modals/CreateDealModal.js +12 -12
  58. package/dist/node/ui/modals/DealActionsModal.js +21 -21
  59. package/dist/node/ui/modals/index.js +33 -33
  60. package/dist/node/ui/renderers/index.js +140 -118
  61. package/dist/node/ui/renderers/pipeline.markdown.js +13 -2
  62. package/dist/node/ui/renderers/pipeline.renderer.js +108 -97
  63. package/dist/node/ui/tables/DealListTab.js +390 -0
  64. package/dist/operations/index.d.ts +1 -1
  65. package/dist/ui/CrmDashboard.js +574 -352
  66. package/dist/ui/CrmDealCard.js +5 -5
  67. package/dist/ui/CrmPipelineBoard.js +13 -13
  68. package/dist/ui/hooks/index.d.ts +2 -2
  69. package/dist/ui/hooks/index.js +21 -10
  70. package/dist/ui/hooks/useDealList.d.ts +8 -2
  71. package/dist/ui/hooks/useDealList.js +20 -9
  72. package/dist/ui/hooks/useDealMutations.d.ts +9 -0
  73. package/dist/ui/hooks/useDealMutations.js +1 -1
  74. package/dist/ui/index.d.ts +3 -3
  75. package/dist/ui/index.js +683 -450
  76. package/dist/ui/modals/CreateDealModal.js +12 -12
  77. package/dist/ui/modals/DealActionsModal.js +21 -21
  78. package/dist/ui/modals/index.js +33 -33
  79. package/dist/ui/renderers/index.d.ts +1 -1
  80. package/dist/ui/renderers/index.js +140 -118
  81. package/dist/ui/renderers/pipeline.markdown.js +13 -2
  82. package/dist/ui/renderers/pipeline.renderer.d.ts +1 -1
  83. package/dist/ui/renderers/pipeline.renderer.js +108 -97
  84. package/dist/ui/tables/DealListTab.d.ts +20 -0
  85. package/dist/ui/tables/DealListTab.js +391 -0
  86. package/dist/ui/tables/DealListTab.smoke.test.d.ts +1 -0
  87. package/package.json +29 -14
  88. package/src/crm-pipeline.feature.ts +86 -86
  89. package/src/deal/deal.enum.ts +8 -8
  90. package/src/deal/deal.operation.ts +255 -255
  91. package/src/deal/deal.schema.ts +92 -92
  92. package/src/deal/deal.test-spec.ts +48 -48
  93. package/src/deal/index.ts +17 -19
  94. package/src/docs/crm-pipeline.docblock.ts +44 -44
  95. package/src/entities/company.entity.ts +52 -52
  96. package/src/entities/contact.entity.ts +67 -67
  97. package/src/entities/deal.entity.ts +134 -134
  98. package/src/entities/index.ts +27 -27
  99. package/src/entities/task.entity.ts +105 -105
  100. package/src/events/contact.event.ts +22 -22
  101. package/src/events/deal.event.ts +77 -77
  102. package/src/events/task.event.ts +19 -19
  103. package/src/example.ts +32 -32
  104. package/src/handlers/crm.handlers.ts +375 -357
  105. package/src/handlers/deal.handlers.ts +179 -179
  106. package/src/handlers/index.ts +18 -19
  107. package/src/handlers/mock-data.ts +167 -167
  108. package/src/index.ts +11 -11
  109. package/src/operations/index.ts +16 -16
  110. package/src/presentations/dashboard.presentation.ts +45 -45
  111. package/src/presentations/pipeline.presentation.ts +90 -90
  112. package/src/seeders/index.ts +26 -26
  113. package/src/shared/overlay-types.ts +23 -23
  114. package/src/ui/CrmDashboard.tsx +210 -279
  115. package/src/ui/CrmDealCard.tsx +64 -64
  116. package/src/ui/CrmPipelineBoard.tsx +105 -105
  117. package/src/ui/hooks/index.ts +3 -3
  118. package/src/ui/hooks/useDealList.ts +113 -85
  119. package/src/ui/hooks/useDealMutations.ts +151 -150
  120. package/src/ui/index.ts +5 -10
  121. package/src/ui/modals/CreateDealModal.tsx +217 -217
  122. package/src/ui/modals/DealActionsModal.tsx +390 -390
  123. package/src/ui/overlays/demo-overlays.ts +43 -43
  124. package/src/ui/renderers/index.ts +4 -3
  125. package/src/ui/renderers/pipeline.markdown.ts +165 -165
  126. package/src/ui/renderers/pipeline.renderer.tsx +17 -16
  127. package/src/ui/tables/DealListTab.smoke.test.tsx +149 -0
  128. package/src/ui/tables/DealListTab.tsx +276 -0
  129. package/tsconfig.json +7 -8
  130. package/tsdown.config.js +7 -3
@@ -5,194 +5,194 @@
5
5
  // ============ Types for Mock Data ============
6
6
 
7
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;
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
21
  }
22
22
 
23
23
  export interface MockStage {
24
- id: string;
25
- name: string;
26
- position: number;
27
- pipelineId: string;
24
+ id: string;
25
+ name: string;
26
+ position: number;
27
+ pipelineId: string;
28
28
  }
29
29
 
30
30
  // ============ Pipeline Stages Mock Data ============
31
31
 
32
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' },
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
38
  ];
39
39
 
40
40
  // ============ Deal Mock Data ============
41
41
 
42
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
- },
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
131
  ];
132
132
 
133
133
  // ============ Company Mock Data ============
134
134
 
135
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
- },
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
163
  ];
164
164
 
165
165
  // ============ Contact Mock Data ============
166
166
 
167
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
- },
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
198
  ];
package/src/index.ts CHANGED
@@ -1,14 +1,14 @@
1
1
  // CRM Pipeline Example
2
2
  // Demonstrates ContractSpec principles for a CRM application
3
3
 
4
+ export * from './crm-pipeline.feature';
4
5
  export * from './entities';
5
- export * from './operations';
6
6
  export * from './events';
7
+ export { default as example } from './example';
7
8
  export * from './handlers';
9
+ export * from './operations';
8
10
  export * from './presentations';
9
11
  export * from './ui';
10
- export * from './crm-pipeline.feature';
11
- export { default as example } from './example';
12
12
  import './docs';
13
13
 
14
14
  // Schema composition configuration
@@ -21,12 +21,12 @@ import { crmPipelineSchemaContribution } from './entities';
21
21
  * Complete schema composition for CRM Pipeline.
22
22
  */
23
23
  export const schemaComposition = {
24
- modules: [
25
- identityRbacSchemaContribution,
26
- auditTrailSchemaContribution,
27
- notificationsSchemaContribution,
28
- crmPipelineSchemaContribution,
29
- ],
30
- provider: 'postgresql' as const,
31
- outputPath: './prisma/schema/generated.prisma',
24
+ modules: [
25
+ identityRbacSchemaContribution,
26
+ auditTrailSchemaContribution,
27
+ notificationsSchemaContribution,
28
+ crmPipelineSchemaContribution,
29
+ ],
30
+ provider: 'postgresql' as const,
31
+ outputPath: './prisma/schema/generated.prisma',
32
32
  };
@@ -1,20 +1,20 @@
1
1
  // Deal contracts and models - re-exports from deal domain
2
2
  // Note: DealStatusEnum is exported from entities, not here (to avoid conflict)
3
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,
4
+ CreateDealContract,
5
+ CreateDealInputModel,
6
+ DealLostPayloadModel,
7
+ DealModel,
8
+ DealMovedPayloadModel,
9
+ DealStatusFilterEnum,
10
+ DealWonPayloadModel,
11
+ ListDealsContract,
12
+ ListDealsInputModel,
13
+ ListDealsOutputModel,
14
+ LoseDealContract,
15
+ LoseDealInputModel,
16
+ MoveDealContract,
17
+ MoveDealInputModel,
18
+ WinDealContract,
19
+ WinDealInputModel,
20
20
  } from '../deal';
@@ -2,61 +2,61 @@
2
2
  * CRM Dashboard Presentation Descriptor
3
3
  */
4
4
  import {
5
- definePresentation,
6
- StabilityEnum,
5
+ definePresentation,
6
+ StabilityEnum,
7
7
  } from '@contractspec/lib.contracts-spec';
8
8
 
9
9
  /**
10
10
  * Main CRM dashboard presentation.
11
11
  */
12
12
  export const CrmDashboardPresentation = definePresentation({
13
- meta: {
14
- key: 'crm.dashboard',
15
- version: '1.0.0',
16
- title: 'CRM Dashboard',
17
- description:
18
- 'Main CRM dashboard with pipeline overview, deal stats, and activities',
19
- domain: 'crm-pipeline',
20
- owners: ['@crm-team'],
21
- tags: ['dashboard', 'overview'],
22
- stability: StabilityEnum.Experimental,
23
- goal: 'Provide a high-level overview of CRM performance and active deals.',
24
- context: 'The landing page for CRM users.',
25
- },
26
- source: {
27
- type: 'component',
28
- framework: 'react',
29
- componentKey: 'CrmDashboard',
30
- },
31
- targets: ['react', 'markdown'],
32
- policy: {
33
- flags: ['crm.enabled'],
34
- },
13
+ meta: {
14
+ key: 'crm.dashboard',
15
+ version: '1.0.0',
16
+ title: 'CRM Dashboard',
17
+ description:
18
+ 'Main CRM dashboard with pipeline overview, deal stats, and activities',
19
+ domain: 'crm-pipeline',
20
+ owners: ['@crm-team'],
21
+ tags: ['dashboard', 'overview'],
22
+ stability: StabilityEnum.Experimental,
23
+ goal: 'Provide a high-level overview of CRM performance and active deals.',
24
+ context: 'The landing page for CRM users.',
25
+ },
26
+ source: {
27
+ type: 'component',
28
+ framework: 'react',
29
+ componentKey: 'CrmDashboard',
30
+ },
31
+ targets: ['react', 'markdown'],
32
+ policy: {
33
+ flags: ['crm.enabled'],
34
+ },
35
35
  });
36
36
 
37
37
  /**
38
38
  * Pipeline metrics presentation.
39
39
  */
40
40
  export const PipelineMetricsPresentation = definePresentation({
41
- meta: {
42
- key: 'crm.pipeline.metrics',
43
- version: '1.0.0',
44
- title: 'Pipeline Metrics',
45
- description: 'Pipeline metrics and forecasting view',
46
- domain: 'crm-pipeline',
47
- owners: ['@crm-team'],
48
- tags: ['pipeline', 'metrics', 'forecast'],
49
- stability: StabilityEnum.Experimental,
50
- goal: 'Track pipeline health and sales forecasts.',
51
- context: 'Data-intensive widget for sales managers.',
52
- },
53
- source: {
54
- type: 'component',
55
- framework: 'react',
56
- componentKey: 'PipelineMetricsView',
57
- },
58
- targets: ['react', 'markdown'],
59
- policy: {
60
- flags: ['crm.metrics.enabled'],
61
- },
41
+ meta: {
42
+ key: 'crm.pipeline.metrics',
43
+ version: '1.0.0',
44
+ title: 'Pipeline Metrics',
45
+ description: 'Pipeline metrics and forecasting view',
46
+ domain: 'crm-pipeline',
47
+ owners: ['@crm-team'],
48
+ tags: ['pipeline', 'metrics', 'forecast'],
49
+ stability: StabilityEnum.Experimental,
50
+ goal: 'Track pipeline health and sales forecasts.',
51
+ context: 'Data-intensive widget for sales managers.',
52
+ },
53
+ source: {
54
+ type: 'component',
55
+ framework: 'react',
56
+ componentKey: 'PipelineMetricsView',
57
+ },
58
+ targets: ['react', 'markdown'],
59
+ policy: {
60
+ flags: ['crm.metrics.enabled'],
61
+ },
62
62
  });