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,383 @@
1
+ /**
2
+ * Business Entity Types (Nouns)
3
+ *
4
+ * Comprehensive entity definitions for business-as-code primitives.
5
+ * Each entity follows the Noun pattern with Properties, Actions, and Events.
6
+ *
7
+ * Categories:
8
+ * - business: Core business entities (Business, Vision, Value)
9
+ * - organization: Org structure (Organization, Department, Team, Position, Role, Worker)
10
+ * - goals: Goal tracking (Goal, OKR, KeyResult, KPI, Metric, Initiative)
11
+ * - offerings: Products & services (Product, Service, Feature, PricingPlan, RoadmapItem)
12
+ * - operations: Processes & workflows (Process, ProcessStep, Workflow, WorkflowAction, WorkflowRun, Policy)
13
+ * - financials: Financial entities (Budget, Revenue, Expense, Investment, FinancialPeriod, Forecast)
14
+ * - customers: Customer management (Customer, Account, Contact, Segment, Persona, Interaction)
15
+ * - sales: Sales & revenue (Deal, Pipeline, Stage, Contract, Subscription, Quote, Order, Invoice)
16
+ * - marketing: Marketing & demand gen (Campaign, Lead, Audience, Content, Funnel, FunnelStage, MarketingEvent)
17
+ * - partnerships: Partners & vendors (Partner, Vendor, Affiliate, Partnership, Integration, Reseller)
18
+ * - legal: Legal & compliance (Agreement, License, IntellectualProperty, Compliance, LegalPolicy, Trademark)
19
+ * - risk: Risk management (Risk, Mitigation, Incident, Control, Assessment, Issue)
20
+ * - projects: Project management (Project, Task, Milestone, Sprint, Deliverable, Epic, Story, Resource)
21
+ * - communication: Communication (Meeting, Decision, ActionItem, Announcement, Feedback, Discussion)
22
+ * - assets: Assets & inventory (Asset, Inventory, Equipment, Facility, Software, DataAsset)
23
+ * - market: Market intelligence (Market, Competitor, Trend, Opportunity, SWOT, Industry)
24
+ *
25
+ * @packageDocumentation
26
+ */
27
+
28
+ // =============================================================================
29
+ // Business (Core business entities)
30
+ // =============================================================================
31
+
32
+ export {
33
+ Business,
34
+ Vision,
35
+ Value,
36
+ BusinessEntities,
37
+ BusinessCategories,
38
+ } from './business.js'
39
+
40
+ // =============================================================================
41
+ // Organization (Org structure)
42
+ // =============================================================================
43
+
44
+ export {
45
+ Organization,
46
+ Department,
47
+ Team,
48
+ Position,
49
+ Role,
50
+ Worker,
51
+ OrganizationEntities,
52
+ OrganizationCategories,
53
+ } from './organization.js'
54
+
55
+ // =============================================================================
56
+ // Goals (Goal tracking)
57
+ // =============================================================================
58
+
59
+ export {
60
+ Goal,
61
+ OKR,
62
+ KeyResult,
63
+ KPI,
64
+ Metric,
65
+ Initiative,
66
+ GoalEntities,
67
+ GoalCategories,
68
+ } from './goals.js'
69
+
70
+ // =============================================================================
71
+ // Offerings (Products & Services)
72
+ // =============================================================================
73
+
74
+ export {
75
+ Product,
76
+ Service,
77
+ Feature,
78
+ PricingPlan,
79
+ RoadmapItem,
80
+ OfferingEntities,
81
+ OfferingCategories,
82
+ } from './offerings.js'
83
+
84
+ // =============================================================================
85
+ // Operations (Processes & Workflows)
86
+ // =============================================================================
87
+
88
+ export {
89
+ Process,
90
+ ProcessStep,
91
+ Workflow,
92
+ WorkflowAction,
93
+ WorkflowRun,
94
+ Policy,
95
+ OperationsEntities,
96
+ OperationsCategories,
97
+ } from './operations.js'
98
+
99
+ // =============================================================================
100
+ // Financials (Financial entities)
101
+ // =============================================================================
102
+
103
+ export {
104
+ Budget,
105
+ Revenue,
106
+ Expense,
107
+ Investment,
108
+ FinancialPeriod,
109
+ Forecast,
110
+ FinancialEntities,
111
+ FinancialCategories,
112
+ } from './financials.js'
113
+
114
+ // =============================================================================
115
+ // Customers (Customer management)
116
+ // =============================================================================
117
+
118
+ export {
119
+ Customer,
120
+ Account,
121
+ Contact,
122
+ Segment,
123
+ Persona,
124
+ Interaction,
125
+ CustomerEntities,
126
+ } from './customers.js'
127
+
128
+ // =============================================================================
129
+ // Sales (Sales & revenue)
130
+ // =============================================================================
131
+
132
+ export {
133
+ Deal,
134
+ Pipeline,
135
+ Stage,
136
+ Contract,
137
+ Subscription,
138
+ Quote,
139
+ Order,
140
+ Invoice,
141
+ SalesEntities,
142
+ } from './sales.js'
143
+
144
+ // =============================================================================
145
+ // Marketing (Marketing & demand gen)
146
+ // =============================================================================
147
+
148
+ export {
149
+ Campaign,
150
+ Lead,
151
+ Audience,
152
+ Content,
153
+ Funnel,
154
+ FunnelStage,
155
+ MarketingEvent,
156
+ MarketingEntities,
157
+ } from './marketing.js'
158
+
159
+ // =============================================================================
160
+ // Partnerships (Partners & vendors)
161
+ // =============================================================================
162
+
163
+ export {
164
+ Partner,
165
+ Vendor,
166
+ Affiliate,
167
+ Partnership,
168
+ Integration,
169
+ Reseller,
170
+ PartnershipEntities,
171
+ } from './partnerships.js'
172
+
173
+ // =============================================================================
174
+ // Legal (Legal & compliance)
175
+ // =============================================================================
176
+
177
+ export {
178
+ Agreement,
179
+ License,
180
+ IntellectualProperty,
181
+ Compliance,
182
+ LegalPolicy,
183
+ Trademark,
184
+ LegalEntities,
185
+ } from './legal.js'
186
+
187
+ // =============================================================================
188
+ // Risk (Risk management)
189
+ // =============================================================================
190
+
191
+ export {
192
+ Risk,
193
+ Mitigation,
194
+ Incident,
195
+ Control,
196
+ Assessment,
197
+ Issue,
198
+ RiskEntities,
199
+ } from './risk.js'
200
+
201
+ // =============================================================================
202
+ // Projects (Project management)
203
+ // =============================================================================
204
+
205
+ export {
206
+ Project,
207
+ Task,
208
+ Milestone,
209
+ Sprint,
210
+ Deliverable,
211
+ Epic,
212
+ Story,
213
+ Resource,
214
+ ProjectEntities,
215
+ } from './projects.js'
216
+
217
+ // =============================================================================
218
+ // Planning (Work items, plans - beads-compatible)
219
+ // =============================================================================
220
+
221
+ export {
222
+ WorkItem,
223
+ WorkItemComment,
224
+ WorkItemEvent,
225
+ Comment as PlanningComment,
226
+ Event as PlanningEvent,
227
+ Plan,
228
+ DependencyTypes,
229
+ type DependencyType,
230
+ PlanningEntities,
231
+ } from './planning.js'
232
+
233
+ // =============================================================================
234
+ // Communication (Communication & collaboration)
235
+ // =============================================================================
236
+
237
+ export {
238
+ Meeting,
239
+ Decision,
240
+ ActionItem,
241
+ Announcement,
242
+ Feedback,
243
+ Discussion,
244
+ CommunicationEntities,
245
+ } from './communication.js'
246
+
247
+ // =============================================================================
248
+ // Assets (Assets & inventory)
249
+ // =============================================================================
250
+
251
+ export {
252
+ Asset,
253
+ Inventory,
254
+ Equipment,
255
+ Facility,
256
+ Software,
257
+ DataAsset,
258
+ AssetEntities,
259
+ } from './assets.js'
260
+
261
+ // =============================================================================
262
+ // Market (Market intelligence)
263
+ // =============================================================================
264
+
265
+ export {
266
+ Market,
267
+ Competitor,
268
+ Trend,
269
+ Opportunity,
270
+ SWOT,
271
+ Industry,
272
+ MarketEntities,
273
+ } from './market.js'
274
+
275
+ // =============================================================================
276
+ // All Entities Collection
277
+ // =============================================================================
278
+
279
+ import { BusinessEntities } from './business.js'
280
+ import { OrganizationEntities } from './organization.js'
281
+ import { GoalEntities } from './goals.js'
282
+ import { OfferingEntities } from './offerings.js'
283
+ import { OperationsEntities } from './operations.js'
284
+ import { FinancialEntities } from './financials.js'
285
+ import { CustomerEntities } from './customers.js'
286
+ import { SalesEntities } from './sales.js'
287
+ import { MarketingEntities } from './marketing.js'
288
+ import { PartnershipEntities } from './partnerships.js'
289
+ import { LegalEntities } from './legal.js'
290
+ import { RiskEntities } from './risk.js'
291
+ import { ProjectEntities } from './projects.js'
292
+ import { PlanningEntities } from './planning.js'
293
+ import { CommunicationEntities } from './communication.js'
294
+ import { AssetEntities } from './assets.js'
295
+ import { MarketEntities } from './market.js'
296
+
297
+ /**
298
+ * All business entities organized by category
299
+ */
300
+ export const AllBusinessEntities = {
301
+ business: BusinessEntities,
302
+ organization: OrganizationEntities,
303
+ goals: GoalEntities,
304
+ offerings: OfferingEntities,
305
+ operations: OperationsEntities,
306
+ financials: FinancialEntities,
307
+ customers: CustomerEntities,
308
+ sales: SalesEntities,
309
+ marketing: MarketingEntities,
310
+ partnerships: PartnershipEntities,
311
+ legal: LegalEntities,
312
+ risk: RiskEntities,
313
+ projects: ProjectEntities,
314
+ planning: PlanningEntities,
315
+ communication: CommunicationEntities,
316
+ assets: AssetEntities,
317
+ market: MarketEntities,
318
+ } as const
319
+
320
+ /**
321
+ * All entity category names
322
+ */
323
+ export const BusinessEntityCategories = [
324
+ 'business',
325
+ 'organization',
326
+ 'goals',
327
+ 'offerings',
328
+ 'operations',
329
+ 'financials',
330
+ 'customers',
331
+ 'sales',
332
+ 'marketing',
333
+ 'partnerships',
334
+ 'legal',
335
+ 'risk',
336
+ 'projects',
337
+ 'planning',
338
+ 'communication',
339
+ 'assets',
340
+ 'market',
341
+ ] as const
342
+
343
+ export type BusinessEntityCategory = (typeof BusinessEntityCategories)[number]
344
+
345
+ /**
346
+ * Flat list of all entities for quick access
347
+ */
348
+ export const Entities = {
349
+ // Business
350
+ ...BusinessEntities,
351
+ // Organization
352
+ ...OrganizationEntities,
353
+ // Goals
354
+ ...GoalEntities,
355
+ // Offerings
356
+ ...OfferingEntities,
357
+ // Operations
358
+ ...OperationsEntities,
359
+ // Financials
360
+ ...FinancialEntities,
361
+ // Customers
362
+ ...CustomerEntities,
363
+ // Sales
364
+ ...SalesEntities,
365
+ // Marketing
366
+ ...MarketingEntities,
367
+ // Partnerships
368
+ ...PartnershipEntities,
369
+ // Legal
370
+ ...LegalEntities,
371
+ // Risk
372
+ ...RiskEntities,
373
+ // Projects
374
+ ...ProjectEntities,
375
+ // Planning (beads-compatible work items)
376
+ ...PlanningEntities,
377
+ // Communication
378
+ ...CommunicationEntities,
379
+ // Assets
380
+ ...AssetEntities,
381
+ // Market
382
+ ...MarketEntities,
383
+ } as const