@contractspec/example.crm-pipeline 1.57.0 → 1.59.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.
Files changed (259) hide show
  1. package/.turbo/turbo-build.log +148 -164
  2. package/.turbo/turbo-prebuild.log +1 -0
  3. package/CHANGELOG.md +39 -0
  4. package/dist/browser/crm-pipeline.feature.js +75 -0
  5. package/dist/browser/deal/deal.enum.js +18 -0
  6. package/dist/browser/deal/deal.operation.js +396 -0
  7. package/dist/browser/deal/deal.schema.js +141 -0
  8. package/dist/browser/deal/deal.test-spec.js +58 -0
  9. package/dist/browser/deal/index.js +408 -0
  10. package/dist/browser/docs/crm-pipeline.docblock.js +113 -0
  11. package/dist/browser/docs/index.js +113 -0
  12. package/dist/browser/entities/company.entity.js +52 -0
  13. package/dist/browser/entities/contact.entity.js +66 -0
  14. package/dist/browser/entities/deal.entity.js +107 -0
  15. package/dist/browser/entities/index.js +343 -0
  16. package/dist/browser/entities/task.entity.js +99 -0
  17. package/dist/browser/events/contact.event.js +31 -0
  18. package/dist/browser/events/deal.event.js +101 -0
  19. package/dist/browser/events/index.js +158 -0
  20. package/dist/browser/events/task.event.js +28 -0
  21. package/dist/browser/example.js +39 -0
  22. package/dist/browser/handlers/crm.handlers.js +160 -0
  23. package/dist/browser/handlers/deal.handlers.js +293 -0
  24. package/dist/browser/handlers/index.js +456 -0
  25. package/dist/browser/handlers/mock-data.js +165 -0
  26. package/dist/browser/index.js +3279 -0
  27. package/dist/browser/operations/index.js +407 -0
  28. package/dist/browser/presentations/dashboard.presentation.js +52 -0
  29. package/dist/browser/presentations/index.js +284 -0
  30. package/dist/browser/presentations/pipeline.presentation.js +233 -0
  31. package/dist/browser/seeders/index.js +22 -0
  32. package/dist/browser/shared/overlay-types.js +0 -0
  33. package/dist/browser/ui/CrmDashboard.js +1325 -0
  34. package/dist/browser/ui/CrmDealCard.js +50 -0
  35. package/dist/browser/ui/CrmPipelineBoard.js +160 -0
  36. package/dist/browser/ui/hooks/index.js +186 -0
  37. package/dist/browser/ui/hooks/useDealList.js +84 -0
  38. package/dist/browser/ui/hooks/useDealMutations.js +100 -0
  39. package/dist/browser/ui/index.js +1972 -0
  40. package/dist/browser/ui/modals/CreateDealModal.js +211 -0
  41. package/dist/browser/ui/modals/DealActionsModal.js +428 -0
  42. package/dist/browser/ui/modals/index.js +638 -0
  43. package/dist/browser/ui/overlays/demo-overlays.js +55 -0
  44. package/dist/browser/ui/overlays/index.js +55 -0
  45. package/dist/browser/ui/renderers/index.js +827 -0
  46. package/dist/browser/ui/renderers/pipeline.markdown.js +564 -0
  47. package/dist/browser/ui/renderers/pipeline.renderer.js +264 -0
  48. package/dist/crm-pipeline.feature.d.ts +1 -6
  49. package/dist/crm-pipeline.feature.d.ts.map +1 -1
  50. package/dist/crm-pipeline.feature.js +74 -164
  51. package/dist/deal/deal.enum.d.ts +2 -7
  52. package/dist/deal/deal.enum.d.ts.map +1 -1
  53. package/dist/deal/deal.enum.js +16 -22
  54. package/dist/deal/deal.operation.d.ts +444 -450
  55. package/dist/deal/deal.operation.d.ts.map +1 -1
  56. package/dist/deal/deal.operation.js +390 -263
  57. package/dist/deal/deal.schema.d.ts +251 -256
  58. package/dist/deal/deal.schema.d.ts.map +1 -1
  59. package/dist/deal/deal.schema.js +131 -275
  60. package/dist/deal/deal.test-spec.d.ts +2 -7
  61. package/dist/deal/deal.test-spec.d.ts.map +1 -1
  62. package/dist/deal/deal.test-spec.js +56 -62
  63. package/dist/deal/index.d.ts +7 -4
  64. package/dist/deal/index.d.ts.map +1 -0
  65. package/dist/deal/index.js +408 -4
  66. package/dist/docs/crm-pipeline.docblock.d.ts +2 -1
  67. package/dist/docs/crm-pipeline.docblock.d.ts.map +1 -0
  68. package/dist/docs/crm-pipeline.docblock.js +45 -51
  69. package/dist/docs/index.d.ts +2 -1
  70. package/dist/docs/index.d.ts.map +1 -0
  71. package/dist/docs/index.js +114 -1
  72. package/dist/entities/company.entity.d.ts +27 -32
  73. package/dist/entities/company.entity.d.ts.map +1 -1
  74. package/dist/entities/company.entity.js +51 -61
  75. package/dist/entities/contact.entity.d.ts +31 -36
  76. package/dist/entities/contact.entity.d.ts.map +1 -1
  77. package/dist/entities/contact.entity.js +65 -76
  78. package/dist/entities/deal.entity.d.ts +52 -57
  79. package/dist/entities/deal.entity.d.ts.map +1 -1
  80. package/dist/entities/deal.entity.js +104 -116
  81. package/dist/entities/index.d.ts +6 -10
  82. package/dist/entities/index.d.ts.map +1 -1
  83. package/dist/entities/index.js +342 -31
  84. package/dist/entities/task.entity.d.ts +42 -47
  85. package/dist/entities/task.entity.d.ts.map +1 -1
  86. package/dist/entities/task.entity.js +95 -124
  87. package/dist/events/contact.event.d.ts +21 -27
  88. package/dist/events/contact.event.d.ts.map +1 -1
  89. package/dist/events/contact.event.js +29 -42
  90. package/dist/events/deal.event.d.ts +100 -106
  91. package/dist/events/deal.event.d.ts.map +1 -1
  92. package/dist/events/deal.event.js +93 -163
  93. package/dist/events/index.d.ts +4 -4
  94. package/dist/events/index.d.ts.map +1 -0
  95. package/dist/events/index.js +158 -4
  96. package/dist/events/task.event.d.ts +21 -27
  97. package/dist/events/task.event.d.ts.map +1 -1
  98. package/dist/events/task.event.js +26 -42
  99. package/dist/example.d.ts +2 -6
  100. package/dist/example.d.ts.map +1 -1
  101. package/dist/example.js +38 -50
  102. package/dist/handlers/crm.handlers.d.ts +80 -78
  103. package/dist/handlers/crm.handlers.d.ts.map +1 -1
  104. package/dist/handlers/crm.handlers.js +155 -166
  105. package/dist/handlers/deal.handlers.d.ts +58 -63
  106. package/dist/handlers/deal.handlers.d.ts.map +1 -1
  107. package/dist/handlers/deal.handlers.js +279 -105
  108. package/dist/handlers/index.d.ts +10 -4
  109. package/dist/handlers/index.d.ts.map +1 -0
  110. package/dist/handlers/index.js +456 -4
  111. package/dist/handlers/mock-data.d.ts +38 -41
  112. package/dist/handlers/mock-data.d.ts.map +1 -1
  113. package/dist/handlers/mock-data.js +162 -184
  114. package/dist/index.d.ts +13 -42
  115. package/dist/index.d.ts.map +1 -1
  116. package/dist/index.js +3277 -53
  117. package/dist/node/crm-pipeline.feature.js +75 -0
  118. package/dist/node/deal/deal.enum.js +18 -0
  119. package/dist/node/deal/deal.operation.js +396 -0
  120. package/dist/node/deal/deal.schema.js +141 -0
  121. package/dist/node/deal/deal.test-spec.js +58 -0
  122. package/dist/node/deal/index.js +408 -0
  123. package/dist/node/docs/crm-pipeline.docblock.js +113 -0
  124. package/dist/node/docs/index.js +113 -0
  125. package/dist/node/entities/company.entity.js +52 -0
  126. package/dist/node/entities/contact.entity.js +66 -0
  127. package/dist/node/entities/deal.entity.js +107 -0
  128. package/dist/node/entities/index.js +343 -0
  129. package/dist/node/entities/task.entity.js +99 -0
  130. package/dist/node/events/contact.event.js +31 -0
  131. package/dist/node/events/deal.event.js +101 -0
  132. package/dist/node/events/index.js +158 -0
  133. package/dist/node/events/task.event.js +28 -0
  134. package/dist/node/example.js +39 -0
  135. package/dist/node/handlers/crm.handlers.js +160 -0
  136. package/dist/node/handlers/deal.handlers.js +293 -0
  137. package/dist/node/handlers/index.js +456 -0
  138. package/dist/node/handlers/mock-data.js +165 -0
  139. package/dist/node/index.js +3279 -0
  140. package/dist/node/operations/index.js +407 -0
  141. package/dist/node/presentations/dashboard.presentation.js +52 -0
  142. package/dist/node/presentations/index.js +284 -0
  143. package/dist/node/presentations/pipeline.presentation.js +233 -0
  144. package/dist/node/seeders/index.js +22 -0
  145. package/dist/node/shared/overlay-types.js +0 -0
  146. package/dist/node/ui/CrmDashboard.js +1325 -0
  147. package/dist/node/ui/CrmDealCard.js +50 -0
  148. package/dist/node/ui/CrmPipelineBoard.js +160 -0
  149. package/dist/node/ui/hooks/index.js +186 -0
  150. package/dist/node/ui/hooks/useDealList.js +84 -0
  151. package/dist/node/ui/hooks/useDealMutations.js +100 -0
  152. package/dist/node/ui/index.js +1972 -0
  153. package/dist/node/ui/modals/CreateDealModal.js +211 -0
  154. package/dist/node/ui/modals/DealActionsModal.js +428 -0
  155. package/dist/node/ui/modals/index.js +638 -0
  156. package/dist/node/ui/overlays/demo-overlays.js +55 -0
  157. package/dist/node/ui/overlays/index.js +55 -0
  158. package/dist/node/ui/renderers/index.js +827 -0
  159. package/dist/node/ui/renderers/pipeline.markdown.js +564 -0
  160. package/dist/node/ui/renderers/pipeline.renderer.js +264 -0
  161. package/dist/operations/index.d.ts +2 -5
  162. package/dist/operations/index.d.ts.map +1 -0
  163. package/dist/operations/index.js +407 -5
  164. package/dist/presentations/dashboard.presentation.d.ts +2 -7
  165. package/dist/presentations/dashboard.presentation.d.ts.map +1 -1
  166. package/dist/presentations/dashboard.presentation.js +51 -60
  167. package/dist/presentations/index.d.ts +3 -3
  168. package/dist/presentations/index.d.ts.map +1 -0
  169. package/dist/presentations/index.js +284 -3
  170. package/dist/presentations/pipeline.presentation.d.ts +4 -9
  171. package/dist/presentations/pipeline.presentation.d.ts.map +1 -1
  172. package/dist/presentations/pipeline.presentation.js +228 -116
  173. package/dist/seeders/index.d.ts +4 -8
  174. package/dist/seeders/index.d.ts.map +1 -1
  175. package/dist/seeders/index.js +21 -45
  176. package/dist/shared/overlay-types.d.ts +25 -28
  177. package/dist/shared/overlay-types.d.ts.map +1 -1
  178. package/dist/shared/overlay-types.js +1 -0
  179. package/dist/ui/CrmDashboard.d.ts +1 -6
  180. package/dist/ui/CrmDashboard.d.ts.map +1 -1
  181. package/dist/ui/CrmDashboard.js +1318 -296
  182. package/dist/ui/CrmDealCard.d.ts +8 -12
  183. package/dist/ui/CrmDealCard.d.ts.map +1 -1
  184. package/dist/ui/CrmDealCard.js +47 -45
  185. package/dist/ui/CrmPipelineBoard.d.ts +11 -20
  186. package/dist/ui/CrmPipelineBoard.d.ts.map +1 -1
  187. package/dist/ui/CrmPipelineBoard.js +157 -94
  188. package/dist/ui/hooks/index.d.ts +3 -3
  189. package/dist/ui/hooks/index.d.ts.map +1 -0
  190. package/dist/ui/hooks/index.js +185 -4
  191. package/dist/ui/hooks/useDealList.d.ts +28 -32
  192. package/dist/ui/hooks/useDealList.d.ts.map +1 -1
  193. package/dist/ui/hooks/useDealList.js +81 -90
  194. package/dist/ui/hooks/useDealMutations.d.ts +18 -22
  195. package/dist/ui/hooks/useDealMutations.d.ts.map +1 -1
  196. package/dist/ui/hooks/useDealMutations.js +97 -155
  197. package/dist/ui/index.d.ts +8 -14
  198. package/dist/ui/index.d.ts.map +1 -0
  199. package/dist/ui/index.js +1973 -15
  200. package/dist/ui/modals/CreateDealModal.d.ts +19 -29
  201. package/dist/ui/modals/CreateDealModal.d.ts.map +1 -1
  202. package/dist/ui/modals/CreateDealModal.js +209 -180
  203. package/dist/ui/modals/DealActionsModal.d.ts +31 -44
  204. package/dist/ui/modals/DealActionsModal.d.ts.map +1 -1
  205. package/dist/ui/modals/DealActionsModal.js +424 -367
  206. package/dist/ui/modals/index.d.ts +3 -3
  207. package/dist/ui/modals/index.d.ts.map +1 -0
  208. package/dist/ui/modals/index.js +638 -3
  209. package/dist/ui/overlays/demo-overlays.d.ts +10 -8
  210. package/dist/ui/overlays/demo-overlays.d.ts.map +1 -1
  211. package/dist/ui/overlays/demo-overlays.js +54 -66
  212. package/dist/ui/overlays/index.d.ts +2 -2
  213. package/dist/ui/overlays/index.d.ts.map +1 -0
  214. package/dist/ui/overlays/index.js +56 -3
  215. package/dist/ui/renderers/index.d.ts +3 -3
  216. package/dist/ui/renderers/index.d.ts.map +1 -0
  217. package/dist/ui/renderers/index.js +827 -3
  218. package/dist/ui/renderers/pipeline.markdown.d.ts +12 -11
  219. package/dist/ui/renderers/pipeline.markdown.d.ts.map +1 -1
  220. package/dist/ui/renderers/pipeline.markdown.js +560 -114
  221. package/dist/ui/renderers/pipeline.renderer.d.ts +9 -7
  222. package/dist/ui/renderers/pipeline.renderer.d.ts.map +1 -1
  223. package/dist/ui/renderers/pipeline.renderer.js +261 -24
  224. package/package.json +476 -90
  225. package/tsdown.config.js +1 -2
  226. package/.turbo/turbo-build$colon$bundle.log +0 -164
  227. package/dist/crm-pipeline.feature.js.map +0 -1
  228. package/dist/deal/deal.enum.js.map +0 -1
  229. package/dist/deal/deal.operation.js.map +0 -1
  230. package/dist/deal/deal.schema.js.map +0 -1
  231. package/dist/deal/deal.test-spec.js.map +0 -1
  232. package/dist/docs/crm-pipeline.docblock.js.map +0 -1
  233. package/dist/entities/company.entity.js.map +0 -1
  234. package/dist/entities/contact.entity.js.map +0 -1
  235. package/dist/entities/deal.entity.js.map +0 -1
  236. package/dist/entities/index.js.map +0 -1
  237. package/dist/entities/task.entity.js.map +0 -1
  238. package/dist/events/contact.event.js.map +0 -1
  239. package/dist/events/deal.event.js.map +0 -1
  240. package/dist/events/task.event.js.map +0 -1
  241. package/dist/example.js.map +0 -1
  242. package/dist/handlers/crm.handlers.js.map +0 -1
  243. package/dist/handlers/deal.handlers.js.map +0 -1
  244. package/dist/handlers/mock-data.js.map +0 -1
  245. package/dist/index.js.map +0 -1
  246. package/dist/presentations/dashboard.presentation.js.map +0 -1
  247. package/dist/presentations/pipeline.presentation.js.map +0 -1
  248. package/dist/seeders/index.js.map +0 -1
  249. package/dist/ui/CrmDashboard.js.map +0 -1
  250. package/dist/ui/CrmDealCard.js.map +0 -1
  251. package/dist/ui/CrmPipelineBoard.js.map +0 -1
  252. package/dist/ui/hooks/useDealList.js.map +0 -1
  253. package/dist/ui/hooks/useDealMutations.js.map +0 -1
  254. package/dist/ui/modals/CreateDealModal.js.map +0 -1
  255. package/dist/ui/modals/DealActionsModal.js.map +0 -1
  256. package/dist/ui/overlays/demo-overlays.js.map +0 -1
  257. package/dist/ui/renderers/pipeline.markdown.js.map +0 -1
  258. package/dist/ui/renderers/pipeline.renderer.js.map +0 -1
  259. package/tsconfig.tsbuildinfo +0 -1
@@ -1,14 +1,9 @@
1
- import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
2
-
3
- //#region src/presentations/dashboard.presentation.d.ts
4
1
  /**
5
2
  * Main CRM dashboard presentation.
6
3
  */
7
- declare const CrmDashboardPresentation: _contractspec_lib_contracts0.PresentationSpec;
4
+ export declare const CrmDashboardPresentation: import("@contractspec/lib.contracts").PresentationSpec;
8
5
  /**
9
6
  * Pipeline metrics presentation.
10
7
  */
11
- declare const PipelineMetricsPresentation: _contractspec_lib_contracts0.PresentationSpec;
12
- //#endregion
13
- export { CrmDashboardPresentation, PipelineMetricsPresentation };
8
+ export declare const PipelineMetricsPresentation: import("@contractspec/lib.contracts").PresentationSpec;
14
9
  //# sourceMappingURL=dashboard.presentation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard.presentation.d.ts","names":[],"sources":["../../src/presentations/dashboard.presentation.ts"],"mappings":";;;;;;cAQa,wBAAA,EAuBX,4BAAA,CAvBmC,gBAAA;;;;cA4BxB,2BAAA,EAsBX,4BAAA,CAtBsC,gBAAA"}
1
+ {"version":3,"file":"dashboard.presentation.d.ts","sourceRoot":"","sources":["../../src/presentations/dashboard.presentation.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,wBAAwB,wDAuBnC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,2BAA2B,wDAsBtC,CAAC"}
@@ -1,62 +1,53 @@
1
- import { StabilityEnum, definePresentation } from "@contractspec/lib.contracts";
2
-
3
- //#region src/presentations/dashboard.presentation.ts
4
- /**
5
- * CRM Dashboard Presentation Descriptor
6
- */
7
- /**
8
- * Main CRM dashboard presentation.
9
- */
10
- const CrmDashboardPresentation = definePresentation({
11
- meta: {
12
- key: "crm.dashboard",
13
- version: "1.0.0",
14
- title: "CRM Dashboard",
15
- description: "Main CRM dashboard with pipeline overview, deal stats, and activities",
16
- domain: "crm-pipeline",
17
- owners: ["@crm-team"],
18
- tags: ["dashboard", "overview"],
19
- stability: StabilityEnum.Experimental,
20
- goal: "Provide a high-level overview of CRM performance and active deals.",
21
- context: "The landing page for CRM users."
22
- },
23
- source: {
24
- type: "component",
25
- framework: "react",
26
- componentKey: "CrmDashboard"
27
- },
28
- targets: ["react", "markdown"],
29
- policy: { flags: ["crm.enabled"] }
1
+ // @bun
2
+ // src/presentations/dashboard.presentation.ts
3
+ import { definePresentation, StabilityEnum } from "@contractspec/lib.contracts";
4
+ var CrmDashboardPresentation = definePresentation({
5
+ meta: {
6
+ key: "crm.dashboard",
7
+ version: "1.0.0",
8
+ title: "CRM Dashboard",
9
+ description: "Main CRM dashboard with pipeline overview, deal stats, and activities",
10
+ domain: "crm-pipeline",
11
+ owners: ["@crm-team"],
12
+ tags: ["dashboard", "overview"],
13
+ stability: StabilityEnum.Experimental,
14
+ goal: "Provide a high-level overview of CRM performance and active deals.",
15
+ context: "The landing page for CRM users."
16
+ },
17
+ source: {
18
+ type: "component",
19
+ framework: "react",
20
+ componentKey: "CrmDashboard"
21
+ },
22
+ targets: ["react", "markdown"],
23
+ policy: {
24
+ flags: ["crm.enabled"]
25
+ }
30
26
  });
31
- /**
32
- * Pipeline metrics presentation.
33
- */
34
- const PipelineMetricsPresentation = definePresentation({
35
- meta: {
36
- key: "crm.pipeline.metrics",
37
- version: "1.0.0",
38
- title: "Pipeline Metrics",
39
- description: "Pipeline metrics and forecasting view",
40
- domain: "crm-pipeline",
41
- owners: ["@crm-team"],
42
- tags: [
43
- "pipeline",
44
- "metrics",
45
- "forecast"
46
- ],
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: { flags: ["crm.metrics.enabled"] }
27
+ var PipelineMetricsPresentation = definePresentation({
28
+ meta: {
29
+ key: "crm.pipeline.metrics",
30
+ version: "1.0.0",
31
+ title: "Pipeline Metrics",
32
+ description: "Pipeline metrics and forecasting view",
33
+ domain: "crm-pipeline",
34
+ owners: ["@crm-team"],
35
+ tags: ["pipeline", "metrics", "forecast"],
36
+ stability: StabilityEnum.Experimental,
37
+ goal: "Track pipeline health and sales forecasts.",
38
+ context: "Data-intensive widget for sales managers."
39
+ },
40
+ source: {
41
+ type: "component",
42
+ framework: "react",
43
+ componentKey: "PipelineMetricsView"
44
+ },
45
+ targets: ["react", "markdown"],
46
+ policy: {
47
+ flags: ["crm.metrics.enabled"]
48
+ }
58
49
  });
59
-
60
- //#endregion
61
- export { CrmDashboardPresentation, PipelineMetricsPresentation };
62
- //# sourceMappingURL=dashboard.presentation.js.map
50
+ export {
51
+ PipelineMetricsPresentation,
52
+ CrmDashboardPresentation
53
+ };
@@ -1,3 +1,3 @@
1
- import { CrmDashboardPresentation, PipelineMetricsPresentation } from "./dashboard.presentation.js";
2
- import { DealCardPresentation, DealDetailPresentation, DealListPresentation, PipelineKanbanPresentation } from "./pipeline.presentation.js";
3
- export { CrmDashboardPresentation, DealCardPresentation, DealDetailPresentation, DealListPresentation, PipelineKanbanPresentation, PipelineMetricsPresentation };
1
+ export * from './dashboard.presentation';
2
+ export * from './pipeline.presentation';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/presentations/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC"}
@@ -1,4 +1,285 @@
1
- import { CrmDashboardPresentation, PipelineMetricsPresentation } from "./dashboard.presentation.js";
2
- import { DealCardPresentation, DealDetailPresentation, DealListPresentation, PipelineKanbanPresentation } from "./pipeline.presentation.js";
1
+ // @bun
2
+ // src/deal/deal.enum.ts
3
+ import { defineEnum } from "@contractspec/lib.schema";
4
+ var DealStatusEnum = defineEnum("DealStatus", [
5
+ "OPEN",
6
+ "WON",
7
+ "LOST",
8
+ "STALE"
9
+ ]);
10
+ var DealStatusFilterEnum = defineEnum("DealStatusFilter", [
11
+ "OPEN",
12
+ "WON",
13
+ "LOST",
14
+ "all"
15
+ ]);
3
16
 
4
- export { CrmDashboardPresentation, DealCardPresentation, DealDetailPresentation, DealListPresentation, PipelineKanbanPresentation, PipelineMetricsPresentation };
17
+ // src/deal/deal.schema.ts
18
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
19
+ var DealModel = defineSchemaModel({
20
+ name: "Deal",
21
+ description: "A deal in the CRM pipeline",
22
+ fields: {
23
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
24
+ name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
25
+ value: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
26
+ currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
27
+ pipelineId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
28
+ stageId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
29
+ status: { type: DealStatusEnum, isOptional: false },
30
+ contactId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
31
+ companyId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
32
+ ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
33
+ expectedCloseDate: { type: ScalarTypeEnum.DateTime(), isOptional: true },
34
+ createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
35
+ updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
36
+ }
37
+ });
38
+ var CreateDealInputModel = defineSchemaModel({
39
+ name: "CreateDealInput",
40
+ description: "Input for creating a deal",
41
+ fields: {
42
+ name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
43
+ value: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
44
+ currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
45
+ pipelineId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
46
+ stageId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
47
+ contactId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
48
+ companyId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
49
+ expectedCloseDate: { type: ScalarTypeEnum.DateTime(), isOptional: true }
50
+ }
51
+ });
52
+ var MoveDealInputModel = defineSchemaModel({
53
+ name: "MoveDealInput",
54
+ description: "Input for moving a deal to another stage",
55
+ fields: {
56
+ dealId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
57
+ stageId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
58
+ position: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true }
59
+ }
60
+ });
61
+ var DealMovedPayloadModel = defineSchemaModel({
62
+ name: "DealMovedPayload",
63
+ fields: {
64
+ dealId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
65
+ fromStage: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
66
+ toStage: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
67
+ }
68
+ });
69
+ var WinDealInputModel = defineSchemaModel({
70
+ name: "WinDealInput",
71
+ description: "Input for marking a deal as won",
72
+ fields: {
73
+ dealId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
74
+ wonSource: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
75
+ notes: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
76
+ }
77
+ });
78
+ var DealWonPayloadModel = defineSchemaModel({
79
+ name: "DealWonPayload",
80
+ fields: {
81
+ dealId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
82
+ value: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false }
83
+ }
84
+ });
85
+ var LoseDealInputModel = defineSchemaModel({
86
+ name: "LoseDealInput",
87
+ description: "Input for marking a deal as lost",
88
+ fields: {
89
+ dealId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
90
+ lostReason: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
91
+ notes: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
92
+ }
93
+ });
94
+ var DealLostPayloadModel = defineSchemaModel({
95
+ name: "DealLostPayload",
96
+ fields: {
97
+ dealId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
98
+ reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
99
+ }
100
+ });
101
+ var ListDealsInputModel = defineSchemaModel({
102
+ name: "ListDealsInput",
103
+ description: "Input for listing deals",
104
+ fields: {
105
+ pipelineId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
106
+ stageId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
107
+ status: { type: DealStatusFilterEnum, isOptional: true },
108
+ ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
109
+ search: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
110
+ limit: {
111
+ type: ScalarTypeEnum.Int_unsecure(),
112
+ isOptional: true,
113
+ defaultValue: 20
114
+ },
115
+ offset: {
116
+ type: ScalarTypeEnum.Int_unsecure(),
117
+ isOptional: true,
118
+ defaultValue: 0
119
+ }
120
+ }
121
+ });
122
+ var ListDealsOutputModel = defineSchemaModel({
123
+ name: "ListDealsOutput",
124
+ description: "Output for listing deals",
125
+ fields: {
126
+ deals: { type: DealModel, isArray: true, isOptional: false },
127
+ total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
128
+ totalValue: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false }
129
+ }
130
+ });
131
+
132
+ // src/presentations/dashboard.presentation.ts
133
+ import { definePresentation, StabilityEnum } from "@contractspec/lib.contracts";
134
+ var CrmDashboardPresentation = definePresentation({
135
+ meta: {
136
+ key: "crm.dashboard",
137
+ version: "1.0.0",
138
+ title: "CRM Dashboard",
139
+ description: "Main CRM dashboard with pipeline overview, deal stats, and activities",
140
+ domain: "crm-pipeline",
141
+ owners: ["@crm-team"],
142
+ tags: ["dashboard", "overview"],
143
+ stability: StabilityEnum.Experimental,
144
+ goal: "Provide a high-level overview of CRM performance and active deals.",
145
+ context: "The landing page for CRM users."
146
+ },
147
+ source: {
148
+ type: "component",
149
+ framework: "react",
150
+ componentKey: "CrmDashboard"
151
+ },
152
+ targets: ["react", "markdown"],
153
+ policy: {
154
+ flags: ["crm.enabled"]
155
+ }
156
+ });
157
+ var PipelineMetricsPresentation = definePresentation({
158
+ meta: {
159
+ key: "crm.pipeline.metrics",
160
+ version: "1.0.0",
161
+ title: "Pipeline Metrics",
162
+ description: "Pipeline metrics and forecasting view",
163
+ domain: "crm-pipeline",
164
+ owners: ["@crm-team"],
165
+ tags: ["pipeline", "metrics", "forecast"],
166
+ stability: StabilityEnum.Experimental,
167
+ goal: "Track pipeline health and sales forecasts.",
168
+ context: "Data-intensive widget for sales managers."
169
+ },
170
+ source: {
171
+ type: "component",
172
+ framework: "react",
173
+ componentKey: "PipelineMetricsView"
174
+ },
175
+ targets: ["react", "markdown"],
176
+ policy: {
177
+ flags: ["crm.metrics.enabled"]
178
+ }
179
+ });
180
+
181
+ // src/presentations/pipeline.presentation.ts
182
+ import { definePresentation as definePresentation2, StabilityEnum as StabilityEnum2 } from "@contractspec/lib.contracts";
183
+ var PipelineKanbanPresentation = definePresentation2({
184
+ meta: {
185
+ key: "crm.pipeline.kanban",
186
+ version: "1.0.0",
187
+ title: "Pipeline Kanban",
188
+ description: "Kanban board view of deals organized by stage",
189
+ domain: "crm-pipeline",
190
+ owners: ["@crm-team"],
191
+ tags: ["pipeline", "kanban", "deals"],
192
+ stability: StabilityEnum2.Experimental,
193
+ goal: "Visualize the sales pipeline status and deal distribution across stages.",
194
+ context: "Used in the sales dashboard and management reports."
195
+ },
196
+ source: {
197
+ type: "component",
198
+ framework: "react",
199
+ componentKey: "PipelineKanbanView",
200
+ props: DealModel
201
+ },
202
+ targets: ["react", "markdown"],
203
+ policy: {
204
+ flags: ["crm.pipeline.enabled"]
205
+ }
206
+ });
207
+ var DealListPresentation = definePresentation2({
208
+ meta: {
209
+ key: "crm.deal.viewList",
210
+ version: "1.0.0",
211
+ title: "Deal List",
212
+ description: "List view of deals with value, status, and owner info",
213
+ domain: "crm-pipeline",
214
+ owners: ["@crm-team"],
215
+ tags: ["deal", "list"],
216
+ stability: StabilityEnum2.Experimental,
217
+ goal: "Search, filter, and review deal lists.",
218
+ context: "Standard view for deal management and bulk actions."
219
+ },
220
+ source: {
221
+ type: "component",
222
+ framework: "react",
223
+ componentKey: "DealListView",
224
+ props: DealModel
225
+ },
226
+ targets: ["react", "markdown", "application/json"],
227
+ policy: {
228
+ flags: ["crm.deals.enabled"]
229
+ }
230
+ });
231
+ var DealDetailPresentation = definePresentation2({
232
+ meta: {
233
+ key: "crm.deal.detail",
234
+ version: "1.0.0",
235
+ title: "Deal Details",
236
+ description: "Detailed view of a deal with activities, contacts, and history",
237
+ domain: "crm-pipeline",
238
+ owners: ["@crm-team"],
239
+ tags: ["deal", "detail"],
240
+ stability: StabilityEnum2.Experimental,
241
+ goal: "Deep dive into deal details and historical activities.",
242
+ context: "The main workspace for managing a single deal execution."
243
+ },
244
+ source: {
245
+ type: "component",
246
+ framework: "react",
247
+ componentKey: "DealDetailView"
248
+ },
249
+ targets: ["react", "markdown"],
250
+ policy: {
251
+ flags: ["crm.deals.enabled"]
252
+ }
253
+ });
254
+ var DealCardPresentation = definePresentation2({
255
+ meta: {
256
+ key: "crm.deal.card",
257
+ version: "1.0.0",
258
+ title: "Deal Card",
259
+ description: "Compact deal card for kanban board display",
260
+ domain: "crm-pipeline",
261
+ owners: ["@crm-team"],
262
+ tags: ["deal", "card", "kanban"],
263
+ stability: StabilityEnum2.Experimental,
264
+ goal: "Provide a quick overview of deal status in the pipeline view.",
265
+ context: "Condensed representation used within the Pipeline Kanban board."
266
+ },
267
+ source: {
268
+ type: "component",
269
+ framework: "react",
270
+ componentKey: "DealCard",
271
+ props: DealModel
272
+ },
273
+ targets: ["react"],
274
+ policy: {
275
+ flags: ["crm.deals.enabled"]
276
+ }
277
+ });
278
+ export {
279
+ PipelineMetricsPresentation,
280
+ PipelineKanbanPresentation,
281
+ DealListPresentation,
282
+ DealDetailPresentation,
283
+ DealCardPresentation,
284
+ CrmDashboardPresentation
285
+ };
@@ -1,22 +1,17 @@
1
- import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
2
-
3
- //#region src/presentations/pipeline.presentation.d.ts
4
1
  /**
5
2
  * Kanban board presentation for the sales pipeline.
6
3
  */
7
- declare const PipelineKanbanPresentation: _contractspec_lib_contracts0.PresentationSpec;
4
+ export declare const PipelineKanbanPresentation: import("@contractspec/lib.contracts").PresentationSpec;
8
5
  /**
9
6
  * List view of deals with filtering.
10
7
  */
11
- declare const DealListPresentation: _contractspec_lib_contracts0.PresentationSpec;
8
+ export declare const DealListPresentation: import("@contractspec/lib.contracts").PresentationSpec;
12
9
  /**
13
10
  * Deal detail presentation.
14
11
  */
15
- declare const DealDetailPresentation: _contractspec_lib_contracts0.PresentationSpec;
12
+ export declare const DealDetailPresentation: import("@contractspec/lib.contracts").PresentationSpec;
16
13
  /**
17
14
  * Deal card for kanban board.
18
15
  */
19
- declare const DealCardPresentation: _contractspec_lib_contracts0.PresentationSpec;
20
- //#endregion
21
- export { DealCardPresentation, DealDetailPresentation, DealListPresentation, PipelineKanbanPresentation };
16
+ export declare const DealCardPresentation: import("@contractspec/lib.contracts").PresentationSpec;
22
17
  //# sourceMappingURL=pipeline.presentation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline.presentation.d.ts","names":[],"sources":["../../src/presentations/pipeline.presentation.ts"],"mappings":";;;;;;cASa,0BAAA,EAuBX,4BAAA,CAvBqC,gBAAA;;;;cA4B1B,oBAAA,EAuBX,4BAAA,CAvB+B,gBAAA;AAAjC;;;AAAA,cA4Ba,sBAAA,EAuBX,4BAAA,CAvBiC,gBAAA;;AAAnC;;cA4Ba,oBAAA,EAuBX,4BAAA,CAvB+B,gBAAA"}
1
+ {"version":3,"file":"pipeline.presentation.d.ts","sourceRoot":"","sources":["../../src/presentations/pipeline.presentation.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,eAAO,MAAM,0BAA0B,wDAuBrC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB,wDAuB/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB,wDAuBjC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB,wDAuB/B,CAAC"}