business-as-code 0.2.1 → 2.0.1

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 (190) hide show
  1. package/.turbo/turbo-build.log +5 -0
  2. package/CHANGELOG.md +9 -0
  3. package/IMPLEMENTATION.md +226 -0
  4. package/README.md +1133 -193
  5. package/dist/business.d.ts +62 -0
  6. package/dist/business.d.ts.map +1 -0
  7. package/dist/business.js +109 -0
  8. package/dist/business.js.map +1 -0
  9. package/dist/dollar.d.ts +60 -0
  10. package/dist/dollar.d.ts.map +1 -0
  11. package/dist/dollar.js +107 -0
  12. package/dist/dollar.js.map +1 -0
  13. package/dist/entities/assets.d.ts +21 -0
  14. package/dist/entities/assets.d.ts.map +1 -0
  15. package/dist/entities/assets.js +323 -0
  16. package/dist/entities/assets.js.map +1 -0
  17. package/dist/entities/business.d.ts +36 -0
  18. package/dist/entities/business.d.ts.map +1 -0
  19. package/dist/entities/business.js +370 -0
  20. package/dist/entities/business.js.map +1 -0
  21. package/dist/entities/communication.d.ts +21 -0
  22. package/dist/entities/communication.d.ts.map +1 -0
  23. package/dist/entities/communication.js +255 -0
  24. package/dist/entities/communication.js.map +1 -0
  25. package/dist/entities/customers.d.ts +58 -0
  26. package/dist/entities/customers.d.ts.map +1 -0
  27. package/dist/entities/customers.js +989 -0
  28. package/dist/entities/customers.js.map +1 -0
  29. package/dist/entities/financials.d.ts +59 -0
  30. package/dist/entities/financials.d.ts.map +1 -0
  31. package/dist/entities/financials.js +932 -0
  32. package/dist/entities/financials.js.map +1 -0
  33. package/dist/entities/goals.d.ts +58 -0
  34. package/dist/entities/goals.d.ts.map +1 -0
  35. package/dist/entities/goals.js +800 -0
  36. package/dist/entities/goals.js.map +1 -0
  37. package/dist/entities/index.d.ts +299 -0
  38. package/dist/entities/index.d.ts.map +1 -0
  39. package/dist/entities/index.js +198 -0
  40. package/dist/entities/index.js.map +1 -0
  41. package/dist/entities/legal.d.ts +21 -0
  42. package/dist/entities/legal.d.ts.map +1 -0
  43. package/dist/entities/legal.js +301 -0
  44. package/dist/entities/legal.js.map +1 -0
  45. package/dist/entities/market.d.ts +21 -0
  46. package/dist/entities/market.d.ts.map +1 -0
  47. package/dist/entities/market.js +301 -0
  48. package/dist/entities/market.js.map +1 -0
  49. package/dist/entities/marketing.d.ts +67 -0
  50. package/dist/entities/marketing.d.ts.map +1 -0
  51. package/dist/entities/marketing.js +1157 -0
  52. package/dist/entities/marketing.js.map +1 -0
  53. package/dist/entities/offerings.d.ts +51 -0
  54. package/dist/entities/offerings.d.ts.map +1 -0
  55. package/dist/entities/offerings.js +727 -0
  56. package/dist/entities/offerings.js.map +1 -0
  57. package/dist/entities/operations.d.ts +58 -0
  58. package/dist/entities/operations.d.ts.map +1 -0
  59. package/dist/entities/operations.js +787 -0
  60. package/dist/entities/operations.js.map +1 -0
  61. package/dist/entities/organization.d.ts +57 -0
  62. package/dist/entities/organization.d.ts.map +1 -0
  63. package/dist/entities/organization.js +807 -0
  64. package/dist/entities/organization.js.map +1 -0
  65. package/dist/entities/partnerships.d.ts +21 -0
  66. package/dist/entities/partnerships.d.ts.map +1 -0
  67. package/dist/entities/partnerships.js +300 -0
  68. package/dist/entities/partnerships.js.map +1 -0
  69. package/dist/entities/planning.d.ts +87 -0
  70. package/dist/entities/planning.d.ts.map +1 -0
  71. package/dist/entities/planning.js +271 -0
  72. package/dist/entities/planning.js.map +1 -0
  73. package/dist/entities/projects.d.ts +25 -0
  74. package/dist/entities/projects.d.ts.map +1 -0
  75. package/dist/entities/projects.js +349 -0
  76. package/dist/entities/projects.js.map +1 -0
  77. package/dist/entities/risk.d.ts +21 -0
  78. package/dist/entities/risk.d.ts.map +1 -0
  79. package/dist/entities/risk.js +293 -0
  80. package/dist/entities/risk.js.map +1 -0
  81. package/dist/entities/sales.d.ts +72 -0
  82. package/dist/entities/sales.d.ts.map +1 -0
  83. package/dist/entities/sales.js +1248 -0
  84. package/dist/entities/sales.js.map +1 -0
  85. package/dist/financials.d.ts +130 -0
  86. package/dist/financials.d.ts.map +1 -0
  87. package/dist/financials.js +297 -0
  88. package/dist/financials.js.map +1 -0
  89. package/dist/goals.d.ts +87 -0
  90. package/dist/goals.d.ts.map +1 -0
  91. package/dist/goals.js +215 -0
  92. package/dist/goals.js.map +1 -0
  93. package/dist/index.d.ts +97 -4
  94. package/dist/index.d.ts.map +1 -0
  95. package/dist/index.js +131 -1079
  96. package/dist/index.js.map +1 -1
  97. package/dist/kpis.d.ts +118 -0
  98. package/dist/kpis.d.ts.map +1 -0
  99. package/dist/kpis.js +232 -0
  100. package/dist/kpis.js.map +1 -0
  101. package/dist/metrics.d.ts +448 -0
  102. package/dist/metrics.d.ts.map +1 -0
  103. package/dist/metrics.js +325 -0
  104. package/dist/metrics.js.map +1 -0
  105. package/dist/okrs.d.ts +123 -0
  106. package/dist/okrs.d.ts.map +1 -0
  107. package/dist/okrs.js +269 -0
  108. package/dist/okrs.js.map +1 -0
  109. package/dist/organization.d.ts +585 -0
  110. package/dist/organization.d.ts.map +1 -0
  111. package/dist/organization.js +173 -0
  112. package/dist/organization.js.map +1 -0
  113. package/dist/process.d.ts +112 -0
  114. package/dist/process.d.ts.map +1 -0
  115. package/dist/process.js +241 -0
  116. package/dist/process.js.map +1 -0
  117. package/dist/product.d.ts +85 -0
  118. package/dist/product.d.ts.map +1 -0
  119. package/dist/product.js +145 -0
  120. package/dist/product.js.map +1 -0
  121. package/dist/queries.d.ts +304 -0
  122. package/dist/queries.d.ts.map +1 -0
  123. package/dist/queries.js +415 -0
  124. package/dist/queries.js.map +1 -0
  125. package/dist/roles.d.ts +340 -0
  126. package/dist/roles.d.ts.map +1 -0
  127. package/dist/roles.js +255 -0
  128. package/dist/roles.js.map +1 -0
  129. package/dist/service.d.ts +61 -0
  130. package/dist/service.d.ts.map +1 -0
  131. package/dist/service.js +140 -0
  132. package/dist/service.js.map +1 -0
  133. package/dist/types.d.ts +459 -0
  134. package/dist/types.d.ts.map +1 -0
  135. package/dist/types.js +5 -0
  136. package/dist/types.js.map +1 -0
  137. package/dist/vision.d.ts +38 -0
  138. package/dist/vision.d.ts.map +1 -0
  139. package/dist/vision.js +68 -0
  140. package/dist/vision.js.map +1 -0
  141. package/dist/workflow.d.ts +115 -0
  142. package/dist/workflow.d.ts.map +1 -0
  143. package/dist/workflow.js +247 -0
  144. package/dist/workflow.js.map +1 -0
  145. package/examples/basic-usage.ts +307 -0
  146. package/package.json +19 -60
  147. package/src/business.ts +121 -0
  148. package/src/dollar.ts +132 -0
  149. package/src/entities/assets.ts +332 -0
  150. package/src/entities/business.ts +406 -0
  151. package/src/entities/communication.ts +264 -0
  152. package/src/entities/customers.ts +1072 -0
  153. package/src/entities/financials.ts +1011 -0
  154. package/src/entities/goals.ts +871 -0
  155. package/src/entities/index.ts +383 -0
  156. package/src/entities/legal.ts +310 -0
  157. package/src/entities/market.ts +310 -0
  158. package/src/entities/marketing.ts +1249 -0
  159. package/src/entities/offerings.ts +789 -0
  160. package/src/entities/operations.ts +861 -0
  161. package/src/entities/organization.ts +876 -0
  162. package/src/entities/partnerships.ts +309 -0
  163. package/src/entities/planning.ts +307 -0
  164. package/src/entities/projects.ts +360 -0
  165. package/src/entities/risk.ts +302 -0
  166. package/src/entities/sales.ts +1352 -0
  167. package/src/financials.ts +352 -0
  168. package/src/goals.ts +250 -0
  169. package/src/index.test.ts +336 -0
  170. package/src/index.ts +530 -0
  171. package/src/kpis.ts +275 -0
  172. package/src/metrics.ts +825 -0
  173. package/src/okrs.ts +325 -0
  174. package/src/organization.ts +909 -0
  175. package/src/process.ts +272 -0
  176. package/src/product.ts +178 -0
  177. package/src/queries.ts +767 -0
  178. package/src/roles.ts +686 -0
  179. package/src/service.ts +164 -0
  180. package/src/types.ts +493 -0
  181. package/src/vision.ts +88 -0
  182. package/src/workflow.ts +280 -0
  183. package/tsconfig.json +9 -0
  184. package/dist/loaders/index.d.ts +0 -174
  185. package/dist/loaders/index.js +0 -366
  186. package/dist/loaders/index.js.map +0 -1
  187. package/dist/schema/index.d.ts +0 -146
  188. package/dist/schema/index.js +0 -716
  189. package/dist/schema/index.js.map +0 -1
  190. package/dist/types-CJ9eGS_C.d.ts +0 -86
@@ -0,0 +1,789 @@
1
+ /**
2
+ * Offering Entity Types (Nouns)
3
+ *
4
+ * Product and service offerings: Product, Service, Feature, Pricing.
5
+ *
6
+ * @packageDocumentation
7
+ */
8
+
9
+ import type { Noun } from 'ai-database'
10
+
11
+ // =============================================================================
12
+ // Product
13
+ // =============================================================================
14
+
15
+ /**
16
+ * Product entity
17
+ *
18
+ * Represents a product offering.
19
+ */
20
+ export const Product: Noun = {
21
+ singular: 'product',
22
+ plural: 'products',
23
+ description: 'A product offering',
24
+
25
+ properties: {
26
+ // Identity
27
+ name: {
28
+ type: 'string',
29
+ description: 'Product name',
30
+ },
31
+ slug: {
32
+ type: 'string',
33
+ optional: true,
34
+ description: 'URL-friendly identifier',
35
+ },
36
+ description: {
37
+ type: 'string',
38
+ optional: true,
39
+ description: 'Product description',
40
+ },
41
+ tagline: {
42
+ type: 'string',
43
+ optional: true,
44
+ description: 'Product tagline',
45
+ },
46
+
47
+ // Classification
48
+ type: {
49
+ type: 'string',
50
+ optional: true,
51
+ description: 'Product type',
52
+ examples: ['saas', 'app', 'platform', 'api', 'hardware', 'digital', 'physical'],
53
+ },
54
+ category: {
55
+ type: 'string',
56
+ optional: true,
57
+ description: 'Product category',
58
+ },
59
+
60
+ // Market
61
+ targetSegment: {
62
+ type: 'string',
63
+ optional: true,
64
+ description: 'Target customer segment',
65
+ },
66
+ valueProposition: {
67
+ type: 'string',
68
+ optional: true,
69
+ description: 'Value proposition',
70
+ },
71
+ useCases: {
72
+ type: 'string',
73
+ array: true,
74
+ optional: true,
75
+ description: 'Use cases',
76
+ },
77
+
78
+ // Pricing
79
+ pricingModel: {
80
+ type: 'string',
81
+ optional: true,
82
+ description: 'Pricing model',
83
+ examples: ['free', 'freemium', 'subscription', 'one-time', 'usage-based', 'tiered', 'per-seat'],
84
+ },
85
+ price: {
86
+ type: 'number',
87
+ optional: true,
88
+ description: 'Base price',
89
+ },
90
+ currency: {
91
+ type: 'string',
92
+ optional: true,
93
+ description: 'Currency code',
94
+ },
95
+ billingPeriod: {
96
+ type: 'string',
97
+ optional: true,
98
+ description: 'Billing period',
99
+ examples: ['monthly', 'yearly', 'one-time'],
100
+ },
101
+
102
+ // Economics
103
+ cogs: {
104
+ type: 'number',
105
+ optional: true,
106
+ description: 'Cost of goods sold',
107
+ },
108
+ grossMargin: {
109
+ type: 'number',
110
+ optional: true,
111
+ description: 'Gross margin percentage',
112
+ },
113
+
114
+ // Lifecycle
115
+ stage: {
116
+ type: 'string',
117
+ optional: true,
118
+ description: 'Product stage',
119
+ examples: ['concept', 'development', 'alpha', 'beta', 'ga', 'growth', 'mature', 'decline', 'sunset'],
120
+ },
121
+ launchedAt: {
122
+ type: 'date',
123
+ optional: true,
124
+ description: 'Launch date',
125
+ },
126
+ sunsetAt: {
127
+ type: 'date',
128
+ optional: true,
129
+ description: 'Sunset date',
130
+ },
131
+
132
+ // Status
133
+ status: {
134
+ type: 'string',
135
+ description: 'Product status',
136
+ examples: ['draft', 'active', 'paused', 'sunset', 'archived'],
137
+ },
138
+ visibility: {
139
+ type: 'string',
140
+ optional: true,
141
+ description: 'Visibility',
142
+ examples: ['public', 'private', 'beta', 'waitlist'],
143
+ },
144
+ },
145
+
146
+ relationships: {
147
+ business: {
148
+ type: 'Business',
149
+ description: 'Parent business',
150
+ },
151
+ team: {
152
+ type: 'Team',
153
+ required: false,
154
+ description: 'Product team',
155
+ },
156
+ features: {
157
+ type: 'Feature[]',
158
+ description: 'Product features',
159
+ },
160
+ pricingPlans: {
161
+ type: 'PricingPlan[]',
162
+ description: 'Pricing plans',
163
+ },
164
+ roadmap: {
165
+ type: 'RoadmapItem[]',
166
+ description: 'Product roadmap',
167
+ },
168
+ metrics: {
169
+ type: 'KPI[]',
170
+ description: 'Product metrics',
171
+ },
172
+ },
173
+
174
+ actions: [
175
+ 'create',
176
+ 'update',
177
+ 'launch',
178
+ 'pause',
179
+ 'resume',
180
+ 'updatePricing',
181
+ 'addFeature',
182
+ 'removeFeature',
183
+ 'sunset',
184
+ 'archive',
185
+ ],
186
+
187
+ events: [
188
+ 'created',
189
+ 'updated',
190
+ 'launched',
191
+ 'paused',
192
+ 'resumed',
193
+ 'pricingUpdated',
194
+ 'featureAdded',
195
+ 'featureRemoved',
196
+ 'sunset',
197
+ 'archived',
198
+ ],
199
+ }
200
+
201
+ // =============================================================================
202
+ // Service
203
+ // =============================================================================
204
+
205
+ /**
206
+ * Service entity
207
+ *
208
+ * Represents a service offering.
209
+ */
210
+ export const Service: Noun = {
211
+ singular: 'service',
212
+ plural: 'services',
213
+ description: 'A service offering',
214
+
215
+ properties: {
216
+ // Identity
217
+ name: {
218
+ type: 'string',
219
+ description: 'Service name',
220
+ },
221
+ slug: {
222
+ type: 'string',
223
+ optional: true,
224
+ description: 'URL-friendly identifier',
225
+ },
226
+ description: {
227
+ type: 'string',
228
+ optional: true,
229
+ description: 'Service description',
230
+ },
231
+
232
+ // Classification
233
+ type: {
234
+ type: 'string',
235
+ optional: true,
236
+ description: 'Service type',
237
+ examples: ['consulting', 'implementation', 'support', 'training', 'managed', 'professional'],
238
+ },
239
+ category: {
240
+ type: 'string',
241
+ optional: true,
242
+ description: 'Service category',
243
+ },
244
+
245
+ // Market
246
+ targetSegment: {
247
+ type: 'string',
248
+ optional: true,
249
+ description: 'Target customer segment',
250
+ },
251
+ valueProposition: {
252
+ type: 'string',
253
+ optional: true,
254
+ description: 'Value proposition',
255
+ },
256
+
257
+ // Pricing
258
+ pricingModel: {
259
+ type: 'string',
260
+ optional: true,
261
+ description: 'Pricing model',
262
+ examples: ['hourly', 'daily', 'fixed', 'retainer', 'value-based', 'milestone'],
263
+ },
264
+ hourlyRate: {
265
+ type: 'number',
266
+ optional: true,
267
+ description: 'Hourly rate',
268
+ },
269
+ dailyRate: {
270
+ type: 'number',
271
+ optional: true,
272
+ description: 'Daily rate',
273
+ },
274
+ fixedPrice: {
275
+ type: 'number',
276
+ optional: true,
277
+ description: 'Fixed price',
278
+ },
279
+ retainerPrice: {
280
+ type: 'number',
281
+ optional: true,
282
+ description: 'Monthly retainer',
283
+ },
284
+ currency: {
285
+ type: 'string',
286
+ optional: true,
287
+ description: 'Currency code',
288
+ },
289
+
290
+ // Delivery
291
+ deliveryTime: {
292
+ type: 'string',
293
+ optional: true,
294
+ description: 'Typical delivery time',
295
+ },
296
+ deliveryModel: {
297
+ type: 'string',
298
+ optional: true,
299
+ description: 'Delivery model',
300
+ examples: ['onsite', 'remote', 'hybrid'],
301
+ },
302
+
303
+ // SLA
304
+ slaUptime: {
305
+ type: 'number',
306
+ optional: true,
307
+ description: 'SLA uptime percentage',
308
+ },
309
+ slaResponseTime: {
310
+ type: 'string',
311
+ optional: true,
312
+ description: 'SLA response time',
313
+ },
314
+ slaSupportHours: {
315
+ type: 'string',
316
+ optional: true,
317
+ description: 'SLA support hours',
318
+ },
319
+
320
+ // Scope
321
+ inclusions: {
322
+ type: 'string',
323
+ array: true,
324
+ optional: true,
325
+ description: 'What is included',
326
+ },
327
+ exclusions: {
328
+ type: 'string',
329
+ array: true,
330
+ optional: true,
331
+ description: 'What is excluded',
332
+ },
333
+ deliverables: {
334
+ type: 'string',
335
+ array: true,
336
+ optional: true,
337
+ description: 'Deliverables',
338
+ },
339
+
340
+ // Status
341
+ status: {
342
+ type: 'string',
343
+ description: 'Service status',
344
+ examples: ['draft', 'active', 'paused', 'discontinued', 'archived'],
345
+ },
346
+ },
347
+
348
+ relationships: {
349
+ business: {
350
+ type: 'Business',
351
+ description: 'Parent business',
352
+ },
353
+ team: {
354
+ type: 'Team',
355
+ required: false,
356
+ description: 'Service team',
357
+ },
358
+ engagements: {
359
+ type: 'Engagement[]',
360
+ description: 'Active engagements',
361
+ },
362
+ },
363
+
364
+ actions: [
365
+ 'create',
366
+ 'update',
367
+ 'publish',
368
+ 'pause',
369
+ 'resume',
370
+ 'updatePricing',
371
+ 'updateSLA',
372
+ 'discontinue',
373
+ 'archive',
374
+ ],
375
+
376
+ events: [
377
+ 'created',
378
+ 'updated',
379
+ 'published',
380
+ 'paused',
381
+ 'resumed',
382
+ 'pricingUpdated',
383
+ 'slaUpdated',
384
+ 'discontinued',
385
+ 'archived',
386
+ ],
387
+ }
388
+
389
+ // =============================================================================
390
+ // Feature
391
+ // =============================================================================
392
+
393
+ /**
394
+ * Feature entity
395
+ *
396
+ * Represents a product feature or capability.
397
+ */
398
+ export const Feature: Noun = {
399
+ singular: 'feature',
400
+ plural: 'features',
401
+ description: 'A product feature or capability',
402
+
403
+ properties: {
404
+ // Identity
405
+ name: {
406
+ type: 'string',
407
+ description: 'Feature name',
408
+ },
409
+ slug: {
410
+ type: 'string',
411
+ optional: true,
412
+ description: 'URL-friendly identifier',
413
+ },
414
+ description: {
415
+ type: 'string',
416
+ optional: true,
417
+ description: 'Feature description',
418
+ },
419
+
420
+ // Classification
421
+ category: {
422
+ type: 'string',
423
+ optional: true,
424
+ description: 'Feature category',
425
+ },
426
+ type: {
427
+ type: 'string',
428
+ optional: true,
429
+ description: 'Feature type',
430
+ examples: ['core', 'premium', 'add-on', 'beta', 'experimental'],
431
+ },
432
+
433
+ // Value
434
+ benefit: {
435
+ type: 'string',
436
+ optional: true,
437
+ description: 'User benefit',
438
+ },
439
+
440
+ // Availability
441
+ availability: {
442
+ type: 'string',
443
+ optional: true,
444
+ description: 'Availability',
445
+ examples: ['all', 'paid', 'enterprise', 'beta', 'early-access'],
446
+ },
447
+ enabledByDefault: {
448
+ type: 'boolean',
449
+ optional: true,
450
+ description: 'Enabled by default',
451
+ },
452
+
453
+ // Status
454
+ status: {
455
+ type: 'string',
456
+ description: 'Feature status',
457
+ examples: ['planned', 'in-development', 'beta', 'ga', 'deprecated'],
458
+ },
459
+ },
460
+
461
+ relationships: {
462
+ product: {
463
+ type: 'Product',
464
+ description: 'Parent product',
465
+ },
466
+ plans: {
467
+ type: 'PricingPlan[]',
468
+ description: 'Available in plans',
469
+ },
470
+ },
471
+
472
+ actions: [
473
+ 'create',
474
+ 'update',
475
+ 'enable',
476
+ 'disable',
477
+ 'deprecate',
478
+ 'remove',
479
+ ],
480
+
481
+ events: [
482
+ 'created',
483
+ 'updated',
484
+ 'enabled',
485
+ 'disabled',
486
+ 'deprecated',
487
+ 'removed',
488
+ ],
489
+ }
490
+
491
+ // =============================================================================
492
+ // PricingPlan
493
+ // =============================================================================
494
+
495
+ /**
496
+ * PricingPlan entity
497
+ *
498
+ * Represents a pricing plan or tier.
499
+ */
500
+ export const PricingPlan: Noun = {
501
+ singular: 'pricing-plan',
502
+ plural: 'pricing-plans',
503
+ description: 'A pricing plan or tier',
504
+
505
+ properties: {
506
+ // Identity
507
+ name: {
508
+ type: 'string',
509
+ description: 'Plan name',
510
+ },
511
+ slug: {
512
+ type: 'string',
513
+ optional: true,
514
+ description: 'URL-friendly identifier',
515
+ },
516
+ description: {
517
+ type: 'string',
518
+ optional: true,
519
+ description: 'Plan description',
520
+ },
521
+
522
+ // Classification
523
+ tier: {
524
+ type: 'string',
525
+ optional: true,
526
+ description: 'Plan tier',
527
+ examples: ['free', 'starter', 'pro', 'business', 'enterprise', 'custom'],
528
+ },
529
+
530
+ // Pricing
531
+ price: {
532
+ type: 'number',
533
+ description: 'Plan price',
534
+ },
535
+ currency: {
536
+ type: 'string',
537
+ optional: true,
538
+ description: 'Currency code',
539
+ },
540
+ billingPeriod: {
541
+ type: 'string',
542
+ optional: true,
543
+ description: 'Billing period',
544
+ examples: ['monthly', 'yearly', 'one-time'],
545
+ },
546
+ annualDiscount: {
547
+ type: 'number',
548
+ optional: true,
549
+ description: 'Annual discount percentage',
550
+ },
551
+
552
+ // Usage
553
+ includedUnits: {
554
+ type: 'number',
555
+ optional: true,
556
+ description: 'Included units/seats',
557
+ },
558
+ unitPrice: {
559
+ type: 'number',
560
+ optional: true,
561
+ description: 'Price per additional unit',
562
+ },
563
+ usageLimits: {
564
+ type: 'json',
565
+ optional: true,
566
+ description: 'Usage limits',
567
+ },
568
+
569
+ // Trial
570
+ trialDays: {
571
+ type: 'number',
572
+ optional: true,
573
+ description: 'Trial period in days',
574
+ },
575
+
576
+ // Display
577
+ highlighted: {
578
+ type: 'boolean',
579
+ optional: true,
580
+ description: 'Highlight on pricing page',
581
+ },
582
+ displayOrder: {
583
+ type: 'number',
584
+ optional: true,
585
+ description: 'Display order',
586
+ },
587
+
588
+ // Status
589
+ status: {
590
+ type: 'string',
591
+ description: 'Plan status',
592
+ examples: ['active', 'hidden', 'discontinued', 'legacy'],
593
+ },
594
+ },
595
+
596
+ relationships: {
597
+ product: {
598
+ type: 'Product',
599
+ description: 'Parent product',
600
+ },
601
+ features: {
602
+ type: 'Feature[]',
603
+ description: 'Included features',
604
+ },
605
+ subscriptions: {
606
+ type: 'Subscription[]',
607
+ description: 'Active subscriptions',
608
+ },
609
+ },
610
+
611
+ actions: [
612
+ 'create',
613
+ 'update',
614
+ 'publish',
615
+ 'hide',
616
+ 'updatePrice',
617
+ 'addFeature',
618
+ 'removeFeature',
619
+ 'discontinue',
620
+ 'archive',
621
+ ],
622
+
623
+ events: [
624
+ 'created',
625
+ 'updated',
626
+ 'published',
627
+ 'hidden',
628
+ 'priceUpdated',
629
+ 'featureAdded',
630
+ 'featureRemoved',
631
+ 'discontinued',
632
+ 'archived',
633
+ ],
634
+ }
635
+
636
+ // =============================================================================
637
+ // RoadmapItem
638
+ // =============================================================================
639
+
640
+ /**
641
+ * RoadmapItem entity
642
+ *
643
+ * Represents an item on the product roadmap.
644
+ */
645
+ export const RoadmapItem: Noun = {
646
+ singular: 'roadmap-item',
647
+ plural: 'roadmap-items',
648
+ description: 'An item on the product roadmap',
649
+
650
+ properties: {
651
+ // Identity
652
+ name: {
653
+ type: 'string',
654
+ description: 'Item name',
655
+ },
656
+ description: {
657
+ type: 'string',
658
+ optional: true,
659
+ description: 'Item description',
660
+ },
661
+
662
+ // Classification
663
+ type: {
664
+ type: 'string',
665
+ optional: true,
666
+ description: 'Item type',
667
+ examples: ['feature', 'improvement', 'bug-fix', 'refactor', 'infrastructure'],
668
+ },
669
+ category: {
670
+ type: 'string',
671
+ optional: true,
672
+ description: 'Item category',
673
+ },
674
+
675
+ // Timeline
676
+ quarter: {
677
+ type: 'string',
678
+ optional: true,
679
+ description: 'Target quarter (e.g., "Q1 2025")',
680
+ },
681
+ targetDate: {
682
+ type: 'date',
683
+ optional: true,
684
+ description: 'Target date',
685
+ },
686
+ completedAt: {
687
+ type: 'date',
688
+ optional: true,
689
+ description: 'Completion date',
690
+ },
691
+
692
+ // Priority
693
+ priority: {
694
+ type: 'string',
695
+ optional: true,
696
+ description: 'Priority level',
697
+ examples: ['critical', 'high', 'medium', 'low'],
698
+ },
699
+ effort: {
700
+ type: 'string',
701
+ optional: true,
702
+ description: 'Effort estimate',
703
+ examples: ['xs', 's', 'm', 'l', 'xl'],
704
+ },
705
+ impact: {
706
+ type: 'string',
707
+ optional: true,
708
+ description: 'Expected impact',
709
+ examples: ['high', 'medium', 'low'],
710
+ },
711
+
712
+ // Progress
713
+ progress: {
714
+ type: 'number',
715
+ optional: true,
716
+ description: 'Progress percentage (0-100)',
717
+ },
718
+
719
+ // Status
720
+ status: {
721
+ type: 'string',
722
+ description: 'Item status',
723
+ examples: ['idea', 'planned', 'in-progress', 'completed', 'cancelled', 'deferred'],
724
+ },
725
+ visibility: {
726
+ type: 'string',
727
+ optional: true,
728
+ description: 'Public visibility',
729
+ examples: ['public', 'private'],
730
+ },
731
+ },
732
+
733
+ relationships: {
734
+ product: {
735
+ type: 'Product',
736
+ description: 'Parent product',
737
+ },
738
+ feature: {
739
+ type: 'Feature',
740
+ required: false,
741
+ description: 'Related feature',
742
+ },
743
+ owner: {
744
+ type: 'Worker',
745
+ required: false,
746
+ description: 'Item owner',
747
+ },
748
+ },
749
+
750
+ actions: [
751
+ 'create',
752
+ 'update',
753
+ 'schedule',
754
+ 'start',
755
+ 'complete',
756
+ 'defer',
757
+ 'cancel',
758
+ 'archive',
759
+ ],
760
+
761
+ events: [
762
+ 'created',
763
+ 'updated',
764
+ 'scheduled',
765
+ 'started',
766
+ 'completed',
767
+ 'deferred',
768
+ 'cancelled',
769
+ 'archived',
770
+ ],
771
+ }
772
+
773
+ // =============================================================================
774
+ // Exports
775
+ // =============================================================================
776
+
777
+ export const OfferingEntities = {
778
+ Product,
779
+ Service,
780
+ Feature,
781
+ PricingPlan,
782
+ RoadmapItem,
783
+ }
784
+
785
+ export const OfferingCategories = {
786
+ products: ['Product', 'Feature', 'RoadmapItem'],
787
+ services: ['Service'],
788
+ pricing: ['PricingPlan'],
789
+ } as const