business-as-code 2.1.3 → 2.3.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 (260) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +2 -0
  3. package/package.json +16 -13
  4. package/src/dollar.ts +5 -2
  5. package/src/entities/organization.ts +31 -18
  6. package/src/goals.ts +78 -12
  7. package/src/index.ts +48 -18
  8. package/src/kpis.ts +62 -8
  9. package/src/metrics.ts +92 -79
  10. package/src/okrs.ts +120 -20
  11. package/src/organization.ts +12 -15
  12. package/src/process.ts +11 -12
  13. package/src/product.ts +8 -9
  14. package/src/queries.ts +238 -75
  15. package/src/roles.ts +62 -61
  16. package/src/workflow.ts +22 -15
  17. package/test/business.test.ts +282 -0
  18. package/test/dollar.test.ts +270 -0
  19. package/test/entities.test.ts +628 -0
  20. package/test/financials.test.ts +539 -0
  21. package/test/goals.test.ts +451 -0
  22. package/{src → test}/index.test.ts +1 -1
  23. package/test/kpis.test.ts +440 -0
  24. package/test/metrics.test.ts +744 -0
  25. package/test/okrs.test.ts +741 -0
  26. package/test/organization.test.ts +548 -0
  27. package/test/process.test.ts +503 -0
  28. package/test/product.test.ts +430 -0
  29. package/test/queries.test.ts +556 -0
  30. package/test/roles.test.ts +546 -0
  31. package/test/service.test.ts +450 -0
  32. package/test/types.test.ts +1141 -0
  33. package/test/vision.test.ts +214 -0
  34. package/test/workflow.test.ts +501 -0
  35. package/vitest.config.ts +47 -0
  36. package/.turbo/turbo-build.log +0 -5
  37. package/LICENSE +0 -21
  38. package/dist/business.d.ts +0 -62
  39. package/dist/business.d.ts.map +0 -1
  40. package/dist/business.js +0 -109
  41. package/dist/business.js.map +0 -1
  42. package/dist/canvas/activities.d.ts +0 -19
  43. package/dist/canvas/activities.d.ts.map +0 -1
  44. package/dist/canvas/activities.js +0 -20
  45. package/dist/canvas/activities.js.map +0 -1
  46. package/dist/canvas/channels.d.ts +0 -20
  47. package/dist/canvas/channels.d.ts.map +0 -1
  48. package/dist/canvas/channels.js +0 -21
  49. package/dist/canvas/channels.js.map +0 -1
  50. package/dist/canvas/relationships.d.ts +0 -20
  51. package/dist/canvas/relationships.d.ts.map +0 -1
  52. package/dist/canvas/relationships.js +0 -21
  53. package/dist/canvas/relationships.js.map +0 -1
  54. package/dist/canvas/resources.d.ts +0 -20
  55. package/dist/canvas/resources.d.ts.map +0 -1
  56. package/dist/canvas/resources.js +0 -30
  57. package/dist/canvas/resources.js.map +0 -1
  58. package/dist/canvas/revenue.d.ts +0 -22
  59. package/dist/canvas/revenue.d.ts.map +0 -1
  60. package/dist/canvas/revenue.js +0 -30
  61. package/dist/canvas/revenue.js.map +0 -1
  62. package/dist/canvas/segments.d.ts +0 -20
  63. package/dist/canvas/segments.d.ts.map +0 -1
  64. package/dist/canvas/segments.js +0 -28
  65. package/dist/canvas/segments.js.map +0 -1
  66. package/dist/canvas/types.d.ts +0 -232
  67. package/dist/canvas/types.d.ts.map +0 -1
  68. package/dist/canvas/types.js +0 -8
  69. package/dist/canvas/types.js.map +0 -1
  70. package/dist/canvas/value.d.ts +0 -20
  71. package/dist/canvas/value.d.ts.map +0 -1
  72. package/dist/canvas/value.js +0 -21
  73. package/dist/canvas/value.js.map +0 -1
  74. package/dist/dollar.d.ts +0 -60
  75. package/dist/dollar.d.ts.map +0 -1
  76. package/dist/dollar.js +0 -107
  77. package/dist/dollar.js.map +0 -1
  78. package/dist/entities/assets.d.ts +0 -21
  79. package/dist/entities/assets.d.ts.map +0 -1
  80. package/dist/entities/assets.js +0 -323
  81. package/dist/entities/assets.js.map +0 -1
  82. package/dist/entities/business.d.ts +0 -36
  83. package/dist/entities/business.d.ts.map +0 -1
  84. package/dist/entities/business.js +0 -370
  85. package/dist/entities/business.js.map +0 -1
  86. package/dist/entities/communication.d.ts +0 -21
  87. package/dist/entities/communication.d.ts.map +0 -1
  88. package/dist/entities/communication.js +0 -255
  89. package/dist/entities/communication.js.map +0 -1
  90. package/dist/entities/customers.d.ts +0 -58
  91. package/dist/entities/customers.d.ts.map +0 -1
  92. package/dist/entities/customers.js +0 -989
  93. package/dist/entities/customers.js.map +0 -1
  94. package/dist/entities/financials.d.ts +0 -59
  95. package/dist/entities/financials.d.ts.map +0 -1
  96. package/dist/entities/financials.js +0 -932
  97. package/dist/entities/financials.js.map +0 -1
  98. package/dist/entities/goals.d.ts +0 -58
  99. package/dist/entities/goals.d.ts.map +0 -1
  100. package/dist/entities/goals.js +0 -800
  101. package/dist/entities/goals.js.map +0 -1
  102. package/dist/entities/index.d.ts +0 -299
  103. package/dist/entities/index.d.ts.map +0 -1
  104. package/dist/entities/index.js +0 -198
  105. package/dist/entities/index.js.map +0 -1
  106. package/dist/entities/legal.d.ts +0 -21
  107. package/dist/entities/legal.d.ts.map +0 -1
  108. package/dist/entities/legal.js +0 -301
  109. package/dist/entities/legal.js.map +0 -1
  110. package/dist/entities/market.d.ts +0 -21
  111. package/dist/entities/market.d.ts.map +0 -1
  112. package/dist/entities/market.js +0 -301
  113. package/dist/entities/market.js.map +0 -1
  114. package/dist/entities/marketing.d.ts +0 -67
  115. package/dist/entities/marketing.d.ts.map +0 -1
  116. package/dist/entities/marketing.js +0 -1157
  117. package/dist/entities/marketing.js.map +0 -1
  118. package/dist/entities/offerings.d.ts +0 -51
  119. package/dist/entities/offerings.d.ts.map +0 -1
  120. package/dist/entities/offerings.js +0 -727
  121. package/dist/entities/offerings.js.map +0 -1
  122. package/dist/entities/operations.d.ts +0 -58
  123. package/dist/entities/operations.d.ts.map +0 -1
  124. package/dist/entities/operations.js +0 -787
  125. package/dist/entities/operations.js.map +0 -1
  126. package/dist/entities/organization.d.ts +0 -57
  127. package/dist/entities/organization.d.ts.map +0 -1
  128. package/dist/entities/organization.js +0 -807
  129. package/dist/entities/organization.js.map +0 -1
  130. package/dist/entities/partnerships.d.ts +0 -21
  131. package/dist/entities/partnerships.d.ts.map +0 -1
  132. package/dist/entities/partnerships.js +0 -300
  133. package/dist/entities/partnerships.js.map +0 -1
  134. package/dist/entities/planning.d.ts +0 -0
  135. package/dist/entities/planning.d.ts.map +0 -1
  136. package/dist/entities/planning.js +0 -271
  137. package/dist/entities/planning.js.map +0 -1
  138. package/dist/entities/projects.d.ts +0 -25
  139. package/dist/entities/projects.d.ts.map +0 -1
  140. package/dist/entities/projects.js +0 -349
  141. package/dist/entities/projects.js.map +0 -1
  142. package/dist/entities/risk.d.ts +0 -21
  143. package/dist/entities/risk.d.ts.map +0 -1
  144. package/dist/entities/risk.js +0 -293
  145. package/dist/entities/risk.js.map +0 -1
  146. package/dist/entities/sales.d.ts +0 -72
  147. package/dist/entities/sales.d.ts.map +0 -1
  148. package/dist/entities/sales.js +0 -1248
  149. package/dist/entities/sales.js.map +0 -1
  150. package/dist/financials.d.ts +0 -130
  151. package/dist/financials.d.ts.map +0 -1
  152. package/dist/financials.js +0 -297
  153. package/dist/financials.js.map +0 -1
  154. package/dist/goals.d.ts +0 -87
  155. package/dist/goals.d.ts.map +0 -1
  156. package/dist/goals.js +0 -215
  157. package/dist/goals.js.map +0 -1
  158. package/dist/index.d.ts +0 -97
  159. package/dist/index.d.ts.map +0 -1
  160. package/dist/index.js +0 -132
  161. package/dist/index.js.map +0 -1
  162. package/dist/kpis.d.ts +0 -118
  163. package/dist/kpis.d.ts.map +0 -1
  164. package/dist/kpis.js +0 -232
  165. package/dist/kpis.js.map +0 -1
  166. package/dist/metrics.d.ts +0 -448
  167. package/dist/metrics.d.ts.map +0 -1
  168. package/dist/metrics.js +0 -325
  169. package/dist/metrics.js.map +0 -1
  170. package/dist/okrs.d.ts +0 -123
  171. package/dist/okrs.d.ts.map +0 -1
  172. package/dist/okrs.js +0 -269
  173. package/dist/okrs.js.map +0 -1
  174. package/dist/organization.d.ts +0 -585
  175. package/dist/organization.d.ts.map +0 -1
  176. package/dist/organization.js +0 -173
  177. package/dist/organization.js.map +0 -1
  178. package/dist/process.d.ts +0 -112
  179. package/dist/process.d.ts.map +0 -1
  180. package/dist/process.js +0 -241
  181. package/dist/process.js.map +0 -1
  182. package/dist/product.d.ts +0 -85
  183. package/dist/product.d.ts.map +0 -1
  184. package/dist/product.js +0 -145
  185. package/dist/product.js.map +0 -1
  186. package/dist/queries.d.ts +0 -304
  187. package/dist/queries.d.ts.map +0 -1
  188. package/dist/queries.js +0 -415
  189. package/dist/queries.js.map +0 -1
  190. package/dist/roles.d.ts +0 -340
  191. package/dist/roles.d.ts.map +0 -1
  192. package/dist/roles.js +0 -255
  193. package/dist/roles.js.map +0 -1
  194. package/dist/service.d.ts +0 -61
  195. package/dist/service.d.ts.map +0 -1
  196. package/dist/service.js +0 -140
  197. package/dist/service.js.map +0 -1
  198. package/dist/types.d.ts +0 -459
  199. package/dist/types.d.ts.map +0 -1
  200. package/dist/types.js +0 -5
  201. package/dist/types.js.map +0 -1
  202. package/dist/vision.d.ts +0 -38
  203. package/dist/vision.d.ts.map +0 -1
  204. package/dist/vision.js +0 -68
  205. package/dist/vision.js.map +0 -1
  206. package/dist/workflow.d.ts +0 -115
  207. package/dist/workflow.d.ts.map +0 -1
  208. package/dist/workflow.js +0 -247
  209. package/dist/workflow.js.map +0 -1
  210. package/src/business.js +0 -108
  211. package/src/canvas/activities.ts +0 -32
  212. package/src/canvas/canvas.ts +0 -482
  213. package/src/canvas/channels.ts +0 -34
  214. package/src/canvas/costs.ts +0 -43
  215. package/src/canvas/economics.ts +0 -99
  216. package/src/canvas/index.ts +0 -206
  217. package/src/canvas/partnerships.ts +0 -34
  218. package/src/canvas/projections.ts +0 -141
  219. package/src/canvas/relationships.ts +0 -34
  220. package/src/canvas/resources.ts +0 -43
  221. package/src/canvas/revenue.ts +0 -56
  222. package/src/canvas/segments.ts +0 -42
  223. package/src/canvas/types.ts +0 -363
  224. package/src/canvas/value.ts +0 -34
  225. package/src/dollar.js +0 -106
  226. package/src/entities/assets.js +0 -322
  227. package/src/entities/business.js +0 -369
  228. package/src/entities/communication.js +0 -254
  229. package/src/entities/customers.js +0 -988
  230. package/src/entities/financials.js +0 -931
  231. package/src/entities/goals.js +0 -799
  232. package/src/entities/index.js +0 -197
  233. package/src/entities/legal.js +0 -300
  234. package/src/entities/market.js +0 -300
  235. package/src/entities/marketing.js +0 -1156
  236. package/src/entities/offerings.js +0 -726
  237. package/src/entities/operations.js +0 -786
  238. package/src/entities/organization.js +0 -806
  239. package/src/entities/partnerships.js +0 -299
  240. package/src/entities/planning.js +0 -270
  241. package/src/entities/projects.js +0 -348
  242. package/src/entities/risk.js +0 -292
  243. package/src/entities/sales.js +0 -1247
  244. package/src/financials.js +0 -296
  245. package/src/goals.js +0 -214
  246. package/src/index.js +0 -131
  247. package/src/index.test.js +0 -274
  248. package/src/kpis.js +0 -231
  249. package/src/metrics.js +0 -324
  250. package/src/okrs.js +0 -268
  251. package/src/organization.js +0 -172
  252. package/src/process.js +0 -240
  253. package/src/product.js +0 -144
  254. package/src/queries.js +0 -414
  255. package/src/roles.js +0 -254
  256. package/src/service.js +0 -139
  257. package/src/types.js +0 -4
  258. package/src/vision.js +0 -67
  259. package/src/workflow.js +0 -246
  260. package/tests/canvas.test.ts +0 -842
@@ -1,369 +0,0 @@
1
- /**
2
- * Business Entity Types (Nouns)
3
- *
4
- * Core business entities: Business, Vision, Mission, Values.
5
- *
6
- * @packageDocumentation
7
- */
8
- // =============================================================================
9
- // Business
10
- // =============================================================================
11
- /**
12
- * Business entity
13
- *
14
- * Represents a company, startup, or business unit.
15
- */
16
- export const Business = {
17
- singular: 'business',
18
- plural: 'businesses',
19
- description: 'A company, startup, or business unit',
20
- properties: {
21
- // Identity
22
- name: {
23
- type: 'string',
24
- description: 'Business name',
25
- },
26
- legalName: {
27
- type: 'string',
28
- optional: true,
29
- description: 'Legal entity name',
30
- },
31
- slug: {
32
- type: 'string',
33
- optional: true,
34
- description: 'URL-friendly identifier',
35
- },
36
- // Type
37
- type: {
38
- type: 'string',
39
- optional: true,
40
- description: 'Business type',
41
- examples: ['startup', 'smb', 'enterprise', 'agency', 'nonprofit', 'government'],
42
- },
43
- stage: {
44
- type: 'string',
45
- optional: true,
46
- description: 'Business stage',
47
- examples: ['idea', 'pre-seed', 'seed', 'series-a', 'series-b', 'growth', 'mature'],
48
- },
49
- industry: {
50
- type: 'string',
51
- optional: true,
52
- description: 'Industry or sector',
53
- },
54
- // Purpose
55
- mission: {
56
- type: 'string',
57
- optional: true,
58
- description: 'Mission statement',
59
- },
60
- vision: {
61
- type: 'string',
62
- optional: true,
63
- description: 'Vision statement',
64
- },
65
- values: {
66
- type: 'string',
67
- array: true,
68
- optional: true,
69
- description: 'Core values',
70
- },
71
- tagline: {
72
- type: 'string',
73
- optional: true,
74
- description: 'Business tagline or slogan',
75
- },
76
- // Market
77
- targetMarket: {
78
- type: 'string',
79
- optional: true,
80
- description: 'Target market description',
81
- },
82
- customerSegments: {
83
- type: 'string',
84
- array: true,
85
- optional: true,
86
- description: 'Customer segments',
87
- },
88
- // Location
89
- headquarters: {
90
- type: 'string',
91
- optional: true,
92
- description: 'Headquarters location',
93
- },
94
- locations: {
95
- type: 'string',
96
- array: true,
97
- optional: true,
98
- description: 'Office locations',
99
- },
100
- timezone: {
101
- type: 'string',
102
- optional: true,
103
- description: 'Primary timezone',
104
- },
105
- // Size & Scale
106
- teamSize: {
107
- type: 'number',
108
- optional: true,
109
- description: 'Number of team members',
110
- },
111
- headcount: {
112
- type: 'number',
113
- optional: true,
114
- description: 'Total headcount including contractors',
115
- },
116
- // Dates
117
- foundedAt: {
118
- type: 'date',
119
- optional: true,
120
- description: 'Founding date',
121
- },
122
- incorporatedAt: {
123
- type: 'date',
124
- optional: true,
125
- description: 'Incorporation date',
126
- },
127
- // Contact
128
- website: {
129
- type: 'url',
130
- optional: true,
131
- description: 'Business website',
132
- },
133
- email: {
134
- type: 'string',
135
- optional: true,
136
- description: 'Contact email',
137
- },
138
- phone: {
139
- type: 'string',
140
- optional: true,
141
- description: 'Contact phone',
142
- },
143
- // Status
144
- status: {
145
- type: 'string',
146
- optional: true,
147
- description: 'Business status',
148
- examples: ['active', 'inactive', 'acquired', 'closed'],
149
- },
150
- },
151
- relationships: {
152
- organization: {
153
- type: 'Organization',
154
- description: 'Organizational structure',
155
- },
156
- products: {
157
- type: 'Product[]',
158
- description: 'Product offerings',
159
- },
160
- services: {
161
- type: 'Service[]',
162
- description: 'Service offerings',
163
- },
164
- goals: {
165
- type: 'Goal[]',
166
- description: 'Business goals',
167
- },
168
- okrs: {
169
- type: 'OKR[]',
170
- description: 'Objectives and key results',
171
- },
172
- kpis: {
173
- type: 'KPI[]',
174
- description: 'Key performance indicators',
175
- },
176
- financials: {
177
- type: 'FinancialPeriod[]',
178
- description: 'Financial records',
179
- },
180
- },
181
- actions: [
182
- 'create',
183
- 'update',
184
- 'launch',
185
- 'pivot',
186
- 'scale',
187
- 'acquire',
188
- 'merge',
189
- 'close',
190
- 'archive',
191
- ],
192
- events: [
193
- 'created',
194
- 'updated',
195
- 'launched',
196
- 'pivoted',
197
- 'scaled',
198
- 'acquired',
199
- 'merged',
200
- 'closed',
201
- 'archived',
202
- ],
203
- };
204
- // =============================================================================
205
- // Vision
206
- // =============================================================================
207
- /**
208
- * Vision entity
209
- *
210
- * Represents a long-term vision statement with success indicators.
211
- */
212
- export const Vision = {
213
- singular: 'vision',
214
- plural: 'visions',
215
- description: 'A long-term vision statement with success indicators',
216
- properties: {
217
- // Content
218
- statement: {
219
- type: 'string',
220
- description: 'Vision statement',
221
- },
222
- description: {
223
- type: 'string',
224
- optional: true,
225
- description: 'Expanded description',
226
- },
227
- // Timeframe
228
- timeframe: {
229
- type: 'string',
230
- optional: true,
231
- description: 'Target timeframe (e.g., "5 years", "2030")',
232
- },
233
- targetDate: {
234
- type: 'date',
235
- optional: true,
236
- description: 'Target achievement date',
237
- },
238
- // Success
239
- successIndicators: {
240
- type: 'string',
241
- array: true,
242
- optional: true,
243
- description: 'Indicators of success',
244
- },
245
- // Status
246
- status: {
247
- type: 'string',
248
- optional: true,
249
- description: 'Vision status',
250
- examples: ['draft', 'active', 'achieved', 'revised', 'abandoned'],
251
- },
252
- progress: {
253
- type: 'number',
254
- optional: true,
255
- description: 'Progress percentage (0-100)',
256
- },
257
- },
258
- relationships: {
259
- business: {
260
- type: 'Business',
261
- description: 'Parent business',
262
- },
263
- goals: {
264
- type: 'Goal[]',
265
- description: 'Supporting goals',
266
- },
267
- },
268
- actions: [
269
- 'create',
270
- 'update',
271
- 'activate',
272
- 'revise',
273
- 'achieve',
274
- 'abandon',
275
- 'archive',
276
- ],
277
- events: [
278
- 'created',
279
- 'updated',
280
- 'activated',
281
- 'revised',
282
- 'achieved',
283
- 'abandoned',
284
- 'archived',
285
- ],
286
- };
287
- // =============================================================================
288
- // Value
289
- // =============================================================================
290
- /**
291
- * Value entity
292
- *
293
- * Represents a core organizational value.
294
- */
295
- export const Value = {
296
- singular: 'value',
297
- plural: 'values',
298
- description: 'A core organizational value',
299
- properties: {
300
- // Identity
301
- name: {
302
- type: 'string',
303
- description: 'Value name',
304
- },
305
- description: {
306
- type: 'string',
307
- optional: true,
308
- description: 'Value description',
309
- },
310
- // Behaviors
311
- behaviors: {
312
- type: 'string',
313
- array: true,
314
- optional: true,
315
- description: 'Example behaviors demonstrating this value',
316
- },
317
- antiPatterns: {
318
- type: 'string',
319
- array: true,
320
- optional: true,
321
- description: 'Behaviors that violate this value',
322
- },
323
- // Priority
324
- priority: {
325
- type: 'number',
326
- optional: true,
327
- description: 'Priority order',
328
- },
329
- // Status
330
- status: {
331
- type: 'string',
332
- optional: true,
333
- description: 'Value status',
334
- examples: ['active', 'deprecated'],
335
- },
336
- },
337
- relationships: {
338
- business: {
339
- type: 'Business',
340
- description: 'Parent business',
341
- },
342
- },
343
- actions: [
344
- 'create',
345
- 'update',
346
- 'prioritize',
347
- 'deprecate',
348
- 'archive',
349
- ],
350
- events: [
351
- 'created',
352
- 'updated',
353
- 'prioritized',
354
- 'deprecated',
355
- 'archived',
356
- ],
357
- };
358
- // =============================================================================
359
- // Exports
360
- // =============================================================================
361
- export const BusinessEntities = {
362
- Business,
363
- Vision,
364
- Value,
365
- };
366
- export const BusinessCategories = {
367
- core: ['Business'],
368
- purpose: ['Vision', 'Value'],
369
- };
@@ -1,254 +0,0 @@
1
- /**
2
- * Communication & Collaboration Entities
3
- * Meeting, Decision, ActionItem, Announcement, Feedback, Discussion
4
- */
5
- export const Meeting = {
6
- singular: 'meeting',
7
- plural: 'meetings',
8
- description: 'A scheduled meeting or event',
9
- properties: {
10
- name: { type: 'string', description: 'Meeting name' },
11
- description: { type: 'string', description: 'Meeting description' },
12
- type: { type: 'string', description: 'Type of meeting', examples: ['one-on-one', 'team', 'all-hands', 'standup', 'planning', 'review', 'retrospective', 'interview', 'client', 'board', 'workshop', 'training'] },
13
- status: { type: 'string', description: 'Meeting status', examples: ['scheduled', 'confirmed', 'in-progress', 'completed', 'cancelled', 'rescheduled', 'no-show'] },
14
- recurring: { type: 'boolean', description: 'Is recurring meeting' },
15
- recurrencePattern: { type: 'string', description: 'Recurrence pattern', examples: ['daily', 'weekly', 'biweekly', 'monthly', 'quarterly'], optional: true },
16
- startTime: { type: 'date', description: 'Start date and time' },
17
- endTime: { type: 'date', description: 'End date and time' },
18
- duration: { type: 'number', description: 'Duration in minutes' },
19
- timezone: { type: 'string', description: 'Meeting timezone' },
20
- location: { type: 'string', description: 'Physical location', optional: true },
21
- virtualLink: { type: 'string', description: 'Virtual meeting link', optional: true },
22
- platform: { type: 'string', description: 'Meeting platform', examples: ['zoom', 'teams', 'meet', 'webex', 'in-person', 'hybrid'] },
23
- organizer: { type: 'string', description: 'Meeting organizer' },
24
- attendees: { type: 'string[]', description: 'Attendees list' },
25
- requiredAttendees: { type: 'string[]', description: 'Required attendees' },
26
- optionalAttendees: { type: 'string[]', description: 'Optional attendees' },
27
- actualAttendees: { type: 'string[]', description: 'Actual attendees' },
28
- agenda: { type: 'string[]', description: 'Meeting agenda items' },
29
- objectives: { type: 'string[]', description: 'Meeting objectives' },
30
- notes: { type: 'string', description: 'Meeting notes', optional: true },
31
- notesUrl: { type: 'string', description: 'Notes document URL', optional: true },
32
- recordingUrl: { type: 'string', description: 'Recording URL', optional: true },
33
- transcriptUrl: { type: 'string', description: 'Transcript URL', optional: true },
34
- calendarEventId: { type: 'string', description: 'Calendar event ID', optional: true },
35
- reminderMinutes: { type: 'number', description: 'Reminder before meeting (minutes)' },
36
- tags: { type: 'string[]', description: 'Meeting tags' },
37
- metadata: { type: 'object', description: 'Additional metadata', optional: true },
38
- },
39
- relationships: {
40
- decisions: { type: 'decision[]', description: 'Decisions made', backref: 'meeting' },
41
- actionItems: { type: 'actionItem[]', description: 'Action items', backref: 'meeting' },
42
- project: { type: 'project', description: 'Related project', backref: 'meetings' },
43
- deal: { type: 'deal', description: 'Related deal', backref: 'meetings' },
44
- customer: { type: 'customer', description: 'Related customer', backref: 'meetings' },
45
- series: { type: 'meeting', description: 'Parent series', backref: 'instances' },
46
- instances: { type: 'meeting[]', description: 'Series instances', backref: 'series' },
47
- },
48
- actions: ['create', 'update', 'schedule', 'reschedule', 'cancel', 'start', 'end', 'summarize', 'record'],
49
- events: ['created', 'updated', 'scheduled', 'rescheduled', 'cancelled', 'started', 'ended', 'summarized', 'recorded'],
50
- };
51
- export const Decision = {
52
- singular: 'decision',
53
- plural: 'decisions',
54
- description: 'A documented business decision',
55
- properties: {
56
- name: { type: 'string', description: 'Decision title' },
57
- description: { type: 'string', description: 'Decision description' },
58
- type: { type: 'string', description: 'Type of decision', examples: ['strategic', 'tactical', 'operational', 'technical', 'policy', 'resource', 'budget', 'hiring', 'process'] },
59
- status: { type: 'string', description: 'Decision status', examples: ['proposed', 'under-review', 'approved', 'rejected', 'deferred', 'superseded', 'implemented'] },
60
- outcome: { type: 'string', description: 'Decision outcome' },
61
- rationale: { type: 'string', description: 'Decision rationale' },
62
- alternatives: { type: 'string[]', description: 'Alternatives considered' },
63
- impact: { type: 'string', description: 'Impact assessment' },
64
- risks: { type: 'string[]', description: 'Associated risks' },
65
- benefits: { type: 'string[]', description: 'Expected benefits' },
66
- constraints: { type: 'string[]', description: 'Constraints considered' },
67
- stakeholders: { type: 'string[]', description: 'Stakeholders consulted' },
68
- decisionMaker: { type: 'string', description: 'Decision maker' },
69
- approvers: { type: 'string[]', description: 'Required approvers' },
70
- proposedBy: { type: 'string', description: 'Proposed by' },
71
- proposedDate: { type: 'date', description: 'Date proposed' },
72
- decidedDate: { type: 'date', description: 'Date decided' },
73
- implementationDate: { type: 'date', description: 'Target implementation date', optional: true },
74
- reviewDate: { type: 'date', description: 'Review date', optional: true },
75
- expirationDate: { type: 'date', description: 'Decision expiration', optional: true },
76
- documentUrl: { type: 'string', description: 'Decision document URL' },
77
- category: { type: 'string', description: 'Decision category' },
78
- priority: { type: 'string', description: 'Decision priority', examples: ['critical', 'high', 'medium', 'low'] },
79
- reversible: { type: 'boolean', description: 'Is reversible' },
80
- notes: { type: 'string', description: 'Additional notes', optional: true },
81
- tags: { type: 'string[]', description: 'Decision tags' },
82
- metadata: { type: 'object', description: 'Additional metadata', optional: true },
83
- },
84
- relationships: {
85
- meeting: { type: 'meeting', description: 'Decision meeting', backref: 'decisions' },
86
- actionItems: { type: 'actionItem[]', description: 'Follow-up actions', backref: 'decision' },
87
- project: { type: 'project', description: 'Related project', backref: 'decisions' },
88
- supersedes: { type: 'decision', description: 'Previous decision', backref: 'supersededBy' },
89
- supersededBy: { type: 'decision', description: 'Superseding decision', backref: 'supersedes' },
90
- relatedDecisions: { type: 'decision[]', description: 'Related decisions', backref: 'relatedDecisions' },
91
- },
92
- actions: ['create', 'update', 'propose', 'review', 'approve', 'reject', 'defer', 'implement', 'supersede', 'archive'],
93
- events: ['created', 'updated', 'proposed', 'reviewed', 'approved', 'rejected', 'deferred', 'implemented', 'superseded', 'archived'],
94
- };
95
- export const ActionItem = {
96
- singular: 'actionItem',
97
- plural: 'actionItems',
98
- description: 'An action item or follow-up task',
99
- properties: {
100
- name: { type: 'string', description: 'Action item title' },
101
- description: { type: 'string', description: 'Action item description' },
102
- status: { type: 'string', description: 'Action item status', examples: ['pending', 'in-progress', 'completed', 'cancelled', 'blocked', 'deferred'] },
103
- priority: { type: 'string', description: 'Priority level', examples: ['critical', 'high', 'medium', 'low'] },
104
- source: { type: 'string', description: 'Source of action item', examples: ['meeting', 'email', 'decision', 'review', 'audit', 'incident'] },
105
- assignee: { type: 'string', description: 'Assigned person' },
106
- assignedBy: { type: 'string', description: 'Assigned by' },
107
- collaborators: { type: 'string[]', description: 'Collaborators' },
108
- dueDate: { type: 'date', description: 'Due date' },
109
- completedDate: { type: 'date', description: 'Completion date', optional: true },
110
- createdDate: { type: 'date', description: 'Creation date' },
111
- context: { type: 'string', description: 'Context or background' },
112
- outcome: { type: 'string', description: 'Expected outcome' },
113
- actualOutcome: { type: 'string', description: 'Actual outcome', optional: true },
114
- blockers: { type: 'string[]', description: 'Current blockers' },
115
- progress: { type: 'number', description: 'Progress percentage' },
116
- notes: { type: 'string', description: 'Additional notes', optional: true },
117
- tags: { type: 'string[]', description: 'Action item tags' },
118
- metadata: { type: 'object', description: 'Additional metadata', optional: true },
119
- },
120
- relationships: {
121
- meeting: { type: 'meeting', description: 'Source meeting', backref: 'actionItems' },
122
- decision: { type: 'decision', description: 'Related decision', backref: 'actionItems' },
123
- task: { type: 'task', description: 'Linked task', backref: 'actionItem' },
124
- project: { type: 'project', description: 'Related project', backref: 'actionItems' },
125
- dependencies: { type: 'actionItem[]', description: 'Dependencies', backref: 'dependents' },
126
- dependents: { type: 'actionItem[]', description: 'Dependent items', backref: 'dependencies' },
127
- },
128
- actions: ['create', 'update', 'assign', 'reassign', 'start', 'complete', 'cancel', 'defer', 'escalate'],
129
- events: ['created', 'updated', 'assigned', 'reassigned', 'started', 'completed', 'cancelled', 'deferred', 'escalated'],
130
- };
131
- export const Announcement = {
132
- singular: 'announcement',
133
- plural: 'announcements',
134
- description: 'A company-wide or team announcement',
135
- properties: {
136
- title: { type: 'string', description: 'Announcement title' },
137
- content: { type: 'string', description: 'Announcement content' },
138
- summary: { type: 'string', description: 'Brief summary' },
139
- type: { type: 'string', description: 'Type of announcement', examples: ['general', 'product', 'company', 'HR', 'policy', 'event', 'milestone', 'emergency', 'recognition'] },
140
- status: { type: 'string', description: 'Announcement status', examples: ['draft', 'scheduled', 'published', 'archived', 'recalled'] },
141
- priority: { type: 'string', description: 'Priority level', examples: ['urgent', 'high', 'normal', 'low'] },
142
- audience: { type: 'string[]', description: 'Target audience', examples: ['all', 'engineering', 'sales', 'leadership', 'specific-team'] },
143
- channels: { type: 'string[]', description: 'Distribution channels', examples: ['email', 'slack', 'intranet', 'all-hands', 'newsletter'] },
144
- author: { type: 'string', description: 'Author' },
145
- approver: { type: 'string', description: 'Approver', optional: true },
146
- publishDate: { type: 'date', description: 'Publish date' },
147
- expirationDate: { type: 'date', description: 'Expiration date', optional: true },
148
- acknowledgmentRequired: { type: 'boolean', description: 'Requires acknowledgment' },
149
- acknowledgmentCount: { type: 'number', description: 'Acknowledgment count' },
150
- viewCount: { type: 'number', description: 'View count' },
151
- attachments: { type: 'string[]', description: 'Attachment URLs' },
152
- featured: { type: 'boolean', description: 'Is featured/pinned' },
153
- comments: { type: 'boolean', description: 'Comments enabled' },
154
- notes: { type: 'string', description: 'Internal notes', optional: true },
155
- tags: { type: 'string[]', description: 'Announcement tags' },
156
- metadata: { type: 'object', description: 'Additional metadata', optional: true },
157
- },
158
- relationships: {
159
- department: { type: 'department', description: 'Source department', backref: 'announcements' },
160
- relatedAnnouncements: { type: 'announcement[]', description: 'Related announcements', backref: 'relatedAnnouncements' },
161
- },
162
- actions: ['create', 'update', 'draft', 'schedule', 'publish', 'recall', 'archive', 'acknowledge', 'feature'],
163
- events: ['created', 'updated', 'drafted', 'scheduled', 'published', 'recalled', 'archived', 'acknowledged', 'featured'],
164
- };
165
- export const Feedback = {
166
- singular: 'feedback',
167
- plural: 'feedbacks',
168
- description: 'Feedback from customers, employees, or stakeholders',
169
- properties: {
170
- title: { type: 'string', description: 'Feedback title' },
171
- content: { type: 'string', description: 'Feedback content' },
172
- type: { type: 'string', description: 'Type of feedback', examples: ['feature-request', 'bug-report', 'complaint', 'praise', 'suggestion', 'review', 'survey-response', 'NPS'] },
173
- source: { type: 'string', description: 'Feedback source', examples: ['customer', 'employee', 'partner', 'support', 'sales', 'survey', 'social', 'review-site'] },
174
- status: { type: 'string', description: 'Feedback status', examples: ['new', 'acknowledged', 'under-review', 'in-progress', 'resolved', 'declined', 'archived'] },
175
- sentiment: { type: 'string', description: 'Sentiment analysis', examples: ['positive', 'neutral', 'negative', 'mixed'] },
176
- rating: { type: 'number', description: 'Rating score (1-5 or 1-10)' },
177
- npsScore: { type: 'number', description: 'NPS score (-100 to 100)', optional: true },
178
- category: { type: 'string', description: 'Feedback category', examples: ['product', 'service', 'support', 'pricing', 'UX', 'performance', 'documentation'] },
179
- priority: { type: 'string', description: 'Priority level', examples: ['critical', 'high', 'medium', 'low'] },
180
- submitter: { type: 'string', description: 'Feedback submitter' },
181
- submitterEmail: { type: 'string', description: 'Submitter email', optional: true },
182
- submitterType: { type: 'string', description: 'Submitter type', examples: ['customer', 'prospect', 'employee', 'partner', 'anonymous'] },
183
- submittedDate: { type: 'date', description: 'Submission date' },
184
- assignee: { type: 'string', description: 'Assigned handler' },
185
- response: { type: 'string', description: 'Response to feedback', optional: true },
186
- responseDate: { type: 'date', description: 'Response date', optional: true },
187
- resolvedDate: { type: 'date', description: 'Resolution date', optional: true },
188
- productArea: { type: 'string', description: 'Related product area' },
189
- feature: { type: 'string', description: 'Related feature', optional: true },
190
- channel: { type: 'string', description: 'Submission channel' },
191
- publicUrl: { type: 'string', description: 'Public URL if applicable', optional: true },
192
- votes: { type: 'number', description: 'Vote count (for public feedback)' },
193
- notes: { type: 'string', description: 'Internal notes', optional: true },
194
- tags: { type: 'string[]', description: 'Feedback tags' },
195
- metadata: { type: 'object', description: 'Additional metadata', optional: true },
196
- },
197
- relationships: {
198
- customer: { type: 'customer', description: 'Related customer', backref: 'feedback' },
199
- product: { type: 'product', description: 'Related product', backref: 'feedback' },
200
- feature: { type: 'feature', description: 'Related feature', backref: 'feedback' },
201
- task: { type: 'task', description: 'Created task', backref: 'feedback' },
202
- relatedFeedback: { type: 'feedback[]', description: 'Related feedback', backref: 'relatedFeedback' },
203
- },
204
- actions: ['create', 'update', 'acknowledge', 'assign', 'respond', 'resolve', 'decline', 'archive', 'merge', 'upvote'],
205
- events: ['created', 'updated', 'acknowledged', 'assigned', 'responded', 'resolved', 'declined', 'archived', 'merged', 'upvoted'],
206
- };
207
- export const Discussion = {
208
- singular: 'discussion',
209
- plural: 'discussions',
210
- description: 'A threaded discussion or conversation',
211
- properties: {
212
- title: { type: 'string', description: 'Discussion title' },
213
- content: { type: 'string', description: 'Initial post content' },
214
- type: { type: 'string', description: 'Type of discussion', examples: ['question', 'proposal', 'brainstorm', 'announcement', 'decision', 'RFC', 'retrospective'] },
215
- status: { type: 'string', description: 'Discussion status', examples: ['open', 'active', 'resolved', 'closed', 'locked', 'archived'] },
216
- category: { type: 'string', description: 'Discussion category' },
217
- author: { type: 'string', description: 'Discussion author' },
218
- participants: { type: 'string[]', description: 'Participants' },
219
- mentions: { type: 'string[]', description: 'Mentioned users' },
220
- replyCount: { type: 'number', description: 'Number of replies' },
221
- viewCount: { type: 'number', description: 'View count' },
222
- lastReplyDate: { type: 'date', description: 'Last reply date' },
223
- lastReplyBy: { type: 'string', description: 'Last reply by' },
224
- pinned: { type: 'boolean', description: 'Is pinned' },
225
- locked: { type: 'boolean', description: 'Is locked' },
226
- resolved: { type: 'boolean', description: 'Is resolved' },
227
- resolvedBy: { type: 'string', description: 'Resolved by', optional: true },
228
- resolvedDate: { type: 'date', description: 'Resolution date', optional: true },
229
- visibility: { type: 'string', description: 'Visibility', examples: ['public', 'team', 'private', 'confidential'] },
230
- createdDate: { type: 'date', description: 'Creation date' },
231
- notes: { type: 'string', description: 'Internal notes', optional: true },
232
- tags: { type: 'string[]', description: 'Discussion tags' },
233
- metadata: { type: 'object', description: 'Additional metadata', optional: true },
234
- },
235
- relationships: {
236
- project: { type: 'project', description: 'Related project', backref: 'discussions' },
237
- team: { type: 'team', description: 'Related team', backref: 'discussions' },
238
- decision: { type: 'decision', description: 'Related decision', backref: 'discussions' },
239
- parentDiscussion: { type: 'discussion', description: 'Parent discussion', backref: 'replies' },
240
- replies: { type: 'discussion[]', description: 'Replies', backref: 'parentDiscussion' },
241
- },
242
- actions: ['create', 'update', 'reply', 'resolve', 'close', 'reopen', 'pin', 'unpin', 'lock', 'unlock', 'archive'],
243
- events: ['created', 'updated', 'replied', 'resolved', 'closed', 'reopened', 'pinned', 'unpinned', 'locked', 'unlocked', 'archived'],
244
- };
245
- // Export all communication entities
246
- export const CommunicationEntities = {
247
- Meeting,
248
- Decision,
249
- ActionItem,
250
- Announcement,
251
- Feedback,
252
- Discussion,
253
- };
254
- export default CommunicationEntities;