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