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