@axova/shared 1.0.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.
- package/CONFIGURATION_GUIDE.md +1 -0
- package/README.md +384 -0
- package/SCHEMA_ORGANIZATION.md +209 -0
- package/dist/configs/index.d.ts +85 -0
- package/dist/configs/index.js +555 -0
- package/dist/events/kafka.d.ts +40 -0
- package/dist/events/kafka.js +311 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +41 -0
- package/dist/interfaces/customer-events.d.ts +85 -0
- package/dist/interfaces/customer-events.js +2 -0
- package/dist/interfaces/inventory-events.d.ts +453 -0
- package/dist/interfaces/inventory-events.js +3 -0
- package/dist/interfaces/inventory-types.d.ts +894 -0
- package/dist/interfaces/inventory-types.js +3 -0
- package/dist/interfaces/order-events.d.ts +320 -0
- package/dist/interfaces/order-events.js +3 -0
- package/dist/lib/auditLogger.d.ts +162 -0
- package/dist/lib/auditLogger.js +626 -0
- package/dist/lib/authOrganization.d.ts +24 -0
- package/dist/lib/authOrganization.js +110 -0
- package/dist/lib/db.d.ts +6 -0
- package/dist/lib/db.js +88 -0
- package/dist/middleware/serviceAuth.d.ts +60 -0
- package/dist/middleware/serviceAuth.js +272 -0
- package/dist/middleware/storeOwnership.d.ts +15 -0
- package/dist/middleware/storeOwnership.js +156 -0
- package/dist/middleware/storeValidationMiddleware.d.ts +44 -0
- package/dist/middleware/storeValidationMiddleware.js +180 -0
- package/dist/middleware/userAuth.d.ts +27 -0
- package/dist/middleware/userAuth.js +218 -0
- package/dist/schemas/admin/admin-schema.d.ts +741 -0
- package/dist/schemas/admin/admin-schema.js +111 -0
- package/dist/schemas/ai-moderation/ai-moderation-schema.d.ts +648 -0
- package/dist/schemas/ai-moderation/ai-moderation-schema.js +88 -0
- package/dist/schemas/common/common-schemas.d.ts +436 -0
- package/dist/schemas/common/common-schemas.js +94 -0
- package/dist/schemas/compliance/compliance-schema.d.ts +3388 -0
- package/dist/schemas/compliance/compliance-schema.js +472 -0
- package/dist/schemas/compliance/kyc-schema.d.ts +2642 -0
- package/dist/schemas/compliance/kyc-schema.js +361 -0
- package/dist/schemas/customer/customer-schema.d.ts +2727 -0
- package/dist/schemas/customer/customer-schema.js +399 -0
- package/dist/schemas/index.d.ts +27 -0
- package/dist/schemas/index.js +138 -0
- package/dist/schemas/inventory/inventory-tables.d.ts +9476 -0
- package/dist/schemas/inventory/inventory-tables.js +1470 -0
- package/dist/schemas/inventory/lot-tables.d.ts +3281 -0
- package/dist/schemas/inventory/lot-tables.js +608 -0
- package/dist/schemas/order/order-schema.d.ts +5825 -0
- package/dist/schemas/order/order-schema.js +954 -0
- package/dist/schemas/product/discount-relations.d.ts +15 -0
- package/dist/schemas/product/discount-relations.js +34 -0
- package/dist/schemas/product/discount-schema.d.ts +1975 -0
- package/dist/schemas/product/discount-schema.js +297 -0
- package/dist/schemas/product/product-relations.d.ts +41 -0
- package/dist/schemas/product/product-relations.js +133 -0
- package/dist/schemas/product/product-schema.d.ts +4544 -0
- package/dist/schemas/product/product-schema.js +671 -0
- package/dist/schemas/store/store-audit-schema.d.ts +4135 -0
- package/dist/schemas/store/store-audit-schema.js +556 -0
- package/dist/schemas/store/store-schema.d.ts +3100 -0
- package/dist/schemas/store/store-schema.js +381 -0
- package/dist/schemas/store/store-settings-schema.d.ts +665 -0
- package/dist/schemas/store/store-settings-schema.js +141 -0
- package/dist/schemas/types.d.ts +50 -0
- package/dist/schemas/types.js +3 -0
- package/dist/types/events.d.ts +2396 -0
- package/dist/types/events.js +505 -0
- package/dist/utils/errorHandler.d.ts +12 -0
- package/dist/utils/errorHandler.js +36 -0
- package/dist/utils/subdomain.d.ts +6 -0
- package/dist/utils/subdomain.js +20 -0
- package/nul +8 -0
- package/package.json +43 -0
- package/src/configs/index.ts +654 -0
- package/src/events/kafka.ts +429 -0
- package/src/index.ts +26 -0
- package/src/interfaces/customer-events.ts +106 -0
- package/src/interfaces/inventory-events.ts +545 -0
- package/src/interfaces/inventory-types.ts +1004 -0
- package/src/interfaces/order-events.ts +381 -0
- package/src/lib/auditLogger.ts +1117 -0
- package/src/lib/authOrganization.ts +153 -0
- package/src/lib/db.ts +64 -0
- package/src/middleware/serviceAuth.ts +328 -0
- package/src/middleware/storeOwnership.ts +199 -0
- package/src/middleware/storeValidationMiddleware.ts +247 -0
- package/src/middleware/userAuth.ts +248 -0
- package/src/schemas/admin/admin-schema.ts +208 -0
- package/src/schemas/ai-moderation/ai-moderation-schema.ts +180 -0
- package/src/schemas/common/common-schemas.ts +108 -0
- package/src/schemas/compliance/compliance-schema.ts +927 -0
- package/src/schemas/compliance/kyc-schema.ts +649 -0
- package/src/schemas/customer/customer-schema.ts +576 -0
- package/src/schemas/index.ts +189 -0
- package/src/schemas/inventory/inventory-tables.ts +1927 -0
- package/src/schemas/inventory/lot-tables.ts +799 -0
- package/src/schemas/order/order-schema.ts +1400 -0
- package/src/schemas/product/discount-relations.ts +44 -0
- package/src/schemas/product/discount-schema.ts +464 -0
- package/src/schemas/product/product-relations.ts +187 -0
- package/src/schemas/product/product-schema.ts +955 -0
- package/src/schemas/store/ethiopian_business_api.md.resolved +212 -0
- package/src/schemas/store/store-audit-schema.ts +1257 -0
- package/src/schemas/store/store-schema.ts +661 -0
- package/src/schemas/store/store-settings-schema.ts +231 -0
- package/src/schemas/types.ts +67 -0
- package/src/types/events.ts +646 -0
- package/src/utils/errorHandler.ts +44 -0
- package/src/utils/subdomain.ts +19 -0
- package/tsconfig.json +21 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
// Export the ACTUAL Drizzle table objects for database operations
|
|
2
|
+
|
|
3
|
+
// Export event and Kafka functionality
|
|
4
|
+
export {
|
|
5
|
+
type AxovaKafkaConfig,
|
|
6
|
+
createKafkaInstance,
|
|
7
|
+
getKafkaConfigFromEnv,
|
|
8
|
+
getKafkaInstance,
|
|
9
|
+
} from "../events/kafka";
|
|
10
|
+
// Export customer events and configuration
|
|
11
|
+
export {
|
|
12
|
+
CustomerServiceConfig,
|
|
13
|
+
CustomerServiceEvents,
|
|
14
|
+
} from "../interfaces/customer-events";
|
|
15
|
+
|
|
16
|
+
// Export inventory events and configuration
|
|
17
|
+
export { ServiceConfig, ServiceEvents } from "../interfaces/inventory-events";
|
|
18
|
+
// Export inventory-specific types
|
|
19
|
+
export type {
|
|
20
|
+
ABCClassification,
|
|
21
|
+
AIRecommendation,
|
|
22
|
+
// Automation types
|
|
23
|
+
AutomationRule,
|
|
24
|
+
AutomationRuleFilter,
|
|
25
|
+
BatchFilter,
|
|
26
|
+
// Batch tracking types
|
|
27
|
+
BatchInfo,
|
|
28
|
+
CountItemRequest,
|
|
29
|
+
CreateAutomationRuleRequest,
|
|
30
|
+
CreateBatchRequest,
|
|
31
|
+
CreateCycleCountRequest,
|
|
32
|
+
CreateInventoryItemRequest,
|
|
33
|
+
CreatePOSLocationRequest,
|
|
34
|
+
CreateWarehouseRequest,
|
|
35
|
+
// Cycle count types
|
|
36
|
+
CycleCount,
|
|
37
|
+
CycleCountFilter,
|
|
38
|
+
CycleCountItem,
|
|
39
|
+
DashboardMetrics,
|
|
40
|
+
ExpiryReport,
|
|
41
|
+
ForecastData,
|
|
42
|
+
InventoryFilter,
|
|
43
|
+
InventoryInsight,
|
|
44
|
+
// Core types
|
|
45
|
+
InventoryItem,
|
|
46
|
+
InventoryOverview,
|
|
47
|
+
// Insights and analytics types
|
|
48
|
+
InventorySnapshot,
|
|
49
|
+
LowStockAlert,
|
|
50
|
+
// Common operation types
|
|
51
|
+
OperationResult,
|
|
52
|
+
PaginatedResult,
|
|
53
|
+
POSLocation,
|
|
54
|
+
QuantityUpdate,
|
|
55
|
+
ReorderRecommendation,
|
|
56
|
+
StockMovementReport,
|
|
57
|
+
StockValuation,
|
|
58
|
+
TenantContext,
|
|
59
|
+
TransferFilter,
|
|
60
|
+
TransferItem,
|
|
61
|
+
// Transfer types
|
|
62
|
+
TransferRequest,
|
|
63
|
+
UpdateInventoryItemRequest,
|
|
64
|
+
UserContext,
|
|
65
|
+
VelocityAnalysis,
|
|
66
|
+
Warehouse,
|
|
67
|
+
} from "../interfaces/inventory-types";
|
|
68
|
+
export * from "../types/events";
|
|
69
|
+
// Admin Management
|
|
70
|
+
export * from "./admin/admin-schema";
|
|
71
|
+
// AI Moderation
|
|
72
|
+
export * from "./ai-moderation/ai-moderation-schema";
|
|
73
|
+
// Common Schemas
|
|
74
|
+
export * from "./common/common-schemas";
|
|
75
|
+
// Compliance Schemas
|
|
76
|
+
export * from "./compliance/compliance-schema";
|
|
77
|
+
export * from "./compliance/kyc-schema";
|
|
78
|
+
export {
|
|
79
|
+
storeKyc,
|
|
80
|
+
kycVerificationHistory,
|
|
81
|
+
kycDocuments,
|
|
82
|
+
kycAnalytics,
|
|
83
|
+
kycWebhooksLog,
|
|
84
|
+
} from "./compliance/kyc-schema";
|
|
85
|
+
// Customer Management Schemas
|
|
86
|
+
export * from "./customer/customer-schema";
|
|
87
|
+
// Customer Schema Exports
|
|
88
|
+
export {
|
|
89
|
+
customerAddresses,
|
|
90
|
+
customerInteractionHistory,
|
|
91
|
+
customerNotes,
|
|
92
|
+
customerPreferences,
|
|
93
|
+
customerReviews,
|
|
94
|
+
customerSupportTickets,
|
|
95
|
+
customers,
|
|
96
|
+
customerVisitHistory,
|
|
97
|
+
} from "./customer/customer-schema";
|
|
98
|
+
// Core Inventory tables and co-located schemas
|
|
99
|
+
export * from "./inventory/inventory-tables";
|
|
100
|
+
export {
|
|
101
|
+
inventory,
|
|
102
|
+
inventoryMovements,
|
|
103
|
+
inventoryTransferItems,
|
|
104
|
+
inventoryTransfers,
|
|
105
|
+
posLocations,
|
|
106
|
+
productSuppliers,
|
|
107
|
+
purchaseOrderItems,
|
|
108
|
+
purchaseOrders,
|
|
109
|
+
qualityControls,
|
|
110
|
+
qualityTemplates,
|
|
111
|
+
supplierQualityRatings,
|
|
112
|
+
suppliers,
|
|
113
|
+
warehouses,
|
|
114
|
+
} from "./inventory/inventory-tables";
|
|
115
|
+
|
|
116
|
+
// Lot & Batch Management schemas
|
|
117
|
+
export {
|
|
118
|
+
alertSeverityEnum,
|
|
119
|
+
alertStatusEnum,
|
|
120
|
+
alertTypeEnum,
|
|
121
|
+
inventoryLotAlerts,
|
|
122
|
+
inventoryLotMerges,
|
|
123
|
+
inventoryLotMovements,
|
|
124
|
+
inventoryLots,
|
|
125
|
+
inventoryLotSplits,
|
|
126
|
+
lotMovementTypeEnum,
|
|
127
|
+
lotStatusEnum,
|
|
128
|
+
// Zod Schemas for Lot Operations
|
|
129
|
+
LotSchema,
|
|
130
|
+
InitializeProductInventorySchema,
|
|
131
|
+
CreateLotSchema,
|
|
132
|
+
ReserveLotQuantitySchema,
|
|
133
|
+
ReleaseLotReservationSchema,
|
|
134
|
+
AdjustLotQuantitySchema,
|
|
135
|
+
TransferLotSchema,
|
|
136
|
+
MergeLotsSchema,
|
|
137
|
+
SplitLotSchema,
|
|
138
|
+
GetLotsQuerySchema,
|
|
139
|
+
GetAvailableLotsSchema,
|
|
140
|
+
LotAnalyticsSchema,
|
|
141
|
+
} from "./inventory/lot-tables";
|
|
142
|
+
|
|
143
|
+
// Order schemas
|
|
144
|
+
export {
|
|
145
|
+
addressTypeEnum,
|
|
146
|
+
discountTypeEnum,
|
|
147
|
+
fulfillmentStatusEnum,
|
|
148
|
+
orderAddresses,
|
|
149
|
+
orderAddressesRelations,
|
|
150
|
+
orderDiscounts,
|
|
151
|
+
orderDiscountsRelations,
|
|
152
|
+
orderFulfillments,
|
|
153
|
+
orderFulfillmentsRelations,
|
|
154
|
+
orderHistory,
|
|
155
|
+
orderHistoryRelations,
|
|
156
|
+
orderItems,
|
|
157
|
+
orderItemsRelations,
|
|
158
|
+
orderNotes,
|
|
159
|
+
orderNotesRelations,
|
|
160
|
+
orderPayments,
|
|
161
|
+
orderPaymentsRelations,
|
|
162
|
+
orderPriorityEnum,
|
|
163
|
+
orderStatusEnum,
|
|
164
|
+
orders,
|
|
165
|
+
ordersRelations,
|
|
166
|
+
// Enums
|
|
167
|
+
orderTypeEnum,
|
|
168
|
+
paymentMethodEnum,
|
|
169
|
+
paymentStatusEnum,
|
|
170
|
+
refundReasonEnum,
|
|
171
|
+
} from "./order/order-schema";
|
|
172
|
+
export * from "./product/product-relations";
|
|
173
|
+
// Product Management Schemas
|
|
174
|
+
export * from "./product/product-schema";
|
|
175
|
+
export * from "./product/product-relations";
|
|
176
|
+
export * from "./product/discount-schema";
|
|
177
|
+
export * from "./product/discount-relations";
|
|
178
|
+
// Store Management
|
|
179
|
+
export * from "./store/store-schema";
|
|
180
|
+
export * from "./store/store-settings-schema";
|
|
181
|
+
export * from "./store/store-audit-schema";
|
|
182
|
+
export {
|
|
183
|
+
storeSettings,
|
|
184
|
+
marketRegions,
|
|
185
|
+
storeSettingsRelations,
|
|
186
|
+
marketRegionsRelations,
|
|
187
|
+
} from "./store/store-settings-schema";
|
|
188
|
+
// Types
|
|
189
|
+
export * from "./types";
|