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,332 @@
|
|
|
1
|
+
import type { Noun } from 'ai-database'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Asset & Inventory Entities
|
|
5
|
+
* Asset, Inventory, Equipment, Facility, Software, DataAsset
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export const Asset: Noun = {
|
|
9
|
+
singular: 'asset',
|
|
10
|
+
plural: 'assets',
|
|
11
|
+
description: 'A business asset (physical or digital)',
|
|
12
|
+
properties: {
|
|
13
|
+
name: { type: 'string', description: 'Asset name' },
|
|
14
|
+
description: { type: 'string', description: 'Asset description' },
|
|
15
|
+
type: { type: 'string', description: 'Type of asset', examples: ['hardware', 'software', 'furniture', 'vehicle', 'equipment', 'real-estate', 'digital', 'IP', 'financial'] },
|
|
16
|
+
category: { type: 'string', description: 'Asset category' },
|
|
17
|
+
status: { type: 'string', description: 'Asset status', examples: ['active', 'inactive', 'maintenance', 'retired', 'disposed', 'lost', 'stolen', 'reserved'] },
|
|
18
|
+
assetTag: { type: 'string', description: 'Asset tag or identifier' },
|
|
19
|
+
serialNumber: { type: 'string', description: 'Serial number' },
|
|
20
|
+
barcode: { type: 'string', description: 'Barcode', optional: true },
|
|
21
|
+
manufacturer: { type: 'string', description: 'Manufacturer' },
|
|
22
|
+
model: { type: 'string', description: 'Model' },
|
|
23
|
+
version: { type: 'string', description: 'Version', optional: true },
|
|
24
|
+
condition: { type: 'string', description: 'Condition', examples: ['new', 'excellent', 'good', 'fair', 'poor', 'damaged'] },
|
|
25
|
+
location: { type: 'string', description: 'Physical location' },
|
|
26
|
+
building: { type: 'string', description: 'Building', optional: true },
|
|
27
|
+
floor: { type: 'string', description: 'Floor', optional: true },
|
|
28
|
+
room: { type: 'string', description: 'Room', optional: true },
|
|
29
|
+
assignedTo: { type: 'string', description: 'Assigned user' },
|
|
30
|
+
department: { type: 'string', description: 'Owning department' },
|
|
31
|
+
custodian: { type: 'string', description: 'Asset custodian' },
|
|
32
|
+
purchaseDate: { type: 'date', description: 'Purchase date' },
|
|
33
|
+
purchasePrice: { type: 'number', description: 'Purchase price' },
|
|
34
|
+
vendor: { type: 'string', description: 'Vendor/supplier' },
|
|
35
|
+
poNumber: { type: 'string', description: 'Purchase order number', optional: true },
|
|
36
|
+
invoiceNumber: { type: 'string', description: 'Invoice number', optional: true },
|
|
37
|
+
currentValue: { type: 'number', description: 'Current book value' },
|
|
38
|
+
depreciationMethod: { type: 'string', description: 'Depreciation method', examples: ['straight-line', 'declining-balance', 'units-of-production', 'none'] },
|
|
39
|
+
depreciationRate: { type: 'number', description: 'Annual depreciation rate' },
|
|
40
|
+
salvageValue: { type: 'number', description: 'Salvage value' },
|
|
41
|
+
usefulLife: { type: 'number', description: 'Useful life in years' },
|
|
42
|
+
warrantyExpiry: { type: 'date', description: 'Warranty expiration', optional: true },
|
|
43
|
+
warrantyProvider: { type: 'string', description: 'Warranty provider', optional: true },
|
|
44
|
+
maintenanceSchedule: { type: 'string', description: 'Maintenance schedule', examples: ['monthly', 'quarterly', 'semi-annual', 'annual', 'as-needed'] },
|
|
45
|
+
lastMaintenanceDate: { type: 'date', description: 'Last maintenance date', optional: true },
|
|
46
|
+
nextMaintenanceDate: { type: 'date', description: 'Next maintenance date', optional: true },
|
|
47
|
+
disposalDate: { type: 'date', description: 'Disposal date', optional: true },
|
|
48
|
+
disposalMethod: { type: 'string', description: 'Disposal method', examples: ['sold', 'donated', 'recycled', 'scrapped'], optional: true },
|
|
49
|
+
disposalValue: { type: 'number', description: 'Disposal value', optional: true },
|
|
50
|
+
insured: { type: 'boolean', description: 'Is insured' },
|
|
51
|
+
insurancePolicy: { type: 'string', description: 'Insurance policy number', optional: true },
|
|
52
|
+
notes: { type: 'string', description: 'Internal notes', optional: true },
|
|
53
|
+
tags: { type: 'string[]', description: 'Asset tags' },
|
|
54
|
+
metadata: { type: 'object', description: 'Additional metadata', optional: true },
|
|
55
|
+
},
|
|
56
|
+
relationships: {
|
|
57
|
+
facility: { type: 'facility', description: 'Located at facility', backref: 'assets' },
|
|
58
|
+
worker: { type: 'worker', description: 'Assigned worker', backref: 'assets' },
|
|
59
|
+
department: { type: 'department', description: 'Owning department', backref: 'assets' },
|
|
60
|
+
vendor: { type: 'vendor', description: 'Asset vendor', backref: 'assets' },
|
|
61
|
+
parentAsset: { type: 'asset', description: 'Parent asset', backref: 'childAssets' },
|
|
62
|
+
childAssets: { type: 'asset[]', description: 'Child assets', backref: 'parentAsset' },
|
|
63
|
+
maintenanceRecords: { type: 'maintenanceRecord[]', description: 'Maintenance history', backref: 'asset' },
|
|
64
|
+
},
|
|
65
|
+
actions: ['create', 'update', 'assign', 'unassign', 'transfer', 'maintain', 'repair', 'retire', 'dispose', 'audit', 'reserve', 'check-in', 'check-out'],
|
|
66
|
+
events: ['created', 'updated', 'assigned', 'unassigned', 'transferred', 'maintained', 'repaired', 'retired', 'disposed', 'audited', 'reserved', 'checkedIn', 'checkedOut'],
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export const Inventory: Noun = {
|
|
70
|
+
singular: 'inventory',
|
|
71
|
+
plural: 'inventories',
|
|
72
|
+
description: 'Inventory or stock item',
|
|
73
|
+
properties: {
|
|
74
|
+
name: { type: 'string', description: 'Item name' },
|
|
75
|
+
description: { type: 'string', description: 'Item description' },
|
|
76
|
+
sku: { type: 'string', description: 'Stock keeping unit' },
|
|
77
|
+
barcode: { type: 'string', description: 'Barcode' },
|
|
78
|
+
type: { type: 'string', description: 'Type of inventory', examples: ['raw-material', 'work-in-progress', 'finished-goods', 'supplies', 'spare-parts', 'consumables'] },
|
|
79
|
+
category: { type: 'string', description: 'Item category' },
|
|
80
|
+
status: { type: 'string', description: 'Item status', examples: ['active', 'inactive', 'discontinued', 'on-hold', 'backordered'] },
|
|
81
|
+
unitOfMeasure: { type: 'string', description: 'Unit of measure', examples: ['each', 'box', 'case', 'pallet', 'kg', 'liter', 'meter'] },
|
|
82
|
+
quantityOnHand: { type: 'number', description: 'Current quantity' },
|
|
83
|
+
quantityReserved: { type: 'number', description: 'Reserved quantity' },
|
|
84
|
+
quantityAvailable: { type: 'number', description: 'Available quantity' },
|
|
85
|
+
quantityOnOrder: { type: 'number', description: 'On order quantity' },
|
|
86
|
+
quantityInTransit: { type: 'number', description: 'In transit quantity' },
|
|
87
|
+
reorderPoint: { type: 'number', description: 'Reorder point' },
|
|
88
|
+
reorderQuantity: { type: 'number', description: 'Reorder quantity' },
|
|
89
|
+
minQuantity: { type: 'number', description: 'Minimum quantity' },
|
|
90
|
+
maxQuantity: { type: 'number', description: 'Maximum quantity' },
|
|
91
|
+
leadTimeDays: { type: 'number', description: 'Lead time in days' },
|
|
92
|
+
unitCost: { type: 'number', description: 'Unit cost' },
|
|
93
|
+
avgCost: { type: 'number', description: 'Average cost' },
|
|
94
|
+
lastCost: { type: 'number', description: 'Last purchase cost' },
|
|
95
|
+
standardCost: { type: 'number', description: 'Standard cost' },
|
|
96
|
+
sellingPrice: { type: 'number', description: 'Selling price' },
|
|
97
|
+
margin: { type: 'number', description: 'Margin percentage' },
|
|
98
|
+
totalValue: { type: 'number', description: 'Total inventory value' },
|
|
99
|
+
location: { type: 'string', description: 'Primary location' },
|
|
100
|
+
warehouse: { type: 'string', description: 'Warehouse' },
|
|
101
|
+
zone: { type: 'string', description: 'Zone', optional: true },
|
|
102
|
+
bin: { type: 'string', description: 'Bin location', optional: true },
|
|
103
|
+
lotTracking: { type: 'boolean', description: 'Lot tracking enabled' },
|
|
104
|
+
serialTracking: { type: 'boolean', description: 'Serial tracking enabled' },
|
|
105
|
+
expirationTracking: { type: 'boolean', description: 'Expiration tracking enabled' },
|
|
106
|
+
lastCountDate: { type: 'date', description: 'Last physical count date' },
|
|
107
|
+
lastReceiveDate: { type: 'date', description: 'Last receive date' },
|
|
108
|
+
lastSoldDate: { type: 'date', description: 'Last sold date' },
|
|
109
|
+
abcClass: { type: 'string', description: 'ABC classification', examples: ['A', 'B', 'C'] },
|
|
110
|
+
hazardous: { type: 'boolean', description: 'Is hazardous' },
|
|
111
|
+
perishable: { type: 'boolean', description: 'Is perishable' },
|
|
112
|
+
notes: { type: 'string', description: 'Internal notes', optional: true },
|
|
113
|
+
tags: { type: 'string[]', description: 'Item tags' },
|
|
114
|
+
metadata: { type: 'object', description: 'Additional metadata', optional: true },
|
|
115
|
+
},
|
|
116
|
+
relationships: {
|
|
117
|
+
product: { type: 'product', description: 'Related product', backref: 'inventory' },
|
|
118
|
+
vendor: { type: 'vendor', description: 'Primary vendor', backref: 'inventory' },
|
|
119
|
+
facility: { type: 'facility', description: 'Storage facility', backref: 'inventory' },
|
|
120
|
+
movements: { type: 'inventoryMovement[]', description: 'Movement history', backref: 'inventory' },
|
|
121
|
+
lots: { type: 'lot[]', description: 'Lot records', backref: 'inventory' },
|
|
122
|
+
},
|
|
123
|
+
actions: ['create', 'update', 'receive', 'ship', 'transfer', 'adjust', 'count', 'reserve', 'unreserve', 'reorder', 'discontinue'],
|
|
124
|
+
events: ['created', 'updated', 'received', 'shipped', 'transferred', 'adjusted', 'counted', 'reserved', 'unreserved', 'reordered', 'discontinued'],
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export const Equipment: Noun = {
|
|
128
|
+
singular: 'equipment',
|
|
129
|
+
plural: 'equipment',
|
|
130
|
+
description: 'Business equipment or machinery',
|
|
131
|
+
properties: {
|
|
132
|
+
name: { type: 'string', description: 'Equipment name' },
|
|
133
|
+
description: { type: 'string', description: 'Equipment description' },
|
|
134
|
+
type: { type: 'string', description: 'Type of equipment', examples: ['computer', 'server', 'network', 'printer', 'phone', 'machinery', 'vehicle', 'tool', 'AV', 'safety'] },
|
|
135
|
+
status: { type: 'string', description: 'Equipment status', examples: ['available', 'in-use', 'maintenance', 'repair', 'retired', 'disposed'] },
|
|
136
|
+
assetTag: { type: 'string', description: 'Asset tag' },
|
|
137
|
+
serialNumber: { type: 'string', description: 'Serial number' },
|
|
138
|
+
manufacturer: { type: 'string', description: 'Manufacturer' },
|
|
139
|
+
model: { type: 'string', description: 'Model' },
|
|
140
|
+
specifications: { type: 'object', description: 'Technical specifications', optional: true },
|
|
141
|
+
condition: { type: 'string', description: 'Condition', examples: ['new', 'excellent', 'good', 'fair', 'poor'] },
|
|
142
|
+
location: { type: 'string', description: 'Current location' },
|
|
143
|
+
assignedTo: { type: 'string', description: 'Assigned user' },
|
|
144
|
+
department: { type: 'string', description: 'Department' },
|
|
145
|
+
purchaseDate: { type: 'date', description: 'Purchase date' },
|
|
146
|
+
purchasePrice: { type: 'number', description: 'Purchase price' },
|
|
147
|
+
currentValue: { type: 'number', description: 'Current value' },
|
|
148
|
+
warrantyExpiry: { type: 'date', description: 'Warranty expiration' },
|
|
149
|
+
serviceContract: { type: 'boolean', description: 'Has service contract' },
|
|
150
|
+
serviceProvider: { type: 'string', description: 'Service provider', optional: true },
|
|
151
|
+
lastServiceDate: { type: 'date', description: 'Last service date', optional: true },
|
|
152
|
+
nextServiceDate: { type: 'date', description: 'Next service date', optional: true },
|
|
153
|
+
operatingHours: { type: 'number', description: 'Operating hours', optional: true },
|
|
154
|
+
utilizationRate: { type: 'number', description: 'Utilization rate', optional: true },
|
|
155
|
+
criticality: { type: 'string', description: 'Criticality level', examples: ['critical', 'high', 'medium', 'low'] },
|
|
156
|
+
notes: { type: 'string', description: 'Internal notes', optional: true },
|
|
157
|
+
tags: { type: 'string[]', description: 'Equipment tags' },
|
|
158
|
+
metadata: { type: 'object', description: 'Additional metadata', optional: true },
|
|
159
|
+
},
|
|
160
|
+
relationships: {
|
|
161
|
+
asset: { type: 'asset', description: 'Parent asset record', backref: 'equipment' },
|
|
162
|
+
facility: { type: 'facility', description: 'Located at facility', backref: 'equipment' },
|
|
163
|
+
worker: { type: 'worker', description: 'Assigned worker', backref: 'equipment' },
|
|
164
|
+
maintenanceRecords: { type: 'maintenanceRecord[]', description: 'Maintenance history', backref: 'equipment' },
|
|
165
|
+
},
|
|
166
|
+
actions: ['create', 'update', 'assign', 'unassign', 'service', 'repair', 'calibrate', 'retire', 'dispose', 'reserve', 'return'],
|
|
167
|
+
events: ['created', 'updated', 'assigned', 'unassigned', 'serviced', 'repaired', 'calibrated', 'retired', 'disposed', 'reserved', 'returned'],
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export const Facility: Noun = {
|
|
171
|
+
singular: 'facility',
|
|
172
|
+
plural: 'facilities',
|
|
173
|
+
description: 'A physical facility or location',
|
|
174
|
+
properties: {
|
|
175
|
+
name: { type: 'string', description: 'Facility name' },
|
|
176
|
+
description: { type: 'string', description: 'Facility description' },
|
|
177
|
+
type: { type: 'string', description: 'Type of facility', examples: ['office', 'warehouse', 'factory', 'datacenter', 'retail', 'lab', 'headquarters', 'branch', 'remote'] },
|
|
178
|
+
status: { type: 'string', description: 'Facility status', examples: ['active', 'inactive', 'construction', 'renovation', 'closing', 'closed'] },
|
|
179
|
+
code: { type: 'string', description: 'Facility code' },
|
|
180
|
+
address: { type: 'string', description: 'Street address' },
|
|
181
|
+
city: { type: 'string', description: 'City' },
|
|
182
|
+
state: { type: 'string', description: 'State/Province' },
|
|
183
|
+
postalCode: { type: 'string', description: 'Postal code' },
|
|
184
|
+
country: { type: 'string', description: 'Country' },
|
|
185
|
+
region: { type: 'string', description: 'Region' },
|
|
186
|
+
timezone: { type: 'string', description: 'Timezone' },
|
|
187
|
+
coordinates: { type: 'object', description: 'GPS coordinates', optional: true },
|
|
188
|
+
squareFootage: { type: 'number', description: 'Square footage/meters' },
|
|
189
|
+
floors: { type: 'number', description: 'Number of floors' },
|
|
190
|
+
capacity: { type: 'number', description: 'Person capacity' },
|
|
191
|
+
currentOccupancy: { type: 'number', description: 'Current occupancy' },
|
|
192
|
+
owner: { type: 'string', description: 'Property owner' },
|
|
193
|
+
ownership: { type: 'string', description: 'Ownership type', examples: ['owned', 'leased', 'subleased', 'coworking'] },
|
|
194
|
+
landlord: { type: 'string', description: 'Landlord name', optional: true },
|
|
195
|
+
leaseStart: { type: 'date', description: 'Lease start date', optional: true },
|
|
196
|
+
leaseEnd: { type: 'date', description: 'Lease end date', optional: true },
|
|
197
|
+
monthlyRent: { type: 'number', description: 'Monthly rent', optional: true },
|
|
198
|
+
operatingCost: { type: 'number', description: 'Monthly operating cost' },
|
|
199
|
+
manager: { type: 'string', description: 'Facility manager' },
|
|
200
|
+
emergencyContact: { type: 'string', description: 'Emergency contact' },
|
|
201
|
+
phone: { type: 'string', description: 'Main phone number' },
|
|
202
|
+
amenities: { type: 'string[]', description: 'Available amenities' },
|
|
203
|
+
certifications: { type: 'string[]', description: 'Facility certifications', examples: ['LEED', 'ISO14001', 'WELL'] },
|
|
204
|
+
securityLevel: { type: 'string', description: 'Security level', examples: ['standard', 'enhanced', 'high-security', 'restricted'] },
|
|
205
|
+
accessControl: { type: 'string', description: 'Access control system' },
|
|
206
|
+
notes: { type: 'string', description: 'Internal notes', optional: true },
|
|
207
|
+
tags: { type: 'string[]', description: 'Facility tags' },
|
|
208
|
+
metadata: { type: 'object', description: 'Additional metadata', optional: true },
|
|
209
|
+
},
|
|
210
|
+
relationships: {
|
|
211
|
+
assets: { type: 'asset[]', description: 'Facility assets', backref: 'facility' },
|
|
212
|
+
equipment: { type: 'equipment[]', description: 'Facility equipment', backref: 'facility' },
|
|
213
|
+
inventory: { type: 'inventory[]', description: 'Facility inventory', backref: 'facility' },
|
|
214
|
+
workers: { type: 'worker[]', description: 'Workers at facility', backref: 'facility' },
|
|
215
|
+
departments: { type: 'department[]', description: 'Departments at facility', backref: 'facilities' },
|
|
216
|
+
parentFacility: { type: 'facility', description: 'Parent facility', backref: 'childFacilities' },
|
|
217
|
+
childFacilities: { type: 'facility[]', description: 'Child facilities', backref: 'parentFacility' },
|
|
218
|
+
},
|
|
219
|
+
actions: ['create', 'update', 'open', 'close', 'renovate', 'expand', 'consolidate', 'audit', 'inspect'],
|
|
220
|
+
events: ['created', 'updated', 'opened', 'closed', 'renovated', 'expanded', 'consolidated', 'audited', 'inspected'],
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export const Software: Noun = {
|
|
224
|
+
singular: 'software',
|
|
225
|
+
plural: 'software',
|
|
226
|
+
description: 'Software application or system',
|
|
227
|
+
properties: {
|
|
228
|
+
name: { type: 'string', description: 'Software name' },
|
|
229
|
+
description: { type: 'string', description: 'Software description' },
|
|
230
|
+
type: { type: 'string', description: 'Type of software', examples: ['SaaS', 'on-premise', 'desktop', 'mobile', 'embedded', 'open-source', 'custom'] },
|
|
231
|
+
category: { type: 'string', description: 'Software category', examples: ['productivity', 'communication', 'development', 'security', 'analytics', 'CRM', 'ERP', 'HR'] },
|
|
232
|
+
status: { type: 'string', description: 'Software status', examples: ['active', 'evaluating', 'deprecated', 'retired', 'blocked'] },
|
|
233
|
+
vendor: { type: 'string', description: 'Software vendor' },
|
|
234
|
+
version: { type: 'string', description: 'Current version' },
|
|
235
|
+
latestVersion: { type: 'string', description: 'Latest available version' },
|
|
236
|
+
edition: { type: 'string', description: 'Edition/tier' },
|
|
237
|
+
licenseType: { type: 'string', description: 'License type', examples: ['subscription', 'perpetual', 'open-source', 'freemium', 'site', 'user'] },
|
|
238
|
+
licensedUsers: { type: 'number', description: 'Licensed user count' },
|
|
239
|
+
activeUsers: { type: 'number', description: 'Active user count' },
|
|
240
|
+
deploymentType: { type: 'string', description: 'Deployment type', examples: ['cloud', 'on-premise', 'hybrid', 'edge'] },
|
|
241
|
+
url: { type: 'string', description: 'Application URL' },
|
|
242
|
+
ssoEnabled: { type: 'boolean', description: 'SSO enabled' },
|
|
243
|
+
ssoProvider: { type: 'string', description: 'SSO provider', optional: true },
|
|
244
|
+
dataClassification: { type: 'string', description: 'Data classification', examples: ['public', 'internal', 'confidential', 'restricted'] },
|
|
245
|
+
businessCriticality: { type: 'string', description: 'Business criticality', examples: ['mission-critical', 'business-critical', 'important', 'operational'] },
|
|
246
|
+
owner: { type: 'string', description: 'Application owner' },
|
|
247
|
+
technicalOwner: { type: 'string', description: 'Technical owner' },
|
|
248
|
+
supportContact: { type: 'string', description: 'Support contact' },
|
|
249
|
+
contractStart: { type: 'date', description: 'Contract start date' },
|
|
250
|
+
contractEnd: { type: 'date', description: 'Contract end date' },
|
|
251
|
+
renewalDate: { type: 'date', description: 'Renewal date' },
|
|
252
|
+
annualCost: { type: 'number', description: 'Annual cost' },
|
|
253
|
+
monthlyCost: { type: 'number', description: 'Monthly cost' },
|
|
254
|
+
costPerUser: { type: 'number', description: 'Cost per user' },
|
|
255
|
+
securityReview: { type: 'boolean', description: 'Security review completed' },
|
|
256
|
+
lastSecurityReview: { type: 'date', description: 'Last security review date', optional: true },
|
|
257
|
+
complianceStatus: { type: 'string', description: 'Compliance status', examples: ['compliant', 'pending', 'non-compliant', 'exempt'] },
|
|
258
|
+
integrations: { type: 'string[]', description: 'Integrated systems' },
|
|
259
|
+
notes: { type: 'string', description: 'Internal notes', optional: true },
|
|
260
|
+
tags: { type: 'string[]', description: 'Software tags' },
|
|
261
|
+
metadata: { type: 'object', description: 'Additional metadata', optional: true },
|
|
262
|
+
},
|
|
263
|
+
relationships: {
|
|
264
|
+
asset: { type: 'asset', description: 'Parent asset record', backref: 'software' },
|
|
265
|
+
license: { type: 'license', description: 'Software license', backref: 'software' },
|
|
266
|
+
vendor: { type: 'vendor', description: 'Software vendor', backref: 'software' },
|
|
267
|
+
integrations: { type: 'integration[]', description: 'Integrations', backref: 'software' },
|
|
268
|
+
users: { type: 'worker[]', description: 'Software users', backref: 'software' },
|
|
269
|
+
},
|
|
270
|
+
actions: ['create', 'update', 'deploy', 'upgrade', 'downgrade', 'renew', 'deprecate', 'retire', 'review', 'integrate'],
|
|
271
|
+
events: ['created', 'updated', 'deployed', 'upgraded', 'downgraded', 'renewed', 'deprecated', 'retired', 'reviewed', 'integrated'],
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export const DataAsset: Noun = {
|
|
275
|
+
singular: 'dataAsset',
|
|
276
|
+
plural: 'dataAssets',
|
|
277
|
+
description: 'A data asset or dataset',
|
|
278
|
+
properties: {
|
|
279
|
+
name: { type: 'string', description: 'Data asset name' },
|
|
280
|
+
description: { type: 'string', description: 'Data asset description' },
|
|
281
|
+
type: { type: 'string', description: 'Type of data asset', examples: ['database', 'data-lake', 'file', 'API', 'report', 'model', 'dataset', 'stream'] },
|
|
282
|
+
category: { type: 'string', description: 'Data category', examples: ['customer', 'financial', 'operational', 'product', 'HR', 'marketing', 'analytics'] },
|
|
283
|
+
status: { type: 'string', description: 'Data asset status', examples: ['active', 'deprecated', 'archived', 'draft', 'under-review'] },
|
|
284
|
+
classification: { type: 'string', description: 'Data classification', examples: ['public', 'internal', 'confidential', 'restricted', 'PII', 'PHI', 'financial'] },
|
|
285
|
+
format: { type: 'string', description: 'Data format', examples: ['SQL', 'JSON', 'CSV', 'Parquet', 'Avro', 'XML', 'binary'] },
|
|
286
|
+
schema: { type: 'object', description: 'Data schema', optional: true },
|
|
287
|
+
size: { type: 'string', description: 'Data size' },
|
|
288
|
+
recordCount: { type: 'number', description: 'Record count' },
|
|
289
|
+
location: { type: 'string', description: 'Storage location' },
|
|
290
|
+
source: { type: 'string', description: 'Data source' },
|
|
291
|
+
sourceSystem: { type: 'string', description: 'Source system' },
|
|
292
|
+
refreshFrequency: { type: 'string', description: 'Refresh frequency', examples: ['real-time', 'hourly', 'daily', 'weekly', 'monthly', 'on-demand'] },
|
|
293
|
+
lastRefresh: { type: 'date', description: 'Last refresh date' },
|
|
294
|
+
nextRefresh: { type: 'date', description: 'Next scheduled refresh' },
|
|
295
|
+
retentionPeriod: { type: 'string', description: 'Data retention period' },
|
|
296
|
+
retentionPolicy: { type: 'string', description: 'Retention policy' },
|
|
297
|
+
owner: { type: 'string', description: 'Data owner' },
|
|
298
|
+
steward: { type: 'string', description: 'Data steward' },
|
|
299
|
+
qualityScore: { type: 'number', description: 'Data quality score' },
|
|
300
|
+
qualityIssues: { type: 'string[]', description: 'Known quality issues' },
|
|
301
|
+
lineage: { type: 'string', description: 'Data lineage documentation' },
|
|
302
|
+
documentation: { type: 'string', description: 'Documentation URL' },
|
|
303
|
+
accessControl: { type: 'string', description: 'Access control policy' },
|
|
304
|
+
encryptionStatus: { type: 'string', description: 'Encryption status', examples: ['encrypted-at-rest', 'encrypted-in-transit', 'fully-encrypted', 'not-encrypted'] },
|
|
305
|
+
complianceRequirements: { type: 'string[]', description: 'Compliance requirements', examples: ['GDPR', 'CCPA', 'HIPAA', 'PCI'] },
|
|
306
|
+
createdDate: { type: 'date', description: 'Creation date' },
|
|
307
|
+
notes: { type: 'string', description: 'Internal notes', optional: true },
|
|
308
|
+
tags: { type: 'string[]', description: 'Data asset tags' },
|
|
309
|
+
metadata: { type: 'object', description: 'Additional metadata', optional: true },
|
|
310
|
+
},
|
|
311
|
+
relationships: {
|
|
312
|
+
asset: { type: 'asset', description: 'Parent asset record', backref: 'dataAssets' },
|
|
313
|
+
sourceAssets: { type: 'dataAsset[]', description: 'Source data assets', backref: 'derivedAssets' },
|
|
314
|
+
derivedAssets: { type: 'dataAsset[]', description: 'Derived data assets', backref: 'sourceAssets' },
|
|
315
|
+
consumers: { type: 'software[]', description: 'Consuming applications', backref: 'dataAssets' },
|
|
316
|
+
compliance: { type: 'compliance[]', description: 'Related compliance', backref: 'dataAssets' },
|
|
317
|
+
},
|
|
318
|
+
actions: ['create', 'update', 'refresh', 'archive', 'delete', 'share', 'restrict', 'classify', 'audit', 'document'],
|
|
319
|
+
events: ['created', 'updated', 'refreshed', 'archived', 'deleted', 'shared', 'restricted', 'classified', 'audited', 'documented'],
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
// Export all asset entities
|
|
323
|
+
export const AssetEntities = {
|
|
324
|
+
Asset,
|
|
325
|
+
Inventory,
|
|
326
|
+
Equipment,
|
|
327
|
+
Facility,
|
|
328
|
+
Software,
|
|
329
|
+
DataAsset,
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export default AssetEntities
|