business-as-code 2.1.3 → 2.4.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 (235) hide show
  1. package/.turbo/turbo-build.log +4 -5
  2. package/CHANGELOG.md +53 -0
  3. package/README.md +2 -0
  4. package/dist/dollar.d.ts.map +1 -1
  5. package/dist/dollar.js +2 -2
  6. package/dist/dollar.js.map +1 -1
  7. package/dist/entities/organization.d.ts +4 -0
  8. package/dist/entities/organization.d.ts.map +1 -1
  9. package/dist/entities/organization.js +27 -18
  10. package/dist/entities/organization.js.map +1 -1
  11. package/dist/entities/planning.d.ts +87 -0
  12. package/dist/finance/account.d.ts +44 -0
  13. package/dist/finance/account.d.ts.map +1 -0
  14. package/dist/finance/account.js +6 -0
  15. package/dist/finance/account.js.map +1 -0
  16. package/dist/finance/authority.d.ts +78 -0
  17. package/dist/finance/authority.d.ts.map +1 -0
  18. package/dist/finance/authority.js +27 -0
  19. package/dist/finance/authority.js.map +1 -0
  20. package/dist/finance/card.d.ts +36 -0
  21. package/dist/finance/card.d.ts.map +1 -0
  22. package/dist/finance/card.js +6 -0
  23. package/dist/finance/card.js.map +1 -0
  24. package/dist/finance/identity.d.ts +30 -0
  25. package/dist/finance/identity.d.ts.map +1 -0
  26. package/dist/finance/identity.js +8 -0
  27. package/dist/finance/identity.js.map +1 -0
  28. package/dist/finance/index.d.ts +36 -0
  29. package/dist/finance/index.d.ts.map +1 -0
  30. package/dist/finance/index.js +22 -0
  31. package/dist/finance/index.js.map +1 -0
  32. package/dist/finance/ledger.d.ts +24 -0
  33. package/dist/finance/ledger.d.ts.map +1 -0
  34. package/dist/finance/ledger.js +8 -0
  35. package/dist/finance/ledger.js.map +1 -0
  36. package/dist/finance/merchant.d.ts +129 -0
  37. package/dist/finance/merchant.d.ts.map +1 -0
  38. package/dist/finance/merchant.js +21 -0
  39. package/dist/finance/merchant.js.map +1 -0
  40. package/dist/finance/outcome-contract.d.ts +139 -0
  41. package/dist/finance/outcome-contract.d.ts.map +1 -0
  42. package/dist/finance/outcome-contract.js +27 -0
  43. package/dist/finance/outcome-contract.js.map +1 -0
  44. package/dist/finance/port.d.ts +121 -0
  45. package/dist/finance/port.d.ts.map +1 -0
  46. package/dist/finance/port.js +10 -0
  47. package/dist/finance/port.js.map +1 -0
  48. package/dist/finance/pricing.d.ts +154 -0
  49. package/dist/finance/pricing.d.ts.map +1 -0
  50. package/dist/finance/pricing.js +79 -0
  51. package/dist/finance/pricing.js.map +1 -0
  52. package/dist/finance/proof-predicate.d.ts +92 -0
  53. package/dist/finance/proof-predicate.d.ts.map +1 -0
  54. package/dist/finance/proof-predicate.js +80 -0
  55. package/dist/finance/proof-predicate.js.map +1 -0
  56. package/dist/finance/refund.d.ts +44 -0
  57. package/dist/finance/refund.d.ts.map +1 -0
  58. package/dist/finance/refund.js +41 -0
  59. package/dist/finance/refund.js.map +1 -0
  60. package/dist/finance/sla.d.ts +25 -0
  61. package/dist/finance/sla.d.ts.map +1 -0
  62. package/dist/finance/sla.js +7 -0
  63. package/dist/finance/sla.js.map +1 -0
  64. package/dist/finance/types.d.ts +79 -0
  65. package/dist/finance/types.d.ts.map +1 -0
  66. package/dist/finance/types.js +8 -0
  67. package/dist/{canvas → finance}/types.js.map +1 -1
  68. package/dist/goals.d.ts +19 -0
  69. package/dist/goals.d.ts.map +1 -1
  70. package/dist/goals.js +81 -12
  71. package/dist/goals.js.map +1 -1
  72. package/dist/index.d.ts +12 -8
  73. package/dist/index.d.ts.map +1 -1
  74. package/dist/index.js +19 -7
  75. package/dist/index.js.map +1 -1
  76. package/dist/kpis.d.ts +19 -0
  77. package/dist/kpis.d.ts.map +1 -1
  78. package/dist/kpis.js +71 -6
  79. package/dist/kpis.js.map +1 -1
  80. package/dist/metrics.d.ts.map +1 -1
  81. package/dist/metrics.js +29 -24
  82. package/dist/metrics.js.map +1 -1
  83. package/dist/okrs.d.ts +34 -0
  84. package/dist/okrs.d.ts.map +1 -1
  85. package/dist/okrs.js +135 -13
  86. package/dist/okrs.js.map +1 -1
  87. package/dist/organization.d.ts.map +1 -1
  88. package/dist/organization.js +11 -11
  89. package/dist/organization.js.map +1 -1
  90. package/dist/process.d.ts.map +1 -1
  91. package/dist/process.js +13 -12
  92. package/dist/process.js.map +1 -1
  93. package/dist/product.d.ts.map +1 -1
  94. package/dist/product.js +9 -9
  95. package/dist/product.js.map +1 -1
  96. package/dist/queries.d.ts.map +1 -1
  97. package/dist/queries.js +194 -32
  98. package/dist/queries.js.map +1 -1
  99. package/dist/roles.d.ts +25 -31
  100. package/dist/roles.d.ts.map +1 -1
  101. package/dist/roles.js +37 -10
  102. package/dist/roles.js.map +1 -1
  103. package/dist/workflow.d.ts.map +1 -1
  104. package/dist/workflow.js +13 -12
  105. package/dist/workflow.js.map +1 -1
  106. package/package.json +20 -13
  107. package/src/dollar.ts +5 -2
  108. package/src/entities/organization.ts +31 -18
  109. package/src/finance/account.ts +48 -0
  110. package/src/finance/authority.ts +42 -0
  111. package/src/finance/card.ts +38 -0
  112. package/src/finance/identity.ts +31 -0
  113. package/src/finance/index.ts +117 -0
  114. package/src/finance/ledger.ts +26 -0
  115. package/src/finance/merchant.ts +127 -0
  116. package/src/finance/outcome-contract.ts +157 -0
  117. package/src/finance/port.ts +144 -0
  118. package/src/finance/pricing.ts +197 -0
  119. package/src/finance/proof-predicate.ts +106 -0
  120. package/src/finance/refund.ts +52 -0
  121. package/src/finance/sla.ts +33 -0
  122. package/src/finance/types.ts +75 -0
  123. package/src/goals.ts +78 -12
  124. package/src/index.ts +48 -18
  125. package/src/kpis.ts +62 -8
  126. package/src/metrics.ts +92 -79
  127. package/src/okrs.ts +120 -20
  128. package/src/organization.ts +12 -15
  129. package/src/process.ts +11 -12
  130. package/src/product.ts +8 -9
  131. package/src/queries.ts +238 -75
  132. package/src/roles.ts +62 -61
  133. package/src/workflow.ts +22 -15
  134. package/test/business.test.ts +282 -0
  135. package/test/dollar.test.ts +270 -0
  136. package/test/entities.test.ts +628 -0
  137. package/test/financials.test.ts +539 -0
  138. package/test/goals.test.ts +451 -0
  139. package/{src → test}/index.test.ts +1 -1
  140. package/test/kpis.test.ts +440 -0
  141. package/test/metrics.test.ts +744 -0
  142. package/test/okrs.test.ts +741 -0
  143. package/test/organization.test.ts +548 -0
  144. package/test/process.test.ts +503 -0
  145. package/test/product.test.ts +430 -0
  146. package/test/queries.test.ts +556 -0
  147. package/test/roles.test.ts +546 -0
  148. package/test/service.test.ts +450 -0
  149. package/test/types.test.ts +1141 -0
  150. package/test/vision.test.ts +214 -0
  151. package/test/workflow.test.ts +501 -0
  152. package/vitest.config.ts +47 -0
  153. package/LICENSE +0 -21
  154. package/dist/canvas/activities.d.ts +0 -19
  155. package/dist/canvas/activities.d.ts.map +0 -1
  156. package/dist/canvas/activities.js +0 -20
  157. package/dist/canvas/activities.js.map +0 -1
  158. package/dist/canvas/channels.d.ts +0 -20
  159. package/dist/canvas/channels.d.ts.map +0 -1
  160. package/dist/canvas/channels.js +0 -21
  161. package/dist/canvas/channels.js.map +0 -1
  162. package/dist/canvas/relationships.d.ts +0 -20
  163. package/dist/canvas/relationships.d.ts.map +0 -1
  164. package/dist/canvas/relationships.js +0 -21
  165. package/dist/canvas/relationships.js.map +0 -1
  166. package/dist/canvas/resources.d.ts +0 -20
  167. package/dist/canvas/resources.d.ts.map +0 -1
  168. package/dist/canvas/resources.js +0 -30
  169. package/dist/canvas/resources.js.map +0 -1
  170. package/dist/canvas/revenue.d.ts +0 -22
  171. package/dist/canvas/revenue.d.ts.map +0 -1
  172. package/dist/canvas/revenue.js +0 -30
  173. package/dist/canvas/revenue.js.map +0 -1
  174. package/dist/canvas/segments.d.ts +0 -20
  175. package/dist/canvas/segments.d.ts.map +0 -1
  176. package/dist/canvas/segments.js +0 -28
  177. package/dist/canvas/segments.js.map +0 -1
  178. package/dist/canvas/types.d.ts +0 -232
  179. package/dist/canvas/types.d.ts.map +0 -1
  180. package/dist/canvas/types.js +0 -8
  181. package/dist/canvas/value.d.ts +0 -20
  182. package/dist/canvas/value.d.ts.map +0 -1
  183. package/dist/canvas/value.js +0 -21
  184. package/dist/canvas/value.js.map +0 -1
  185. package/src/business.js +0 -108
  186. package/src/canvas/activities.ts +0 -32
  187. package/src/canvas/canvas.ts +0 -482
  188. package/src/canvas/channels.ts +0 -34
  189. package/src/canvas/costs.ts +0 -43
  190. package/src/canvas/economics.ts +0 -99
  191. package/src/canvas/index.ts +0 -206
  192. package/src/canvas/partnerships.ts +0 -34
  193. package/src/canvas/projections.ts +0 -141
  194. package/src/canvas/relationships.ts +0 -34
  195. package/src/canvas/resources.ts +0 -43
  196. package/src/canvas/revenue.ts +0 -56
  197. package/src/canvas/segments.ts +0 -42
  198. package/src/canvas/types.ts +0 -363
  199. package/src/canvas/value.ts +0 -34
  200. package/src/dollar.js +0 -106
  201. package/src/entities/assets.js +0 -322
  202. package/src/entities/business.js +0 -369
  203. package/src/entities/communication.js +0 -254
  204. package/src/entities/customers.js +0 -988
  205. package/src/entities/financials.js +0 -931
  206. package/src/entities/goals.js +0 -799
  207. package/src/entities/index.js +0 -197
  208. package/src/entities/legal.js +0 -300
  209. package/src/entities/market.js +0 -300
  210. package/src/entities/marketing.js +0 -1156
  211. package/src/entities/offerings.js +0 -726
  212. package/src/entities/operations.js +0 -786
  213. package/src/entities/organization.js +0 -806
  214. package/src/entities/partnerships.js +0 -299
  215. package/src/entities/planning.js +0 -270
  216. package/src/entities/projects.js +0 -348
  217. package/src/entities/risk.js +0 -292
  218. package/src/entities/sales.js +0 -1247
  219. package/src/financials.js +0 -296
  220. package/src/goals.js +0 -214
  221. package/src/index.js +0 -131
  222. package/src/index.test.js +0 -274
  223. package/src/kpis.js +0 -231
  224. package/src/metrics.js +0 -324
  225. package/src/okrs.js +0 -268
  226. package/src/organization.js +0 -172
  227. package/src/process.js +0 -240
  228. package/src/product.js +0 -144
  229. package/src/queries.js +0 -414
  230. package/src/roles.js +0 -254
  231. package/src/service.js +0 -139
  232. package/src/types.js +0 -4
  233. package/src/vision.js +0 -67
  234. package/src/workflow.js +0 -246
  235. package/tests/canvas.test.ts +0 -842
@@ -1,300 +0,0 @@
1
- /**
2
- * Market Intelligence Entities
3
- * Market, Competitor, Trend, Opportunity, SWOT, Industry
4
- */
5
- export const Market = {
6
- singular: 'market',
7
- plural: 'markets',
8
- description: 'A target market or market segment',
9
- properties: {
10
- name: { type: 'string', description: 'Market name' },
11
- description: { type: 'string', description: 'Market description' },
12
- type: { type: 'string', description: 'Type of market', examples: ['geographic', 'demographic', 'psychographic', 'behavioral', 'industry', 'vertical', 'horizontal'] },
13
- status: { type: 'string', description: 'Market status', examples: ['emerging', 'growing', 'mature', 'declining', 'target', 'active', 'exited'] },
14
- region: { type: 'string', description: 'Geographic region' },
15
- countries: { type: 'string[]', description: 'Countries in market' },
16
- size: { type: 'number', description: 'Total addressable market (TAM)' },
17
- serviceable: { type: 'number', description: 'Serviceable addressable market (SAM)' },
18
- obtainable: { type: 'number', description: 'Serviceable obtainable market (SOM)' },
19
- currency: { type: 'string', description: 'Currency for market size' },
20
- growthRate: { type: 'number', description: 'Annual growth rate (CAGR)' },
21
- growthDrivers: { type: 'string[]', description: 'Growth drivers' },
22
- growthBarriers: { type: 'string[]', description: 'Growth barriers' },
23
- maturity: { type: 'string', description: 'Market maturity', examples: ['nascent', 'emerging', 'growth', 'mature', 'saturated', 'declining'] },
24
- competitiveness: { type: 'string', description: 'Competitive intensity', examples: ['low', 'moderate', 'high', 'intense'] },
25
- marketShare: { type: 'number', description: 'Our market share' },
26
- targetShare: { type: 'number', description: 'Target market share' },
27
- customers: { type: 'number', description: 'Total potential customers' },
28
- activeCustomers: { type: 'number', description: 'Our active customers' },
29
- penetration: { type: 'number', description: 'Market penetration rate' },
30
- avgDealSize: { type: 'number', description: 'Average deal size' },
31
- salesCycle: { type: 'number', description: 'Average sales cycle (days)' },
32
- entryBarriers: { type: 'string[]', description: 'Entry barriers' },
33
- regulations: { type: 'string[]', description: 'Key regulations' },
34
- keyPlayers: { type: 'string[]', description: 'Key market players' },
35
- trends: { type: 'string[]', description: 'Market trends' },
36
- risks: { type: 'string[]', description: 'Market risks' },
37
- opportunities: { type: 'string[]', description: 'Market opportunities' },
38
- priority: { type: 'string', description: 'Strategic priority', examples: ['primary', 'secondary', 'exploratory', 'maintain', 'exit'] },
39
- owner: { type: 'string', description: 'Market owner' },
40
- analyst: { type: 'string', description: 'Market analyst' },
41
- lastAnalyzed: { type: 'date', description: 'Last analysis date' },
42
- nextReview: { type: 'date', description: 'Next review date' },
43
- notes: { type: 'string', description: 'Internal notes', optional: true },
44
- tags: { type: 'string[]', description: 'Market tags' },
45
- metadata: { type: 'object', description: 'Additional metadata', optional: true },
46
- },
47
- relationships: {
48
- competitors: { type: 'competitor[]', description: 'Competitors in market', backref: 'markets' },
49
- trends: { type: 'trend[]', description: 'Market trends', backref: 'markets' },
50
- opportunities: { type: 'opportunity[]', description: 'Market opportunities', backref: 'market' },
51
- segments: { type: 'segment[]', description: 'Customer segments', backref: 'market' },
52
- products: { type: 'product[]', description: 'Products in market', backref: 'markets' },
53
- campaigns: { type: 'campaign[]', description: 'Marketing campaigns', backref: 'market' },
54
- parentMarket: { type: 'market', description: 'Parent market', backref: 'subMarkets' },
55
- subMarkets: { type: 'market[]', description: 'Sub-markets', backref: 'parentMarket' },
56
- },
57
- actions: ['create', 'update', 'analyze', 'enter', 'expand', 'exit', 'prioritize', 'segment', 'review'],
58
- events: ['created', 'updated', 'analyzed', 'entered', 'expanded', 'exited', 'prioritized', 'segmented', 'reviewed'],
59
- };
60
- export const Competitor = {
61
- singular: 'competitor',
62
- plural: 'competitors',
63
- description: 'A competitor in the market',
64
- properties: {
65
- name: { type: 'string', description: 'Competitor name' },
66
- description: { type: 'string', description: 'Competitor description' },
67
- type: { type: 'string', description: 'Type of competitor', examples: ['direct', 'indirect', 'substitute', 'potential', 'emerging'] },
68
- status: { type: 'string', description: 'Competitor status', examples: ['active', 'inactive', 'acquired', 'defunct', 'emerging', 'monitoring'] },
69
- website: { type: 'string', description: 'Competitor website' },
70
- founded: { type: 'number', description: 'Year founded' },
71
- headquarters: { type: 'string', description: 'Headquarters location' },
72
- employeeCount: { type: 'number', description: 'Employee count' },
73
- fundingTotal: { type: 'number', description: 'Total funding raised', optional: true },
74
- lastFundingRound: { type: 'string', description: 'Last funding round', optional: true },
75
- lastFundingDate: { type: 'date', description: 'Last funding date', optional: true },
76
- revenue: { type: 'number', description: 'Estimated revenue' },
77
- revenueGrowth: { type: 'number', description: 'Revenue growth rate' },
78
- marketCap: { type: 'number', description: 'Market cap (if public)', optional: true },
79
- publiclyTraded: { type: 'boolean', description: 'Is publicly traded' },
80
- stockSymbol: { type: 'string', description: 'Stock symbol', optional: true },
81
- marketShare: { type: 'number', description: 'Estimated market share' },
82
- positioning: { type: 'string', description: 'Market positioning' },
83
- targetSegments: { type: 'string[]', description: 'Target segments' },
84
- products: { type: 'string[]', description: 'Key products' },
85
- pricing: { type: 'string', description: 'Pricing strategy' },
86
- priceRange: { type: 'string', description: 'Price range', examples: ['budget', 'mid-market', 'premium', 'enterprise'] },
87
- strengths: { type: 'string[]', description: 'Key strengths' },
88
- weaknesses: { type: 'string[]', description: 'Key weaknesses' },
89
- differentiators: { type: 'string[]', description: 'Key differentiators' },
90
- technology: { type: 'string[]', description: 'Key technologies' },
91
- partnerships: { type: 'string[]', description: 'Key partnerships' },
92
- customers: { type: 'string[]', description: 'Known customers' },
93
- threats: { type: 'string[]', description: 'Threats to us' },
94
- opportunities: { type: 'string[]', description: 'Opportunities against' },
95
- winRate: { type: 'number', description: 'Our win rate against', optional: true },
96
- lossRate: { type: 'number', description: 'Our loss rate against', optional: true },
97
- dealsWon: { type: 'number', description: 'Deals won against' },
98
- dealsLost: { type: 'number', description: 'Deals lost against' },
99
- battleCard: { type: 'string', description: 'Battle card URL', optional: true },
100
- analyst: { type: 'string', description: 'Assigned analyst' },
101
- lastUpdated: { type: 'date', description: 'Last updated date' },
102
- nextReview: { type: 'date', description: 'Next review date' },
103
- threatLevel: { type: 'string', description: 'Threat level', examples: ['low', 'medium', 'high', 'critical'] },
104
- priority: { type: 'string', description: 'Monitoring priority', examples: ['primary', 'secondary', 'tertiary', 'watch'] },
105
- notes: { type: 'string', description: 'Internal notes', optional: true },
106
- tags: { type: 'string[]', description: 'Competitor tags' },
107
- metadata: { type: 'object', description: 'Additional metadata', optional: true },
108
- },
109
- relationships: {
110
- markets: { type: 'market[]', description: 'Active markets', backref: 'competitors' },
111
- products: { type: 'product[]', description: 'Competitor products', backref: 'competitor' },
112
- deals: { type: 'deal[]', description: 'Competitive deals', backref: 'competitors' },
113
- swots: { type: 'swot[]', description: 'SWOT analyses', backref: 'competitor' },
114
- },
115
- actions: ['create', 'update', 'analyze', 'monitor', 'compare', 'benchmark', 'track', 'alert', 'archive'],
116
- events: ['created', 'updated', 'analyzed', 'monitored', 'compared', 'benchmarked', 'tracked', 'alerted', 'archived'],
117
- };
118
- export const Trend = {
119
- singular: 'trend',
120
- plural: 'trends',
121
- description: 'A market or industry trend',
122
- properties: {
123
- name: { type: 'string', description: 'Trend name' },
124
- description: { type: 'string', description: 'Trend description' },
125
- type: { type: 'string', description: 'Type of trend', examples: ['technology', 'market', 'consumer', 'regulatory', 'economic', 'social', 'environmental', 'competitive'] },
126
- status: { type: 'string', description: 'Trend status', examples: ['emerging', 'growing', 'mainstream', 'declining', 'ended'] },
127
- category: { type: 'string', description: 'Trend category' },
128
- timeframe: { type: 'string', description: 'Trend timeframe', examples: ['short-term', 'medium-term', 'long-term', 'permanent'] },
129
- strength: { type: 'string', description: 'Trend strength', examples: ['weak', 'moderate', 'strong', 'disruptive'] },
130
- confidence: { type: 'string', description: 'Confidence level', examples: ['low', 'medium', 'high', 'very-high'] },
131
- impact: { type: 'string', description: 'Potential impact', examples: ['minimal', 'moderate', 'significant', 'transformational'] },
132
- impactAreas: { type: 'string[]', description: 'Areas of impact' },
133
- drivers: { type: 'string[]', description: 'Trend drivers' },
134
- signals: { type: 'string[]', description: 'Signal indicators' },
135
- implications: { type: 'string[]', description: 'Business implications' },
136
- opportunities: { type: 'string[]', description: 'Opportunities created' },
137
- threats: { type: 'string[]', description: 'Threats posed' },
138
- responseOptions: { type: 'string[]', description: 'Response options' },
139
- adoptionRate: { type: 'number', description: 'Current adoption rate' },
140
- projectedAdoption: { type: 'number', description: 'Projected adoption rate' },
141
- relevance: { type: 'string', description: 'Relevance to business', examples: ['not-relevant', 'somewhat', 'relevant', 'highly-relevant', 'critical'] },
142
- actionRequired: { type: 'boolean', description: 'Requires action' },
143
- owner: { type: 'string', description: 'Trend owner' },
144
- sources: { type: 'string[]', description: 'Data sources' },
145
- firstIdentified: { type: 'date', description: 'First identified date' },
146
- lastReviewed: { type: 'date', description: 'Last review date' },
147
- nextReview: { type: 'date', description: 'Next review date' },
148
- notes: { type: 'string', description: 'Internal notes', optional: true },
149
- tags: { type: 'string[]', description: 'Trend tags' },
150
- metadata: { type: 'object', description: 'Additional metadata', optional: true },
151
- },
152
- relationships: {
153
- markets: { type: 'market[]', description: 'Affected markets', backref: 'trends' },
154
- industry: { type: 'industry', description: 'Related industry', backref: 'trends' },
155
- opportunities: { type: 'opportunity[]', description: 'Created opportunities', backref: 'trend' },
156
- initiatives: { type: 'initiative[]', description: 'Response initiatives', backref: 'trends' },
157
- relatedTrends: { type: 'trend[]', description: 'Related trends', backref: 'relatedTrends' },
158
- },
159
- actions: ['create', 'update', 'identify', 'analyze', 'monitor', 'respond', 'archive', 'validate', 'escalate'],
160
- events: ['created', 'updated', 'identified', 'analyzed', 'monitored', 'responded', 'archived', 'validated', 'escalated'],
161
- };
162
- export const Opportunity = {
163
- singular: 'opportunity',
164
- plural: 'opportunities',
165
- description: 'A strategic business opportunity',
166
- properties: {
167
- name: { type: 'string', description: 'Opportunity name' },
168
- description: { type: 'string', description: 'Opportunity description' },
169
- type: { type: 'string', description: 'Type of opportunity', examples: ['market-expansion', 'product', 'acquisition', 'partnership', 'technology', 'cost-reduction', 'revenue', 'efficiency'] },
170
- status: { type: 'string', description: 'Opportunity status', examples: ['identified', 'evaluating', 'approved', 'pursuing', 'captured', 'declined', 'missed'] },
171
- source: { type: 'string', description: 'Opportunity source', examples: ['market-analysis', 'customer-feedback', 'competitor-watch', 'trend', 'internal', 'partner'] },
172
- potentialValue: { type: 'number', description: 'Potential value' },
173
- currency: { type: 'string', description: 'Currency' },
174
- probability: { type: 'number', description: 'Success probability (%)' },
175
- expectedValue: { type: 'number', description: 'Expected value' },
176
- timeToValue: { type: 'string', description: 'Time to realize value' },
177
- investmentRequired: { type: 'number', description: 'Investment required' },
178
- roi: { type: 'number', description: 'Expected ROI' },
179
- paybackPeriod: { type: 'string', description: 'Payback period' },
180
- risks: { type: 'string[]', description: 'Key risks' },
181
- benefits: { type: 'string[]', description: 'Key benefits' },
182
- requirements: { type: 'string[]', description: 'Requirements to capture' },
183
- constraints: { type: 'string[]', description: 'Constraints' },
184
- alternatives: { type: 'string[]', description: 'Alternative approaches' },
185
- dependencies: { type: 'string[]', description: 'Dependencies' },
186
- stakeholders: { type: 'string[]', description: 'Key stakeholders' },
187
- owner: { type: 'string', description: 'Opportunity owner' },
188
- sponsor: { type: 'string', description: 'Executive sponsor' },
189
- identifiedDate: { type: 'date', description: 'Date identified' },
190
- evaluationDeadline: { type: 'date', description: 'Evaluation deadline' },
191
- targetCaptureDate: { type: 'date', description: 'Target capture date' },
192
- windowStart: { type: 'date', description: 'Opportunity window start' },
193
- windowEnd: { type: 'date', description: 'Opportunity window end' },
194
- priority: { type: 'string', description: 'Priority level', examples: ['critical', 'high', 'medium', 'low'] },
195
- strategicFit: { type: 'string', description: 'Strategic fit', examples: ['perfect', 'strong', 'moderate', 'weak'] },
196
- notes: { type: 'string', description: 'Internal notes', optional: true },
197
- tags: { type: 'string[]', description: 'Opportunity tags' },
198
- metadata: { type: 'object', description: 'Additional metadata', optional: true },
199
- },
200
- relationships: {
201
- market: { type: 'market', description: 'Related market', backref: 'opportunities' },
202
- trend: { type: 'trend', description: 'Source trend', backref: 'opportunities' },
203
- initiative: { type: 'initiative', description: 'Resulting initiative', backref: 'opportunity' },
204
- project: { type: 'project', description: 'Implementation project', backref: 'opportunity' },
205
- relatedOpportunities: { type: 'opportunity[]', description: 'Related opportunities', backref: 'relatedOpportunities' },
206
- },
207
- actions: ['create', 'update', 'identify', 'evaluate', 'approve', 'decline', 'pursue', 'capture', 'abandon', 'review'],
208
- events: ['created', 'updated', 'identified', 'evaluated', 'approved', 'declined', 'pursued', 'captured', 'abandoned', 'reviewed'],
209
- };
210
- export const SWOT = {
211
- singular: 'swot',
212
- plural: 'swots',
213
- description: 'A SWOT analysis (Strengths, Weaknesses, Opportunities, Threats)',
214
- properties: {
215
- name: { type: 'string', description: 'Analysis name' },
216
- description: { type: 'string', description: 'Analysis description' },
217
- type: { type: 'string', description: 'Type of SWOT', examples: ['company', 'product', 'market', 'competitor', 'project', 'initiative'] },
218
- status: { type: 'string', description: 'Analysis status', examples: ['draft', 'in-progress', 'completed', 'archived'] },
219
- subject: { type: 'string', description: 'Subject of analysis' },
220
- strengths: { type: 'string[]', description: 'Strengths identified' },
221
- weaknesses: { type: 'string[]', description: 'Weaknesses identified' },
222
- opportunities: { type: 'string[]', description: 'Opportunities identified' },
223
- threats: { type: 'string[]', description: 'Threats identified' },
224
- strengthsScore: { type: 'number', description: 'Strengths aggregate score' },
225
- weaknessesScore: { type: 'number', description: 'Weaknesses aggregate score' },
226
- opportunitiesScore: { type: 'number', description: 'Opportunities aggregate score' },
227
- threatsScore: { type: 'number', description: 'Threats aggregate score' },
228
- overallAssessment: { type: 'string', description: 'Overall assessment' },
229
- recommendations: { type: 'string[]', description: 'Recommendations' },
230
- actionItems: { type: 'string[]', description: 'Resulting action items' },
231
- participants: { type: 'string[]', description: 'Analysis participants' },
232
- author: { type: 'string', description: 'Analysis author' },
233
- reviewer: { type: 'string', description: 'Reviewer' },
234
- analysisDate: { type: 'date', description: 'Analysis date' },
235
- reviewDate: { type: 'date', description: 'Review date' },
236
- validUntil: { type: 'date', description: 'Valid until date' },
237
- documentUrl: { type: 'string', description: 'Document URL' },
238
- notes: { type: 'string', description: 'Internal notes', optional: true },
239
- tags: { type: 'string[]', description: 'SWOT tags' },
240
- metadata: { type: 'object', description: 'Additional metadata', optional: true },
241
- },
242
- relationships: {
243
- competitor: { type: 'competitor', description: 'Analyzed competitor', backref: 'swots' },
244
- product: { type: 'product', description: 'Analyzed product', backref: 'swots' },
245
- market: { type: 'market', description: 'Related market', backref: 'swots' },
246
- initiative: { type: 'initiative', description: 'Resulting initiative', backref: 'swots' },
247
- },
248
- actions: ['create', 'update', 'conduct', 'review', 'approve', 'archive', 'share', 'revisit'],
249
- events: ['created', 'updated', 'conducted', 'reviewed', 'approved', 'archived', 'shared', 'revisited'],
250
- };
251
- export const Industry = {
252
- singular: 'industry',
253
- plural: 'industries',
254
- description: 'An industry or sector',
255
- properties: {
256
- name: { type: 'string', description: 'Industry name' },
257
- description: { type: 'string', description: 'Industry description' },
258
- code: { type: 'string', description: 'Industry code (NAICS, SIC)' },
259
- classification: { type: 'string', description: 'Classification system', examples: ['NAICS', 'SIC', 'GICS', 'ICB', 'custom'] },
260
- status: { type: 'string', description: 'Industry status', examples: ['emerging', 'growing', 'mature', 'declining', 'disrupted'] },
261
- size: { type: 'number', description: 'Industry size (revenue)' },
262
- growthRate: { type: 'number', description: 'Annual growth rate' },
263
- employmentSize: { type: 'number', description: 'Total employment' },
264
- majorPlayers: { type: 'string[]', description: 'Major players' },
265
- concentration: { type: 'string', description: 'Industry concentration', examples: ['fragmented', 'competitive', 'oligopolistic', 'monopolistic'] },
266
- barriers: { type: 'string[]', description: 'Entry barriers' },
267
- regulations: { type: 'string[]', description: 'Key regulations' },
268
- technologyDrivers: { type: 'string[]', description: 'Technology drivers' },
269
- disruptions: { type: 'string[]', description: 'Potential disruptions' },
270
- trends: { type: 'string[]', description: 'Industry trends' },
271
- challenges: { type: 'string[]', description: 'Industry challenges' },
272
- opportunities: { type: 'string[]', description: 'Industry opportunities' },
273
- valueChain: { type: 'string[]', description: 'Value chain stages' },
274
- relevance: { type: 'string', description: 'Relevance to business', examples: ['primary', 'secondary', 'adjacent', 'monitoring'] },
275
- analyst: { type: 'string', description: 'Assigned analyst' },
276
- lastAnalyzed: { type: 'date', description: 'Last analysis date' },
277
- notes: { type: 'string', description: 'Internal notes', optional: true },
278
- tags: { type: 'string[]', description: 'Industry tags' },
279
- metadata: { type: 'object', description: 'Additional metadata', optional: true },
280
- },
281
- relationships: {
282
- markets: { type: 'market[]', description: 'Related markets', backref: 'industry' },
283
- competitors: { type: 'competitor[]', description: 'Industry competitors', backref: 'industries' },
284
- trends: { type: 'trend[]', description: 'Industry trends', backref: 'industry' },
285
- parentIndustry: { type: 'industry', description: 'Parent industry', backref: 'subIndustries' },
286
- subIndustries: { type: 'industry[]', description: 'Sub-industries', backref: 'parentIndustry' },
287
- },
288
- actions: ['create', 'update', 'analyze', 'monitor', 'enter', 'exit', 'benchmark', 'report'],
289
- events: ['created', 'updated', 'analyzed', 'monitored', 'entered', 'exited', 'benchmarked', 'reported'],
290
- };
291
- // Export all market entities
292
- export const MarketEntities = {
293
- Market,
294
- Competitor,
295
- Trend,
296
- Opportunity,
297
- SWOT,
298
- Industry,
299
- };
300
- export default MarketEntities;