@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.
Files changed (122) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +97 -0
  2. package/.turbo/turbo-build.log +98 -0
  3. package/CHANGELOG.md +246 -0
  4. package/LICENSE +21 -0
  5. package/README.md +139 -0
  6. package/dist/crm-pipeline.feature.d.ts +12 -0
  7. package/dist/crm-pipeline.feature.d.ts.map +1 -0
  8. package/dist/crm-pipeline.feature.js +159 -0
  9. package/dist/crm-pipeline.feature.js.map +1 -0
  10. package/dist/deal/deal.enum.d.ts +14 -0
  11. package/dist/deal/deal.enum.d.ts.map +1 -0
  12. package/dist/deal/deal.enum.js +25 -0
  13. package/dist/deal/deal.enum.js.map +1 -0
  14. package/dist/deal/deal.operation.d.ts +513 -0
  15. package/dist/deal/deal.operation.d.ts.map +1 -0
  16. package/dist/deal/deal.operation.js +270 -0
  17. package/dist/deal/deal.operation.js.map +1 -0
  18. package/dist/deal/deal.schema.d.ts +300 -0
  19. package/dist/deal/deal.schema.d.ts.map +1 -0
  20. package/dist/deal/deal.schema.js +286 -0
  21. package/dist/deal/deal.schema.js.map +1 -0
  22. package/dist/deal/index.d.ts +4 -0
  23. package/dist/deal/index.js +5 -0
  24. package/dist/docs/crm-pipeline.docblock.d.ts +1 -0
  25. package/dist/docs/crm-pipeline.docblock.js +100 -0
  26. package/dist/docs/crm-pipeline.docblock.js.map +1 -0
  27. package/dist/docs/index.d.ts +1 -0
  28. package/dist/docs/index.js +1 -0
  29. package/dist/entities/company.entity.d.ts +40 -0
  30. package/dist/entities/company.entity.d.ts.map +1 -0
  31. package/dist/entities/company.entity.js +63 -0
  32. package/dist/entities/company.entity.js.map +1 -0
  33. package/dist/entities/contact.entity.d.ts +44 -0
  34. package/dist/entities/contact.entity.d.ts.map +1 -0
  35. package/dist/entities/contact.entity.js +78 -0
  36. package/dist/entities/contact.entity.js.map +1 -0
  37. package/dist/entities/deal.entity.d.ts +73 -0
  38. package/dist/entities/deal.entity.d.ts.map +1 -0
  39. package/dist/entities/deal.entity.js +120 -0
  40. package/dist/entities/deal.entity.js.map +1 -0
  41. package/dist/entities/index.d.ts +15 -0
  42. package/dist/entities/index.d.ts.map +1 -0
  43. package/dist/entities/index.js +33 -0
  44. package/dist/entities/index.js.map +1 -0
  45. package/dist/entities/task.entity.d.ts +65 -0
  46. package/dist/entities/task.entity.d.ts.map +1 -0
  47. package/dist/entities/task.entity.js +129 -0
  48. package/dist/entities/task.entity.js.map +1 -0
  49. package/dist/events/contact.event.d.ts +29 -0
  50. package/dist/events/contact.event.d.ts.map +1 -0
  51. package/dist/events/contact.event.js +45 -0
  52. package/dist/events/contact.event.js.map +1 -0
  53. package/dist/events/deal.event.d.ts +111 -0
  54. package/dist/events/deal.event.d.ts.map +1 -0
  55. package/dist/events/deal.event.js +172 -0
  56. package/dist/events/deal.event.js.map +1 -0
  57. package/dist/events/index.d.ts +4 -0
  58. package/dist/events/index.js +5 -0
  59. package/dist/events/task.event.d.ts +29 -0
  60. package/dist/events/task.event.d.ts.map +1 -0
  61. package/dist/events/task.event.js +45 -0
  62. package/dist/events/task.event.js.map +1 -0
  63. package/dist/example.d.ts +37 -0
  64. package/dist/example.d.ts.map +1 -0
  65. package/dist/example.js +46 -0
  66. package/dist/example.js.map +1 -0
  67. package/dist/handlers/deal.handlers.d.ts +94 -0
  68. package/dist/handlers/deal.handlers.d.ts.map +1 -0
  69. package/dist/handlers/deal.handlers.js +120 -0
  70. package/dist/handlers/deal.handlers.js.map +1 -0
  71. package/dist/handlers/index.d.ts +3 -0
  72. package/dist/handlers/index.js +4 -0
  73. package/dist/handlers/mock-data.d.ts +49 -0
  74. package/dist/handlers/mock-data.d.ts.map +1 -0
  75. package/dist/handlers/mock-data.js +188 -0
  76. package/dist/handlers/mock-data.js.map +1 -0
  77. package/dist/index.d.ts +34 -0
  78. package/dist/index.d.ts.map +1 -0
  79. package/dist/index.js +43 -0
  80. package/dist/index.js.map +1 -0
  81. package/dist/operations/index.d.ts +5 -0
  82. package/dist/operations/index.js +6 -0
  83. package/dist/presentations/dashboard.presentation.d.ts +15 -0
  84. package/dist/presentations/dashboard.presentation.d.ts.map +1 -0
  85. package/dist/presentations/dashboard.presentation.js +59 -0
  86. package/dist/presentations/dashboard.presentation.js.map +1 -0
  87. package/dist/presentations/index.d.ts +3 -0
  88. package/dist/presentations/index.js +4 -0
  89. package/dist/presentations/pipeline.presentation.d.ts +23 -0
  90. package/dist/presentations/pipeline.presentation.d.ts.map +1 -0
  91. package/dist/presentations/pipeline.presentation.js +119 -0
  92. package/dist/presentations/pipeline.presentation.js.map +1 -0
  93. package/example.ts +1 -0
  94. package/package.json +105 -0
  95. package/src/crm-pipeline.feature.ts +96 -0
  96. package/src/deal/deal.enum.ts +21 -0
  97. package/src/deal/deal.operation.ts +291 -0
  98. package/src/deal/deal.schema.ts +154 -0
  99. package/src/deal/index.ts +26 -0
  100. package/src/docs/crm-pipeline.docblock.ts +98 -0
  101. package/src/docs/index.ts +1 -0
  102. package/src/entities/company.entity.ts +77 -0
  103. package/src/entities/contact.entity.ts +93 -0
  104. package/src/entities/deal.entity.ts +160 -0
  105. package/src/entities/index.ts +45 -0
  106. package/src/entities/task.entity.ts +137 -0
  107. package/src/events/contact.event.ts +31 -0
  108. package/src/events/deal.event.ts +104 -0
  109. package/src/events/index.ts +3 -0
  110. package/src/events/task.event.ts +28 -0
  111. package/src/example.ts +30 -0
  112. package/src/handlers/deal.handlers.ts +253 -0
  113. package/src/handlers/index.ts +27 -0
  114. package/src/handlers/mock-data.ts +198 -0
  115. package/src/index.ts +31 -0
  116. package/src/operations/index.ts +20 -0
  117. package/src/presentations/dashboard.presentation.ts +60 -0
  118. package/src/presentations/index.ts +2 -0
  119. package/src/presentations/pipeline.presentation.ts +118 -0
  120. package/tsconfig.json +10 -0
  121. package/tsconfig.tsbuildinfo +1 -0
  122. package/tsdown.config.js +7 -0
@@ -0,0 +1,159 @@
1
+ //#region src/crm-pipeline.feature.ts
2
+ /**
3
+ * CRM Pipeline feature module that bundles deal management,
4
+ * pipeline operations, and contact management into an installable feature.
5
+ */
6
+ const CrmPipelineFeature = {
7
+ meta: {
8
+ key: "crm-pipeline",
9
+ title: "CRM Pipeline",
10
+ description: "CRM and sales pipeline management with deals, contacts, and companies",
11
+ domain: "crm",
12
+ owners: ["@crm-team"],
13
+ tags: [
14
+ "crm",
15
+ "sales",
16
+ "pipeline",
17
+ "deals"
18
+ ],
19
+ stability: "experimental",
20
+ version: 1
21
+ },
22
+ operations: [
23
+ {
24
+ key: "crm.deal.create",
25
+ version: 1
26
+ },
27
+ {
28
+ key: "crm.deal.move",
29
+ version: 1
30
+ },
31
+ {
32
+ key: "crm.deal.win",
33
+ version: 1
34
+ },
35
+ {
36
+ key: "crm.deal.lose",
37
+ version: 1
38
+ },
39
+ {
40
+ key: "crm.deal.list",
41
+ version: 1
42
+ }
43
+ ],
44
+ events: [
45
+ {
46
+ key: "deal.created",
47
+ version: 1
48
+ },
49
+ {
50
+ key: "deal.moved",
51
+ version: 1
52
+ },
53
+ {
54
+ key: "deal.won",
55
+ version: 1
56
+ },
57
+ {
58
+ key: "deal.lost",
59
+ version: 1
60
+ },
61
+ {
62
+ key: "contact.created",
63
+ version: 1
64
+ },
65
+ {
66
+ key: "task.completed",
67
+ version: 1
68
+ }
69
+ ],
70
+ presentations: [
71
+ {
72
+ key: "crm.dashboard",
73
+ version: 1
74
+ },
75
+ {
76
+ key: "crm.pipeline.kanban",
77
+ version: 1
78
+ },
79
+ {
80
+ key: "crm.deal.list",
81
+ version: 1
82
+ },
83
+ {
84
+ key: "crm.deal.detail",
85
+ version: 1
86
+ },
87
+ {
88
+ key: "crm.deal.card",
89
+ version: 1
90
+ },
91
+ {
92
+ key: "crm.pipeline.metrics",
93
+ version: 1
94
+ }
95
+ ],
96
+ opToPresentation: [{
97
+ op: {
98
+ key: "crm.deal.list",
99
+ version: 1
100
+ },
101
+ pres: {
102
+ key: "crm.pipeline.kanban",
103
+ version: 1
104
+ }
105
+ }, {
106
+ op: {
107
+ key: "crm.deal.move",
108
+ version: 1
109
+ },
110
+ pres: {
111
+ key: "crm.pipeline.kanban",
112
+ version: 1
113
+ }
114
+ }],
115
+ presentationsTargets: [
116
+ {
117
+ key: "crm.dashboard",
118
+ version: 1,
119
+ targets: ["react", "markdown"]
120
+ },
121
+ {
122
+ key: "crm.pipeline.kanban",
123
+ version: 1,
124
+ targets: ["react", "markdown"]
125
+ },
126
+ {
127
+ key: "crm.deal.list",
128
+ version: 1,
129
+ targets: [
130
+ "react",
131
+ "markdown",
132
+ "application/json"
133
+ ]
134
+ },
135
+ {
136
+ key: "crm.pipeline.metrics",
137
+ version: 1,
138
+ targets: ["react", "markdown"]
139
+ }
140
+ ],
141
+ capabilities: { requires: [
142
+ {
143
+ key: "identity",
144
+ version: 1
145
+ },
146
+ {
147
+ key: "audit-trail",
148
+ version: 1
149
+ },
150
+ {
151
+ key: "notifications",
152
+ version: 1
153
+ }
154
+ ] }
155
+ };
156
+
157
+ //#endregion
158
+ export { CrmPipelineFeature };
159
+ //# sourceMappingURL=crm-pipeline.feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crm-pipeline.feature.js","names":["CrmPipelineFeature: FeatureModuleSpec"],"sources":["../src/crm-pipeline.feature.ts"],"sourcesContent":["/**\n * CRM Pipeline Feature Module Specification\n *\n * Defines the feature module for CRM and sales pipeline capabilities.\n */\nimport type { FeatureModuleSpec } from '@contractspec/lib.contracts';\n\n/**\n * CRM Pipeline feature module that bundles deal management,\n * pipeline operations, and contact management into an installable feature.\n */\nexport const CrmPipelineFeature: FeatureModuleSpec = {\n meta: {\n key: 'crm-pipeline',\n title: 'CRM Pipeline',\n description:\n 'CRM and sales pipeline management with deals, contacts, and companies',\n domain: 'crm',\n owners: ['@crm-team'],\n tags: ['crm', 'sales', 'pipeline', 'deals'],\n stability: 'experimental',\n version: 1,\n },\n\n // All contract operations included in this feature\n operations: [\n // Deal operations\n { key: 'crm.deal.create', version: 1 },\n { key: 'crm.deal.move', version: 1 },\n { key: 'crm.deal.win', version: 1 },\n { key: 'crm.deal.lose', version: 1 },\n { key: 'crm.deal.list', version: 1 },\n ],\n\n // Events emitted by this feature\n events: [\n // Deal events\n { key: 'deal.created', version: 1 },\n { key: 'deal.moved', version: 1 },\n { key: 'deal.won', version: 1 },\n { key: 'deal.lost', version: 1 },\n\n // Contact events\n { key: 'contact.created', version: 1 },\n\n // Task events\n { key: 'task.completed', version: 1 },\n ],\n\n // Presentations associated with this feature\n presentations: [\n { key: 'crm.dashboard', version: 1 },\n { key: 'crm.pipeline.kanban', version: 1 },\n { key: 'crm.deal.list', version: 1 },\n { key: 'crm.deal.detail', version: 1 },\n { key: 'crm.deal.card', version: 1 },\n { key: 'crm.pipeline.metrics', version: 1 },\n ],\n\n // Link operations to their primary presentations\n opToPresentation: [\n {\n op: { key: 'crm.deal.list', version: 1 },\n pres: { key: 'crm.pipeline.kanban', version: 1 },\n },\n {\n op: { key: 'crm.deal.move', version: 1 },\n pres: { key: 'crm.pipeline.kanban', version: 1 },\n },\n ],\n\n // Target requirements for multi-surface rendering\n presentationsTargets: [\n { key: 'crm.dashboard', version: 1, targets: ['react', 'markdown'] },\n { key: 'crm.pipeline.kanban', version: 1, targets: ['react', 'markdown'] },\n {\n key: 'crm.deal.list',\n version: 1,\n targets: ['react', 'markdown', 'application/json'],\n },\n {\n key: 'crm.pipeline.metrics',\n version: 1,\n targets: ['react', 'markdown'],\n },\n ],\n\n // Capability requirements\n capabilities: {\n requires: [\n { key: 'identity', version: 1 },\n { key: 'audit-trail', version: 1 },\n { key: 'notifications', version: 1 },\n ],\n },\n};\n"],"mappings":";;;;;AAWA,MAAaA,qBAAwC;CACnD,MAAM;EACJ,KAAK;EACL,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM;GAAC;GAAO;GAAS;GAAY;GAAQ;EAC3C,WA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U;EACR;GAAE,KAAK;GAAY,SAAS;GAAG;EAC/B;GAAE,KAAK;GAAe,SAAS;GAAG;EAClC;GAAE,KAAK;GAAiB,SAAS;GAAG;EACrC,EACF;CACF"}
@@ -0,0 +1,14 @@
1
+ import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
2
+
3
+ //#region src/deal/deal.enum.d.ts
4
+ /**
5
+ * Deal status enum.
6
+ */
7
+ declare const DealStatusEnum: _contractspec_lib_schema0.EnumType<[string, string, string, string]>;
8
+ /**
9
+ * Deal status filter enum.
10
+ */
11
+ declare const DealStatusFilterEnum: _contractspec_lib_schema0.EnumType<[string, string, string, string]>;
12
+ //#endregion
13
+ export { DealStatusEnum, DealStatusFilterEnum };
14
+ //# sourceMappingURL=deal.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deal.enum.d.ts","names":[],"sources":["../../src/deal/deal.enum.ts"],"sourcesContent":[],"mappings":";;;;;;AAKa,cAAA,cAKX,EAAA,yBAAA,CALyB,QAAA,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA;AAU3B;;;cAAa,sBAKX,yBAAA,CAL+B"}
@@ -0,0 +1,25 @@
1
+ import { defineEnum } from "@contractspec/lib.schema";
2
+
3
+ //#region src/deal/deal.enum.ts
4
+ /**
5
+ * Deal status enum.
6
+ */
7
+ const DealStatusEnum = defineEnum("DealStatus", [
8
+ "OPEN",
9
+ "WON",
10
+ "LOST",
11
+ "STALE"
12
+ ]);
13
+ /**
14
+ * Deal status filter enum.
15
+ */
16
+ const DealStatusFilterEnum = defineEnum("DealStatusFilter", [
17
+ "OPEN",
18
+ "WON",
19
+ "LOST",
20
+ "all"
21
+ ]);
22
+
23
+ //#endregion
24
+ export { DealStatusEnum, DealStatusFilterEnum };
25
+ //# sourceMappingURL=deal.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deal.enum.js","names":[],"sources":["../../src/deal/deal.enum.ts"],"sourcesContent":["import { defineEnum } from '@contractspec/lib.schema';\n\n/**\n * Deal status enum.\n */\nexport const DealStatusEnum = defineEnum('DealStatus', [\n 'OPEN',\n 'WON',\n 'LOST',\n 'STALE',\n]);\n\n/**\n * Deal status filter enum.\n */\nexport const DealStatusFilterEnum = defineEnum('DealStatusFilter', [\n 'OPEN',\n 'WON',\n 'LOST',\n 'all',\n]);\n"],"mappings":";;;;;;AAKA,MAAa,iBAAiB,WAAW,cAAc;CACrD;CACA;CACA;CACA;CACD,CAAC;;;;AAKF,MAAa,uBAAuB,WAAW,oBAAoB;CACjE;CACA;CACA;CACA;CACD,CAAC"}