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
@@ -0,0 +1,628 @@
1
+ /**
2
+ * Tests for entities/index.ts - Business Entity Type Definitions
3
+ */
4
+
5
+ import { describe, it, expect } from 'vitest'
6
+ import {
7
+ // Business entities
8
+ Business,
9
+ Vision,
10
+ Value,
11
+ BusinessEntities,
12
+ BusinessCategories,
13
+
14
+ // Organization entities
15
+ Organization,
16
+ Department,
17
+ Team,
18
+ Position,
19
+ Role,
20
+ Worker,
21
+ OrganizationEntities,
22
+ OrganizationCategories,
23
+
24
+ // Goal entities
25
+ Goal,
26
+ OKR,
27
+ KeyResult,
28
+ KPI,
29
+ Metric,
30
+ Initiative,
31
+ GoalEntities,
32
+ GoalCategories,
33
+
34
+ // Offering entities
35
+ Product,
36
+ Service,
37
+ Feature,
38
+ PricingPlan,
39
+ RoadmapItem,
40
+ OfferingEntities,
41
+ OfferingCategories,
42
+
43
+ // Operations entities
44
+ Process,
45
+ ProcessStep,
46
+ Workflow,
47
+ WorkflowAction,
48
+ WorkflowRun,
49
+ Policy,
50
+ OperationsEntities,
51
+ OperationsCategories,
52
+
53
+ // Financial entities
54
+ Budget,
55
+ Revenue,
56
+ Expense,
57
+ Investment,
58
+ FinancialPeriod,
59
+ Forecast,
60
+ FinancialEntities,
61
+ FinancialCategories,
62
+
63
+ // All entities
64
+ AllBusinessEntities,
65
+ BusinessEntityCategories,
66
+ Entities,
67
+ } from '../src/entities/index.js'
68
+
69
+ // Helper to validate Noun structure
70
+ function isValidNoun(entity: unknown): boolean {
71
+ if (typeof entity !== 'object' || entity === null) return false
72
+ const e = entity as Record<string, unknown>
73
+ return (
74
+ typeof e.singular === 'string' &&
75
+ typeof e.plural === 'string' &&
76
+ typeof e.description === 'string' &&
77
+ typeof e.properties === 'object' &&
78
+ Array.isArray(e.actions) &&
79
+ Array.isArray(e.events)
80
+ )
81
+ }
82
+
83
+ describe('Business Entities', () => {
84
+ describe('Business', () => {
85
+ it('should be a valid Noun definition', () => {
86
+ expect(isValidNoun(Business)).toBe(true)
87
+ })
88
+
89
+ it('should have correct singular/plural', () => {
90
+ expect(Business.singular).toBe('business')
91
+ expect(Business.plural).toBe('businesses')
92
+ })
93
+
94
+ it('should have identity properties', () => {
95
+ expect(Business.properties.name).toBeDefined()
96
+ expect(Business.properties.legalName).toBeDefined()
97
+ expect(Business.properties.slug).toBeDefined()
98
+ })
99
+
100
+ it('should have purpose properties', () => {
101
+ expect(Business.properties.mission).toBeDefined()
102
+ expect(Business.properties.vision).toBeDefined()
103
+ expect(Business.properties.values).toBeDefined()
104
+ })
105
+
106
+ it('should have relationships', () => {
107
+ expect(Business.relationships).toBeDefined()
108
+ expect(Business.relationships?.organization).toBeDefined()
109
+ expect(Business.relationships?.products).toBeDefined()
110
+ expect(Business.relationships?.services).toBeDefined()
111
+ })
112
+
113
+ it('should have actions and events', () => {
114
+ expect(Business.actions).toContain('create')
115
+ expect(Business.actions).toContain('update')
116
+ expect(Business.actions).toContain('launch')
117
+ expect(Business.events).toContain('created')
118
+ expect(Business.events).toContain('updated')
119
+ })
120
+ })
121
+
122
+ describe('Vision', () => {
123
+ it('should be a valid Noun definition', () => {
124
+ expect(isValidNoun(Vision)).toBe(true)
125
+ })
126
+
127
+ it('should have correct singular/plural', () => {
128
+ expect(Vision.singular).toBe('vision')
129
+ expect(Vision.plural).toBe('visions')
130
+ })
131
+
132
+ it('should have statement property', () => {
133
+ expect(Vision.properties.statement).toBeDefined()
134
+ expect(Vision.properties.statement.type).toBe('string')
135
+ })
136
+
137
+ it('should have success indicators', () => {
138
+ expect(Vision.properties.successIndicators).toBeDefined()
139
+ expect(Vision.properties.successIndicators.array).toBe(true)
140
+ })
141
+ })
142
+
143
+ describe('Value', () => {
144
+ it('should be a valid Noun definition', () => {
145
+ expect(isValidNoun(Value)).toBe(true)
146
+ })
147
+
148
+ it('should have correct singular/plural', () => {
149
+ expect(Value.singular).toBe('value')
150
+ expect(Value.plural).toBe('values')
151
+ })
152
+
153
+ it('should have behaviors property', () => {
154
+ expect(Value.properties.behaviors).toBeDefined()
155
+ expect(Value.properties.antiPatterns).toBeDefined()
156
+ })
157
+ })
158
+
159
+ describe('BusinessEntities', () => {
160
+ it('should contain all business entities', () => {
161
+ expect(BusinessEntities.Business).toBe(Business)
162
+ expect(BusinessEntities.Vision).toBe(Vision)
163
+ expect(BusinessEntities.Value).toBe(Value)
164
+ })
165
+ })
166
+
167
+ describe('BusinessCategories', () => {
168
+ it('should categorize entities', () => {
169
+ expect(BusinessCategories.core).toContain('Business')
170
+ expect(BusinessCategories.purpose).toContain('Vision')
171
+ expect(BusinessCategories.purpose).toContain('Value')
172
+ })
173
+ })
174
+ })
175
+
176
+ describe('Organization Entities', () => {
177
+ describe('Organization', () => {
178
+ it('should be a valid Noun definition', () => {
179
+ expect(isValidNoun(Organization)).toBe(true)
180
+ })
181
+
182
+ it('should have correct singular/plural', () => {
183
+ expect(Organization.singular).toBe('organization')
184
+ expect(Organization.plural).toBe('organizations')
185
+ })
186
+ })
187
+
188
+ describe('Department', () => {
189
+ it('should be a valid Noun definition', () => {
190
+ expect(isValidNoun(Department)).toBe(true)
191
+ })
192
+
193
+ it('should have correct singular/plural', () => {
194
+ expect(Department.singular).toBe('department')
195
+ expect(Department.plural).toBe('departments')
196
+ })
197
+ })
198
+
199
+ describe('Team', () => {
200
+ it('should be a valid Noun definition', () => {
201
+ expect(isValidNoun(Team)).toBe(true)
202
+ })
203
+
204
+ it('should have correct singular/plural', () => {
205
+ expect(Team.singular).toBe('team')
206
+ expect(Team.plural).toBe('teams')
207
+ })
208
+ })
209
+
210
+ describe('Position', () => {
211
+ it('should be a valid Noun definition', () => {
212
+ expect(isValidNoun(Position)).toBe(true)
213
+ })
214
+
215
+ it('should have correct singular/plural', () => {
216
+ expect(Position.singular).toBe('position')
217
+ expect(Position.plural).toBe('positions')
218
+ })
219
+ })
220
+
221
+ describe('Role', () => {
222
+ it('should be a valid Noun definition', () => {
223
+ expect(isValidNoun(Role)).toBe(true)
224
+ })
225
+
226
+ it('should have correct singular/plural', () => {
227
+ expect(Role.singular).toBe('role')
228
+ expect(Role.plural).toBe('roles')
229
+ })
230
+ })
231
+
232
+ describe('Worker', () => {
233
+ it('should be a valid Noun definition', () => {
234
+ expect(isValidNoun(Worker)).toBe(true)
235
+ })
236
+
237
+ it('should have correct singular/plural', () => {
238
+ expect(Worker.singular).toBe('worker')
239
+ expect(Worker.plural).toBe('workers')
240
+ })
241
+ })
242
+
243
+ describe('OrganizationEntities', () => {
244
+ it('should contain all organization entities', () => {
245
+ expect(OrganizationEntities.Organization).toBe(Organization)
246
+ expect(OrganizationEntities.Department).toBe(Department)
247
+ expect(OrganizationEntities.Team).toBe(Team)
248
+ expect(OrganizationEntities.Position).toBe(Position)
249
+ expect(OrganizationEntities.Role).toBe(Role)
250
+ expect(OrganizationEntities.Worker).toBe(Worker)
251
+ })
252
+ })
253
+ })
254
+
255
+ describe('Goal Entities', () => {
256
+ describe('Goal', () => {
257
+ it('should be a valid Noun definition', () => {
258
+ expect(isValidNoun(Goal)).toBe(true)
259
+ })
260
+
261
+ it('should have correct singular/plural', () => {
262
+ expect(Goal.singular).toBe('goal')
263
+ expect(Goal.plural).toBe('goals')
264
+ })
265
+
266
+ it('should have progress properties', () => {
267
+ expect(Goal.properties.progress).toBeDefined()
268
+ expect(Goal.properties.status).toBeDefined()
269
+ })
270
+ })
271
+
272
+ describe('OKR', () => {
273
+ it('should be a valid Noun definition', () => {
274
+ expect(isValidNoun(OKR)).toBe(true)
275
+ })
276
+
277
+ it('should have correct singular/plural', () => {
278
+ expect(OKR.singular).toBe('okr')
279
+ expect(OKR.plural).toBe('okrs')
280
+ })
281
+ })
282
+
283
+ describe('KeyResult', () => {
284
+ it('should be a valid Noun definition', () => {
285
+ expect(isValidNoun(KeyResult)).toBe(true)
286
+ })
287
+
288
+ it('should have correct singular/plural', () => {
289
+ expect(KeyResult.singular).toBe('key-result')
290
+ expect(KeyResult.plural).toBe('key-results')
291
+ })
292
+ })
293
+
294
+ describe('KPI', () => {
295
+ it('should be a valid Noun definition', () => {
296
+ expect(isValidNoun(KPI)).toBe(true)
297
+ })
298
+
299
+ it('should have correct singular/plural', () => {
300
+ expect(KPI.singular).toBe('kpi')
301
+ expect(KPI.plural).toBe('kpis')
302
+ })
303
+ })
304
+
305
+ describe('Metric', () => {
306
+ it('should be a valid Noun definition', () => {
307
+ expect(isValidNoun(Metric)).toBe(true)
308
+ })
309
+
310
+ it('should have correct singular/plural', () => {
311
+ expect(Metric.singular).toBe('metric')
312
+ expect(Metric.plural).toBe('metrics')
313
+ })
314
+ })
315
+
316
+ describe('Initiative', () => {
317
+ it('should be a valid Noun definition', () => {
318
+ expect(isValidNoun(Initiative)).toBe(true)
319
+ })
320
+
321
+ it('should have correct singular/plural', () => {
322
+ expect(Initiative.singular).toBe('initiative')
323
+ expect(Initiative.plural).toBe('initiatives')
324
+ })
325
+ })
326
+
327
+ describe('GoalEntities', () => {
328
+ it('should contain all goal entities', () => {
329
+ expect(GoalEntities.Goal).toBe(Goal)
330
+ expect(GoalEntities.OKR).toBe(OKR)
331
+ expect(GoalEntities.KeyResult).toBe(KeyResult)
332
+ expect(GoalEntities.KPI).toBe(KPI)
333
+ expect(GoalEntities.Metric).toBe(Metric)
334
+ expect(GoalEntities.Initiative).toBe(Initiative)
335
+ })
336
+ })
337
+ })
338
+
339
+ describe('Offering Entities', () => {
340
+ describe('Product', () => {
341
+ it('should be a valid Noun definition', () => {
342
+ expect(isValidNoun(Product)).toBe(true)
343
+ })
344
+
345
+ it('should have correct singular/plural', () => {
346
+ expect(Product.singular).toBe('product')
347
+ expect(Product.plural).toBe('products')
348
+ })
349
+ })
350
+
351
+ describe('Service', () => {
352
+ it('should be a valid Noun definition', () => {
353
+ expect(isValidNoun(Service)).toBe(true)
354
+ })
355
+
356
+ it('should have correct singular/plural', () => {
357
+ expect(Service.singular).toBe('service')
358
+ expect(Service.plural).toBe('services')
359
+ })
360
+ })
361
+
362
+ describe('Feature', () => {
363
+ it('should be a valid Noun definition', () => {
364
+ expect(isValidNoun(Feature)).toBe(true)
365
+ })
366
+
367
+ it('should have correct singular/plural', () => {
368
+ expect(Feature.singular).toBe('feature')
369
+ expect(Feature.plural).toBe('features')
370
+ })
371
+ })
372
+
373
+ describe('PricingPlan', () => {
374
+ it('should be a valid Noun definition', () => {
375
+ expect(isValidNoun(PricingPlan)).toBe(true)
376
+ })
377
+
378
+ it('should have correct singular/plural', () => {
379
+ expect(PricingPlan.singular).toBe('pricing-plan')
380
+ expect(PricingPlan.plural).toBe('pricing-plans')
381
+ })
382
+ })
383
+
384
+ describe('RoadmapItem', () => {
385
+ it('should be a valid Noun definition', () => {
386
+ expect(isValidNoun(RoadmapItem)).toBe(true)
387
+ })
388
+
389
+ it('should have correct singular/plural', () => {
390
+ expect(RoadmapItem.singular).toBe('roadmap-item')
391
+ expect(RoadmapItem.plural).toBe('roadmap-items')
392
+ })
393
+ })
394
+
395
+ describe('OfferingEntities', () => {
396
+ it('should contain all offering entities', () => {
397
+ expect(OfferingEntities.Product).toBe(Product)
398
+ expect(OfferingEntities.Service).toBe(Service)
399
+ expect(OfferingEntities.Feature).toBe(Feature)
400
+ expect(OfferingEntities.PricingPlan).toBe(PricingPlan)
401
+ expect(OfferingEntities.RoadmapItem).toBe(RoadmapItem)
402
+ })
403
+ })
404
+ })
405
+
406
+ describe('Operations Entities', () => {
407
+ describe('Process', () => {
408
+ it('should be a valid Noun definition', () => {
409
+ expect(isValidNoun(Process)).toBe(true)
410
+ })
411
+
412
+ it('should have correct singular/plural', () => {
413
+ expect(Process.singular).toBe('process')
414
+ expect(Process.plural).toBe('processes')
415
+ })
416
+ })
417
+
418
+ describe('ProcessStep', () => {
419
+ it('should be a valid Noun definition', () => {
420
+ expect(isValidNoun(ProcessStep)).toBe(true)
421
+ })
422
+
423
+ it('should have correct singular/plural', () => {
424
+ expect(ProcessStep.singular).toBe('process-step')
425
+ expect(ProcessStep.plural).toBe('process-steps')
426
+ })
427
+ })
428
+
429
+ describe('Workflow', () => {
430
+ it('should be a valid Noun definition', () => {
431
+ expect(isValidNoun(Workflow)).toBe(true)
432
+ })
433
+
434
+ it('should have correct singular/plural', () => {
435
+ expect(Workflow.singular).toBe('workflow')
436
+ expect(Workflow.plural).toBe('workflows')
437
+ })
438
+ })
439
+
440
+ describe('WorkflowAction', () => {
441
+ it('should be a valid Noun definition', () => {
442
+ expect(isValidNoun(WorkflowAction)).toBe(true)
443
+ })
444
+
445
+ it('should have correct singular/plural', () => {
446
+ expect(WorkflowAction.singular).toBe('workflow-action')
447
+ expect(WorkflowAction.plural).toBe('workflow-actions')
448
+ })
449
+ })
450
+
451
+ describe('WorkflowRun', () => {
452
+ it('should be a valid Noun definition', () => {
453
+ expect(isValidNoun(WorkflowRun)).toBe(true)
454
+ })
455
+
456
+ it('should have correct singular/plural', () => {
457
+ expect(WorkflowRun.singular).toBe('workflow-run')
458
+ expect(WorkflowRun.plural).toBe('workflow-runs')
459
+ })
460
+ })
461
+
462
+ describe('Policy', () => {
463
+ it('should be a valid Noun definition', () => {
464
+ expect(isValidNoun(Policy)).toBe(true)
465
+ })
466
+
467
+ it('should have correct singular/plural', () => {
468
+ expect(Policy.singular).toBe('policy')
469
+ expect(Policy.plural).toBe('policies')
470
+ })
471
+ })
472
+
473
+ describe('OperationsEntities', () => {
474
+ it('should contain all operations entities', () => {
475
+ expect(OperationsEntities.Process).toBe(Process)
476
+ expect(OperationsEntities.ProcessStep).toBe(ProcessStep)
477
+ expect(OperationsEntities.Workflow).toBe(Workflow)
478
+ expect(OperationsEntities.WorkflowAction).toBe(WorkflowAction)
479
+ expect(OperationsEntities.WorkflowRun).toBe(WorkflowRun)
480
+ expect(OperationsEntities.Policy).toBe(Policy)
481
+ })
482
+ })
483
+ })
484
+
485
+ describe('Financial Entities', () => {
486
+ describe('Budget', () => {
487
+ it('should be a valid Noun definition', () => {
488
+ expect(isValidNoun(Budget)).toBe(true)
489
+ })
490
+
491
+ it('should have correct singular/plural', () => {
492
+ expect(Budget.singular).toBe('budget')
493
+ expect(Budget.plural).toBe('budgets')
494
+ })
495
+ })
496
+
497
+ describe('Revenue', () => {
498
+ it('should be a valid Noun definition', () => {
499
+ expect(isValidNoun(Revenue)).toBe(true)
500
+ })
501
+
502
+ it('should have correct singular/plural', () => {
503
+ expect(Revenue.singular).toBe('revenue')
504
+ expect(Revenue.plural).toBe('revenues')
505
+ })
506
+ })
507
+
508
+ describe('Expense', () => {
509
+ it('should be a valid Noun definition', () => {
510
+ expect(isValidNoun(Expense)).toBe(true)
511
+ })
512
+
513
+ it('should have correct singular/plural', () => {
514
+ expect(Expense.singular).toBe('expense')
515
+ expect(Expense.plural).toBe('expenses')
516
+ })
517
+ })
518
+
519
+ describe('Investment', () => {
520
+ it('should be a valid Noun definition', () => {
521
+ expect(isValidNoun(Investment)).toBe(true)
522
+ })
523
+
524
+ it('should have correct singular/plural', () => {
525
+ expect(Investment.singular).toBe('investment')
526
+ expect(Investment.plural).toBe('investments')
527
+ })
528
+ })
529
+
530
+ describe('FinancialPeriod', () => {
531
+ it('should be a valid Noun definition', () => {
532
+ expect(isValidNoun(FinancialPeriod)).toBe(true)
533
+ })
534
+
535
+ it('should have correct singular/plural', () => {
536
+ expect(FinancialPeriod.singular).toBe('financial-period')
537
+ expect(FinancialPeriod.plural).toBe('financial-periods')
538
+ })
539
+ })
540
+
541
+ describe('Forecast', () => {
542
+ it('should be a valid Noun definition', () => {
543
+ expect(isValidNoun(Forecast)).toBe(true)
544
+ })
545
+
546
+ it('should have correct singular/plural', () => {
547
+ expect(Forecast.singular).toBe('forecast')
548
+ expect(Forecast.plural).toBe('forecasts')
549
+ })
550
+ })
551
+
552
+ describe('FinancialEntities', () => {
553
+ it('should contain all financial entities', () => {
554
+ expect(FinancialEntities.Budget).toBe(Budget)
555
+ expect(FinancialEntities.Revenue).toBe(Revenue)
556
+ expect(FinancialEntities.Expense).toBe(Expense)
557
+ expect(FinancialEntities.Investment).toBe(Investment)
558
+ expect(FinancialEntities.FinancialPeriod).toBe(FinancialPeriod)
559
+ expect(FinancialEntities.Forecast).toBe(Forecast)
560
+ })
561
+ })
562
+ })
563
+
564
+ describe('AllBusinessEntities', () => {
565
+ it('should contain all entity categories', () => {
566
+ expect(AllBusinessEntities.business).toBeDefined()
567
+ expect(AllBusinessEntities.organization).toBeDefined()
568
+ expect(AllBusinessEntities.goals).toBeDefined()
569
+ expect(AllBusinessEntities.offerings).toBeDefined()
570
+ expect(AllBusinessEntities.operations).toBeDefined()
571
+ expect(AllBusinessEntities.financials).toBeDefined()
572
+ expect(AllBusinessEntities.customers).toBeDefined()
573
+ expect(AllBusinessEntities.sales).toBeDefined()
574
+ expect(AllBusinessEntities.marketing).toBeDefined()
575
+ expect(AllBusinessEntities.partnerships).toBeDefined()
576
+ expect(AllBusinessEntities.legal).toBeDefined()
577
+ expect(AllBusinessEntities.risk).toBeDefined()
578
+ expect(AllBusinessEntities.projects).toBeDefined()
579
+ expect(AllBusinessEntities.planning).toBeDefined()
580
+ expect(AllBusinessEntities.communication).toBeDefined()
581
+ expect(AllBusinessEntities.assets).toBeDefined()
582
+ expect(AllBusinessEntities.market).toBeDefined()
583
+ })
584
+ })
585
+
586
+ describe('BusinessEntityCategories', () => {
587
+ it('should contain all category names', () => {
588
+ expect(BusinessEntityCategories).toContain('business')
589
+ expect(BusinessEntityCategories).toContain('organization')
590
+ expect(BusinessEntityCategories).toContain('goals')
591
+ expect(BusinessEntityCategories).toContain('offerings')
592
+ expect(BusinessEntityCategories).toContain('operations')
593
+ expect(BusinessEntityCategories).toContain('financials')
594
+ expect(BusinessEntityCategories).toContain('customers')
595
+ expect(BusinessEntityCategories).toContain('sales')
596
+ expect(BusinessEntityCategories).toContain('marketing')
597
+ expect(BusinessEntityCategories).toContain('partnerships')
598
+ expect(BusinessEntityCategories).toContain('legal')
599
+ expect(BusinessEntityCategories).toContain('risk')
600
+ expect(BusinessEntityCategories).toContain('projects')
601
+ expect(BusinessEntityCategories).toContain('planning')
602
+ expect(BusinessEntityCategories).toContain('communication')
603
+ expect(BusinessEntityCategories).toContain('assets')
604
+ expect(BusinessEntityCategories).toContain('market')
605
+ })
606
+
607
+ it('should have 17 categories', () => {
608
+ expect(BusinessEntityCategories).toHaveLength(17)
609
+ })
610
+ })
611
+
612
+ describe('Entities', () => {
613
+ it('should be a flat object containing all entities', () => {
614
+ // Verify some entities from different categories exist
615
+ expect(Entities.Business).toBeDefined()
616
+ expect(Entities.Organization).toBeDefined()
617
+ expect(Entities.Goal).toBeDefined()
618
+ expect(Entities.Product).toBeDefined()
619
+ expect(Entities.Process).toBeDefined()
620
+ expect(Entities.Budget).toBeDefined()
621
+ })
622
+
623
+ it('should have valid Noun structure for all entities', () => {
624
+ for (const [name, entity] of Object.entries(Entities)) {
625
+ expect(isValidNoun(entity)).toBe(true)
626
+ }
627
+ })
628
+ })