Start integrating the onboarding flow with backend 6
This commit is contained in:
303
frontend/src/api/index.ts
Normal file
303
frontend/src/api/index.ts
Normal file
@@ -0,0 +1,303 @@
|
||||
/**
|
||||
* Main API exports for clean imports
|
||||
* Export all services, types, and hooks
|
||||
*/
|
||||
|
||||
// Client
|
||||
export { apiClient } from './client';
|
||||
export type { ApiError } from './client';
|
||||
|
||||
// Services
|
||||
export { authService } from './services/auth';
|
||||
export { userService } from './services/user';
|
||||
export { onboardingService } from './services/onboarding';
|
||||
export { tenantService } from './services/tenant';
|
||||
export { subscriptionService } from './services/subscription';
|
||||
export { salesService } from './services/sales';
|
||||
export { dataImportService } from './services/dataImport';
|
||||
export { inventoryService } from './services/inventory';
|
||||
export { classificationService } from './services/classification';
|
||||
export { inventoryDashboardService } from './services/inventoryDashboard';
|
||||
export { foodSafetyService } from './services/foodSafety';
|
||||
|
||||
// Types - Auth
|
||||
export type {
|
||||
User,
|
||||
UserRegistration,
|
||||
UserLogin,
|
||||
TokenResponse,
|
||||
RefreshTokenRequest,
|
||||
PasswordChange,
|
||||
PasswordReset,
|
||||
UserResponse,
|
||||
UserUpdate as AuthUserUpdate,
|
||||
TokenVerificationResponse,
|
||||
AuthHealthResponse,
|
||||
} from './types/auth';
|
||||
|
||||
// Types - User
|
||||
export type {
|
||||
UserUpdate,
|
||||
AdminDeleteRequest,
|
||||
AdminDeleteResponse,
|
||||
} from './types/user';
|
||||
|
||||
// Types - Onboarding
|
||||
export type {
|
||||
OnboardingStepStatus,
|
||||
UserProgress,
|
||||
UpdateStepRequest,
|
||||
} from './types/onboarding';
|
||||
|
||||
// Types - Tenant
|
||||
export type {
|
||||
BakeryRegistration,
|
||||
TenantResponse,
|
||||
TenantAccessResponse,
|
||||
TenantUpdate,
|
||||
TenantMemberResponse,
|
||||
TenantStatistics,
|
||||
TenantSearchParams,
|
||||
TenantNearbyParams,
|
||||
} from './types/tenant';
|
||||
|
||||
// Types - Subscription
|
||||
export type {
|
||||
SubscriptionLimits,
|
||||
FeatureCheckResponse,
|
||||
UsageCheckResponse,
|
||||
} from './types/subscription';
|
||||
|
||||
// Types - Sales
|
||||
export type {
|
||||
SalesDataCreate,
|
||||
SalesDataUpdate,
|
||||
SalesDataResponse,
|
||||
SalesDataQuery,
|
||||
SalesAnalytics,
|
||||
SalesValidationRequest,
|
||||
} from './types/sales';
|
||||
|
||||
// Types - Data Import
|
||||
export type {
|
||||
ImportValidationRequest,
|
||||
ImportValidationResponse,
|
||||
ImportProcessRequest,
|
||||
ImportProcessResponse,
|
||||
ImportStatusResponse,
|
||||
} from './types/dataImport';
|
||||
|
||||
// Types - Inventory
|
||||
export type {
|
||||
IngredientCreate,
|
||||
IngredientUpdate,
|
||||
IngredientResponse,
|
||||
StockCreate,
|
||||
StockUpdate,
|
||||
StockResponse,
|
||||
StockMovementCreate,
|
||||
StockMovementResponse,
|
||||
InventoryFilter,
|
||||
StockFilter,
|
||||
StockConsumptionRequest,
|
||||
StockConsumptionResponse,
|
||||
PaginatedResponse,
|
||||
} from './types/inventory';
|
||||
|
||||
// Types - Classification
|
||||
export type {
|
||||
ProductClassificationRequest,
|
||||
BatchClassificationRequest,
|
||||
ProductSuggestionResponse,
|
||||
BusinessModelAnalysisResponse,
|
||||
ClassificationApprovalRequest,
|
||||
ClassificationApprovalResponse,
|
||||
} from './types/classification';
|
||||
|
||||
// Types - Dashboard
|
||||
export type {
|
||||
InventoryDashboardSummary,
|
||||
InventoryAnalytics,
|
||||
BusinessModelInsights,
|
||||
DashboardFilter,
|
||||
AlertsFilter,
|
||||
RecentActivity,
|
||||
StockMovementSummary,
|
||||
CategorySummary,
|
||||
AlertSummary,
|
||||
StockStatusSummary,
|
||||
} from './types/dashboard';
|
||||
|
||||
// Types - Food Safety
|
||||
export type {
|
||||
FoodSafetyComplianceCreate,
|
||||
FoodSafetyComplianceUpdate,
|
||||
FoodSafetyComplianceResponse,
|
||||
TemperatureLogCreate,
|
||||
BulkTemperatureLogCreate,
|
||||
TemperatureLogResponse,
|
||||
FoodSafetyAlertCreate,
|
||||
FoodSafetyAlertUpdate,
|
||||
FoodSafetyAlertResponse,
|
||||
FoodSafetyFilter,
|
||||
TemperatureMonitoringFilter,
|
||||
FoodSafetyMetrics,
|
||||
TemperatureAnalytics,
|
||||
FoodSafetyDashboard,
|
||||
} from './types/foodSafety';
|
||||
|
||||
// Hooks - Auth
|
||||
export {
|
||||
useAuthProfile,
|
||||
useAuthHealth,
|
||||
useVerifyToken,
|
||||
useRegister,
|
||||
useLogin,
|
||||
useRefreshToken,
|
||||
useLogout,
|
||||
useChangePassword,
|
||||
useResetPassword,
|
||||
useUpdateProfile,
|
||||
useVerifyEmail,
|
||||
authKeys,
|
||||
} from './hooks/auth';
|
||||
|
||||
// Hooks - User
|
||||
export {
|
||||
useCurrentUser,
|
||||
useAllUsers,
|
||||
useUserById,
|
||||
useUpdateUser,
|
||||
useDeleteUser,
|
||||
useAdminDeleteUser,
|
||||
userKeys,
|
||||
} from './hooks/user';
|
||||
|
||||
// Hooks - Onboarding
|
||||
export {
|
||||
useUserProgress,
|
||||
useAllSteps,
|
||||
useStepDetails,
|
||||
useUpdateStep,
|
||||
useMarkStepCompleted,
|
||||
useResetProgress,
|
||||
onboardingKeys,
|
||||
} from './hooks/onboarding';
|
||||
|
||||
// Hooks - Tenant
|
||||
export {
|
||||
useTenant,
|
||||
useTenantBySubdomain,
|
||||
useUserTenants,
|
||||
useUserOwnedTenants,
|
||||
useTenantAccess,
|
||||
useSearchTenants,
|
||||
useNearbyTenants,
|
||||
useTeamMembers,
|
||||
useTenantStatistics,
|
||||
useRegisterBakery,
|
||||
useUpdateTenant,
|
||||
useDeactivateTenant,
|
||||
useActivateTenant,
|
||||
useUpdateModelStatus,
|
||||
useAddTeamMember,
|
||||
useUpdateMemberRole,
|
||||
useRemoveTeamMember,
|
||||
tenantKeys,
|
||||
} from './hooks/tenant';
|
||||
|
||||
// Hooks - Sales
|
||||
export {
|
||||
useSalesRecords,
|
||||
useSalesRecord,
|
||||
useSalesAnalytics,
|
||||
useProductSales,
|
||||
useProductCategories,
|
||||
useCreateSalesRecord,
|
||||
useUpdateSalesRecord,
|
||||
useDeleteSalesRecord,
|
||||
useValidateSalesRecord,
|
||||
salesKeys,
|
||||
} from './hooks/sales';
|
||||
|
||||
// Hooks - Inventory
|
||||
export {
|
||||
useIngredients,
|
||||
useIngredient,
|
||||
useIngredientsByCategory,
|
||||
useLowStockIngredients,
|
||||
useStock,
|
||||
useStockByIngredient,
|
||||
useExpiringStock,
|
||||
useExpiredStock,
|
||||
useStockMovements,
|
||||
useStockAnalytics,
|
||||
useCreateIngredient,
|
||||
useUpdateIngredient,
|
||||
useDeleteIngredient,
|
||||
useAddStock,
|
||||
useUpdateStock,
|
||||
useConsumeStock,
|
||||
useCreateStockMovement,
|
||||
inventoryKeys,
|
||||
} from './hooks/inventory';
|
||||
|
||||
// Hooks - Classification
|
||||
export {
|
||||
usePendingSuggestions,
|
||||
useSuggestionHistory,
|
||||
useBusinessModelAnalysis,
|
||||
useClassifyProduct,
|
||||
useClassifyProductsBatch,
|
||||
useApproveClassification,
|
||||
useUpdateSuggestion,
|
||||
useDeleteSuggestion,
|
||||
classificationKeys,
|
||||
} from './hooks/classification';
|
||||
|
||||
// Hooks - Inventory Dashboard
|
||||
export {
|
||||
useInventoryDashboardSummary,
|
||||
useInventoryAnalytics,
|
||||
useBusinessModelInsights,
|
||||
useRecentActivity,
|
||||
useInventoryAlerts,
|
||||
useStockSummary,
|
||||
useTopCategories,
|
||||
useExpiryCalendar,
|
||||
inventoryDashboardKeys,
|
||||
} from './hooks/inventoryDashboard';
|
||||
|
||||
// Hooks - Food Safety
|
||||
export {
|
||||
useComplianceRecords,
|
||||
useComplianceRecord,
|
||||
useTemperatureLogs,
|
||||
useTemperatureAnalytics,
|
||||
useTemperatureViolations,
|
||||
useFoodSafetyAlerts,
|
||||
useFoodSafetyAlert,
|
||||
useFoodSafetyDashboard,
|
||||
useFoodSafetyMetrics,
|
||||
useComplianceRate,
|
||||
useCreateComplianceRecord,
|
||||
useUpdateComplianceRecord,
|
||||
useCreateTemperatureLog,
|
||||
useCreateBulkTemperatureLogs,
|
||||
useCreateFoodSafetyAlert,
|
||||
useUpdateFoodSafetyAlert,
|
||||
foodSafetyKeys,
|
||||
} from './hooks/foodSafety';
|
||||
|
||||
// Query Key Factories (for advanced usage)
|
||||
export {
|
||||
authKeys,
|
||||
userKeys,
|
||||
onboardingKeys,
|
||||
tenantKeys,
|
||||
salesKeys,
|
||||
inventoryKeys,
|
||||
classificationKeys,
|
||||
inventoryDashboardKeys,
|
||||
foodSafetyKeys,
|
||||
};
|
||||
Reference in New Issue
Block a user